> 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/mutations/createinventorycollectionmovement.md).

# Create Inventory Collection Movement

createInventoryCollectionMovement Mutation

Creates a collection of related item movements as a single operation in the inventory system.

## Arguments

| Name    | Type                             | Description                                         |
| ------- | -------------------------------- | --------------------------------------------------- |
| `input` | `CreateCollectionMovementInput!` | Input data for creating the collection of movements |

## Return Type

`CreateCollectionMovementOutput` - Contains the ID of the created collection, the list of movements, and associated workflow information.

### Output Fields

| Field       | Type                   | Description                                    |
| ----------- | ---------------------- | ---------------------------------------------- |
| `id`        | `ID!`                  | Unique identifier for the created collection   |
| `movements` | `[CollectionMovement]` | List of movements created in this collection   |
| `workflows` | `[TemporalWorkflow]`   | Workflow instances triggered by this operation |

## Input Fields

`CreateCollectionMovementInput`:

| Field          | Type                             | Description                                      |
| -------------- | -------------------------------- | ------------------------------------------------ |
| `dataTypeID`   | `UUID`                           | Optional data type ID for the collection         |
| `dataTypeSlug` | `String`                         | Optional data type slug for the collection       |
| `data`         | `Map`                            | Custom data associated with the collection       |
| `collection`   | `[CollectionMovementArrayInput]` | Required array of movement operations to perform |
| `handler`      | `String`                         | Handler for the collection movement              |

`CollectionMovementArrayInput`:

| Field          | Type      | Description                                               |
| -------------- | --------- | --------------------------------------------------------- |
| `handler`      | `String!` | Required handler for this specific movement               |
| `dataTypeID`   | `UUID`    | Optional data type ID for this movement                   |
| `dataTypeSlug` | `String`  | Optional data type slug for this movement                 |
| `data`         | `Map`     | Custom data for this movement                             |
| `fromID`       | `ID!`     | Required source repository ID                             |
| `toID`         | `ID!`     | Required destination repository ID                        |
| `itemID`       | `ID`      | Optional item ID (if applicable)                          |
| `quantity`     | `Float`   | Optional quantity (if applicable)                         |
| `repositoryID` | `ID`      | Optional repository ID for repository-specific operations |
| `orderID`      | `ID`      | Optional order ID for order-related movements             |

## Usage Example

```graphql
mutation {
  createInventoryCollectionMovement(
    input: {
      handler: "order_fulfillment",
      data: {
        "order_reference": "ORD-12345",
        "customer_id": "cust-456",
        "priority": "high"
      },
      collection: [
        {
          handler: "pick",
          fromID: "warehouse-main",
          toID: "packing-station-1",
          itemID: "item-123",
          quantity: 2,
          data: {
            "bin_location": "A1-B2"
          }
        },
        {
          handler: "pick",
          fromID: "warehouse-main",
          toID: "packing-station-1",
          itemID: "item-456",
          quantity: 3,
          data: {
            "bin_location": "C3-D4"
          }
        },
        {
          handler: "pack",
          fromID: "packing-station-1",
          toID: "shipping-area",
          data: {
            "package_type": "box",
            "package_dimensions": "30x20x15"
          }
        }
      ]
    }
  ) {
    id
    movements {
      id
      movementType
    }
    workflows {
      id
      runID
      type
    }
  }
}
```


---

# 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/mutations/createinventorycollectionmovement.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.
