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

# Delete Inventory Item Set

Delete Inventory Item Set Mutation

Deletes an existing InventoryItemSet object from the system, removing the logical grouping while leaving the individual items intact. This operation dissolves the relationship between items but does not delete the individual inventory items themselves.

## Arguments

| Name | Type  | Description                                               |
| ---- | ----- | --------------------------------------------------------- |
| `id` | `ID!` | The unique identifier of the inventory item set to delete |

## Return Type

`InventoryItemSetDeletePayload!` - Contains information about the deleted item set and related workflows.

## Return Fields

`InventoryItemSetDeletePayload`:

| Field       | Type                 | Description                                            |
| ----------- | -------------------- | ------------------------------------------------------ |
| `deletedID` | `ID`                 | The ID of the deleted inventory item set               |
| `workflows` | `[TemporalWorkflow]` | Workflow instances that were triggered by the deletion |

## Usage Example

```graphql
mutation {
  deleteInventoryItemSet(id: "itemset_123") {
    deletedID
    workflows {
      id
      type
      status
      runID
    }
  }
}
```

## JavaScript Example

```javascript
const DELETE_INVENTORY_ITEM_SET = gql`
  mutation DeleteInventoryItemSet($id: ID!) {
    deleteInventoryItemSet(id: $id) {
      deletedID
      workflows {
        id
        name
        status
        workflowID
        runID
      }
    }
  }
`;

const { data } = await client.mutate({
  mutation: DELETE_INVENTORY_ITEM_SET,
  variables: {
    id: "itemset_123"
  }
});

console.log(`Deleted item set with ID: ${data.deleteInventoryItemSet.deletedID}`);

// Check for any triggered workflows
if (data.deleteInventoryItemSet.workflows.length > 0) {
  console.log('Triggered workflows:', data.deleteInventoryItemSet.workflows);
}
```

## Important Notes

* **Items Preserved**: Deleting an item set does NOT delete the individual inventory items - only the grouping relationship is removed
* **Stock Impact**: Existing stock records for the item set may need to be handled separately
* **Workflow Triggers**: The deletion may trigger workflows for catalog updates, pricing adjustments, or inventory reconciliation
* **Authorization**: Ensure you have proper permissions before deleting inventory item sets
* **Business Impact**: Consider the business impact on sales, ordering, and inventory management systems
* **Audit Trail**: Deletion events are logged for compliance and audit purposes
* **Recovery**: Once deleted, the item set grouping cannot be recovered through the API - individual items must be regrouped manually

## Pre-Deletion Considerations

Before deleting an inventory item set, consider:

1. **Active Orders**: Check if the item set is referenced in any active orders or quotes
2. **Stock Records**: Determine how to handle any existing stock records for the item set
3. **Pricing Rules**: Update or remove any bundle pricing rules associated with the set
4. **Catalog Systems**: Update external catalog systems that reference the item set
5. **Documentation**: Archive or transfer assembly instructions and related documentation

## Related Operations

After deleting an inventory item set, you may need to:

* Remove or transfer stock records associated with the deleted set
* Update pricing systems to remove bundle discounts
* Update catalog systems and product listings
* Notify sales teams about discontinued bundles
* Create individual inventory records if items were only tracked as part of the set
* Update workflow rules that referenced the item set

## Common Deletion Scenarios

1. **Product Discontinuation**: Remove product bundles that are no longer offered
2. **Simplify Inventory**: Eliminate complex groupings to simplify inventory management
3. **Supplier Changes**: Remove sets when supplier relationships change
4. **Seasonal Cleanup**: Delete seasonal collections that are no longer relevant
5. **Business Process Changes**: Remove sets that no longer align with business processes
6. **Data Cleanup**: Remove duplicate or obsolete sets during system maintenance

## Safety Precautions

* **Backup Data**: Consider exporting item set configuration before deletion for potential recreation
* **Impact Analysis**: Analyze downstream systems that may reference the item set
* **Gradual Phase-out**: For customer-facing sets, consider marking as inactive before deletion
* **Team Communication**: Notify relevant teams (sales, warehouse, procurement) before deletion
* **Documentation**: Document the reason for deletion and any replacement processes

## Workflow Considerations

The deletion may trigger various workflows:

* **Catalog Update Workflows**: Synchronize changes with external systems
* **Pricing Adjustment Workflows**: Remove bundle pricing rules
* **Inventory Reconciliation Workflows**: Handle any remaining stock records
* **Notification Workflows**: Alert relevant stakeholders about the deletion

## Error Handling

Common scenarios that may prevent deletion:

* **Active References**: The item set is referenced in active orders, movements, or other operations
* **Insufficient Permissions**: User lacks permission to delete the item set
* **System Constraints**: Business rules prevent deletion due to operational requirements
* **Workflow Dependencies**: Active workflows depend on the item set's existence

In such cases, consider:

* Marking the item set as inactive instead of deleting
* Resolving active references before attempting deletion
* Obtaining appropriate permissions or approvals
* Waiting for dependent workflows to complete


---

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