> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/types/inventorycollection.md).

# InventoryCollection

Inventory Collection Type

Represents a collection of coordinated inventory movements that are managed together as a single logical operation. InventoryCollection serves as a container for organizing related movements with assignment and tracking capabilities.

## Fields

| Field            | Type     | Description                                       |
| ---------------- | -------- | ------------------------------------------------- |
| `id`             | `ID!`    | Unique identifier of the collection               |
| `tenantID`       | `UUID!`  | Tenant identifier                                 |
| `dataTypeID`     | `UUID`   | DataType identifier for schema validation         |
| `dataTypeSlug`   | `String` | DataType slug for easier reference                |
| `data`           | `Map`    | Custom metadata stored as JSON                    |
| `createdAt`      | `Time!`  | Creation timestamp                                |
| `createdBy`      | `UUID!`  | User identifier who created the collection        |
| `updatedAt`      | `Time`   | Last update timestamp                             |
| `updatedBy`      | `UUID`   | User identifier who last updated the collection   |
| `deletedAt`      | `Time`   | Deletion timestamp                                |
| `deletedBy`      | `UUID`   | User identifier who deleted the collection        |
| `handler`        | `String` | Handler type for processing the collection        |
| `assignee`       | `String` | User or system assigned to execute the collection |
| `assignmentDate` | `Time`   | When the collection was assigned                  |

## Interfaces

* `Node`

## Usage Example

```graphql
query {
  inventoryCollections(first: 10) {
    edges {
      node {
        id
        handler
        assignee
        assignmentDate
        data
        createdAt
        updatedAt
      }
    }
  }
}
```

## Mutation Examples

### Create Collection Movement

```graphql
mutation {
  createInventoryCollectionMovement(input: {
    dataTypeSlug: "bulk_transfer"
    data: {
      operation: "warehouse_relocation"
      priority: "high"
      notes: "Moving seasonal inventory"
    }
    handler: "bulk_movement_handler"
    collection: [{
      handler: "item_transfer"
      fromID: "source-repo-uuid"
      toID: "dest-repo-uuid"
      itemID: "item-uuid-1"
      quantity: 100
    }]
  }) {
    inventoryCollection {
      id
      handler
      assignee
      data
    }
    workflows {
      id
      status
    }
  }
}
```

### Update Collection Movement

```graphql
mutation {
  updateCollectionMovement(input: {
    dataTypeSlug: "movement_update"
    data: {
      status: "completed"
      completed_at: "2024-01-15T14:30:00Z"
    }
  }) {
    inventoryCollection {
      id
      data
      assignee
      updatedAt
    }
    workflows {
      id
      status
    }
  }
}
```

## Assignment and Execution

InventoryCollections support assignment-based execution:

* **Handler**: Specifies the processing logic for the collection
* **Assignee**: Identifies who is responsible for executing the movements
* **Assignment Date**: Tracks when the collection was assigned for execution

## Common Use Cases

* **Wave Picking**: Group multiple order picks into coordinated waves
* **Bulk Transfers**: Coordinate movement of multiple items between locations
* **Cross-Docking**: Manage incoming-to-outgoing transfers without storage
* **Cycle Counting**: Organize inventory counting operations
* **Replenishment**: Coordinate restocking of multiple pick locations

## Relations

* **InventoryCollection** `1:N` **CollectionMovement**: A collection contains multiple movement operations
* **InventoryCollection** `N:1` **DataType**: Collections can reference a DataType for schema validation

## Best Practices

* Use descriptive handlers to clearly identify the collection purpose
* Assign collections to appropriate users or systems for execution
* Track assignment dates for performance monitoring
* Use the `data` field to store operation-specific metadata
* Monitor associated workflows for execution status and error handling


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/types/inventorycollection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
