Update Inventory Item Set

Update Inventory Item Set Mutation

Updates an existing InventoryItemSet object in the system with new data. This allows modification of item set properties, metadata, and the items included in the set.

Arguments

Name
Type
Description

id

ID!

The unique identifier of the inventory item set to update

input

UpdateInventoryItemSetInput!

Input data for updating the inventory item set

Return Type

InventoryItemSetOutput - Contains the updated inventory item set and any related workflows.

Input Fields

UpdateInventoryItemSetInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID to associate with the item set

clearDataTypeID

Boolean

Clear the existing data type ID

dataTypeSlug

String

Optional data type slug for categorization

clearDataTypeSlug

Boolean

Clear the existing data type slug

data

Map

Custom data associated with the item set

clearData

Boolean

Clear the existing custom data

sku

String

Update the SKU identifier for the item set

addItemIDs

[ID!]

List of inventory item IDs to add to the set

removeItemIDs

[ID!]

List of inventory item IDs to remove from the set

clearItems

Boolean

Remove all items from the set

Return Fields

InventoryItemSetOutput:

Field
Type
Description

inventoryItemSet

InventoryItemSet

The updated inventory item set

workflows

[TemporalWorkflow]

Related workflow instances that were triggered

Usage Example

JavaScript Example

Important Notes

  • SKU Uniqueness: If updating the SKU, ensure the new SKU is unique across all inventory item sets

  • Item Validation: All items in addItemIDs must exist and be accessible

  • Relationship Management: Adding/removing items automatically updates bidirectional relationships

  • Workflow Triggers: Updates may trigger workflows for bundle repricing, inventory updates, or catalog synchronization

  • Data Integrity: The system validates that all referenced items are valid and accessible

  • Audit Tracking: All updates to item sets are logged for audit purposes

  • Version Control: Consider including version information in the data field for change tracking

Common Update Operations

Add Items to Set

Remove Items from Set

Replace All Items

Update Metadata Only

Common Update Scenarios

  1. Product Evolution: Update kit composition as products are improved or discontinued

  2. Pricing Updates: Modify bundle value and pricing information

  3. Seasonal Adjustments: Add or remove seasonal items from collections

  4. Quality Improvements: Replace standard components with premium alternatives

  5. Supplier Changes: Update supplier information and warranty terms

  6. Documentation Updates: Add or modify assembly instructions and documentation links

Best Practices

  • Incremental Changes: Use addItemIDs and removeItemIDs for precise control over set composition

  • Version Tracking: Include version numbers and update timestamps in the data field

  • Impact Assessment: Consider downstream effects on pricing, inventory, and orders before making changes

  • Batch Operations: Group related changes together to minimize workflow triggers

  • Documentation: Update assembly instructions and related documentation when changing composition

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

  • Update pricing rules and bundle discounts

  • Synchronize changes with catalog systems

  • Update stock levels if set composition changed significantly

  • Notify customers or internal teams about changes

  • Update assembly instructions and documentation

Error Handling

Common errors when updating item sets:

  • Duplicate SKU: The new SKU already exists (if changing SKU)

  • Invalid Item References: Items in addItemIDs don't exist or aren't accessible

  • Circular References: Attempting to add an item set to itself

  • Insufficient Permissions: User lacks permission to modify the item set or reference specific items

  • Data Validation: Custom data doesn't meet schema requirements

Last updated

Was this helpful?