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

# Update Inventory Collection Movement

Update Inventory Collection Movement Mutation

Updates an existing InventoryCollection object in the system with new data. Collection movements represent grouped operations that coordinate multiple related movements as a single logical unit.

## Arguments

| Name    | Type                              | Description                                                 |
| ------- | --------------------------------- | ----------------------------------------------------------- |
| `id`    | `ID!`                             | The unique identifier of the inventory collection to update |
| `input` | `UpdateInventoryCollectionInput!` | Input data for updating the inventory collection            |

## Return Type

`UpdateCollectionMovementOutput` - Contains the updated inventory collection and any related workflows.

## Input Fields

`UpdateInventoryCollectionInput`:

| Field                 | Type      | Description                                            |
| --------------------- | --------- | ------------------------------------------------------ |
| `dataTypeID`          | `UUID`    | Optional data type ID to associate with the collection |
| `clearDataTypeID`     | `Boolean` | Clear the existing data type ID                        |
| `dataTypeSlug`        | `String`  | Optional data type slug                                |
| `clearDataTypeSlug`   | `Boolean` | Clear the existing data type slug                      |
| `data`                | `Map`     | Custom data associated with the collection             |
| `clearData`           | `Boolean` | Clear the existing custom data                         |
| `handler`             | `String`  | Handler responsible for coordinating the collection    |
| `clearHandler`        | `Boolean` | Clear the current handler assignment                   |
| `assignee`            | `String`  | Person or team assigned to execute the collection      |
| `clearAssignee`       | `Boolean` | Clear the current assignee                             |
| `assignmentDate`      | `Time`    | When the collection was assigned                       |
| `clearAssignmentDate` | `Boolean` | Clear the assignment date                              |

## Return Fields

`UpdateCollectionMovementOutput`:

| Field                 | Type                   | Description                                    |
| --------------------- | ---------------------- | ---------------------------------------------- |
| `inventoryCollection` | `InventoryCollection!` | The updated inventory collection               |
| `workflows`           | `[TemporalWorkflow]`   | Related workflow instances that were triggered |

## Usage Example

```graphql
mutation {
  updateInventoryCollectionMovement(
    id: "collection_789"
    input: {
      handler: "collection_coordinator_123",
      assignee: "warehouse_team_alpha",
      assignmentDate: "2024-12-01T09:00:00Z",
      data: {
        "priority": "high",
        "batch_size": 50,
        "coordination_type": "sequential",
        "estimated_completion_hours": 6,
        "special_instructions": "Handle fragile items with extra care",
        "quality_check_points": ["initial", "midpoint", "final"],
        "reporting_frequency": "hourly",
        "resource_requirements": {
          "staff_count": 4,
          "equipment": ["scanner", "tablet", "cart"],
          "workspace": "zone_a"
        }
      },
      dataTypeSlug: "batch_transfer_collection"
    }
  ) {
    inventoryCollection {
      id
      handler
      assignee
      assignmentDate
      data
      dataTypeSlug
      createdAt
      updatedAt
      updatedBy
    }
    workflows {
      id
      type
      status
      runID
    }
  }
}
```

## JavaScript Example

```javascript
const UPDATE_INVENTORY_COLLECTION_MOVEMENT = gql`
  mutation UpdateInventoryCollectionMovement($id: ID!, $input: UpdateInventoryCollectionInput!) {
    updateInventoryCollectionMovement(id: $id, input: $input) {
      inventoryCollection {
        id
        handler
        assignee
        assignmentDate
        data
        dataTypeSlug
        createdAt
        updatedAt
        updatedBy
      }
      workflows {
        id
        type
        status
        runID
      }
    }
  }
`;

const { data } = await client.mutate({
  mutation: UPDATE_INVENTORY_COLLECTION_MOVEMENT,
  variables: {
    id: "collection_789",
    input: {
      handler: "collection_coordinator_123",
      assignee: "warehouse_team_alpha",
      assignmentDate: "2024-12-01T09:00:00Z",
      data: {
        priority: "high",
        batch_size: 50,
        coordination_type: "sequential",
        estimated_completion_hours: 6,
        special_instructions: "Handle fragile items with extra care",
        quality_check_points: ["initial", "midpoint", "final"],
        reporting_frequency: "hourly",
        resource_requirements: {
          staff_count: 4,
          equipment: ["scanner", "tablet", "cart"],
          workspace: "zone_a"
        }
      },
      dataTypeSlug: "batch_transfer_collection"
    }
  }
});

console.log(`Updated collection: ${data.updateInventoryCollectionMovement.inventoryCollection.id}`);
```

## Important Notes

* **Collection Coordination**: Updates to collections may affect all related individual movements within the collection
* **Handler vs Assignee**: The handler coordinates the collection while the assignee executes the physical work
* **Assignment Timing**: Use `assignmentDate` to track when work was allocated to teams
* **Workflow Impact**: Updates may trigger coordination workflows, resource allocation, or progress tracking workflows
* **Data Validation**: The system validates that collection parameters are consistent with the individual movements it contains
* **Audit Tracking**: All updates to collections are logged for audit purposes
* **Batch Operations**: Collections are typically used for batch processing of related movements

## Common Update Scenarios

1. **Reassign Team**: Change which team is responsible for executing the collection
2. **Update Coordination**: Modify how individual movements within the collection are coordinated
3. **Adjust Priority**: Change collection priority to expedite or defer processing
4. **Add Instructions**: Include special handling requirements or safety protocols
5. **Update Progress Tracking**: Modify reporting frequency or quality check requirements
6. **Resource Reallocation**: Update equipment, staff, or workspace assignments

## Collection Management Best Practices

* **Clear Communication**: Ensure all team members understand collection scope and requirements
* **Progress Monitoring**: Use frequent reporting to track collection progress
* **Resource Planning**: Allocate sufficient resources for the entire collection duration
* **Quality Control**: Implement checkpoints throughout the collection execution
* **Coordination**: Maintain clear communication between handler and assignee roles

## Related Operations

After updating a collection movement, you may need to:

* Update individual movements within the collection to reflect changes
* Notify all affected team members about the updates
* Adjust resource reservations and scheduling
* Update progress tracking and reporting systems


---

# 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/updateinventorycollectionmovement.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.
