Create Inventory Item Set

Create Inventory Item Set Mutation

Creates a new InventoryItemSet object in the system. Item sets represent logical groupings of related inventory items, such as product bundles, kits, or collections that are managed together.

Arguments

Name
Type
Description

input

CreateInventoryItemSetInput!

Input data for creating the new inventory item set

Return Type

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

Input Fields

CreateInventoryItemSetInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID to associate with the item set

dataTypeSlug

String

Optional data type slug for categorization

data

Map

Custom data associated with the item set

sku

String!

Required - Unique SKU identifier for the item set

itemIDs

[ID!]

List of inventory item IDs to include in this set

Return Fields

InventoryItemSetOutput:

Field
Type
Description

inventoryItemSet

InventoryItemSet

The created inventory item set

workflows

[TemporalWorkflow]

Workflow instances that were triggered by the creation

Usage Example

JavaScript Example

Important Notes

  • SKU Uniqueness: The SKU must be unique across all inventory item sets in the system

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

  • Workflow Triggers: Creating an item set may trigger workflows for bundle management, pricing updates, or inventory synchronization

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

  • Authorization: Ensure you have proper permissions to create item sets and reference the specified items

  • Relationship Management: The system automatically creates bidirectional relationships between the set and its items

Common Use Cases

  1. Product Bundles: Group related products sold together (e.g., starter kits, combo packages)

  2. Maintenance Kits: Collections of spare parts and tools for equipment maintenance

  3. Seasonal Collections: Items grouped for seasonal sales or promotions

  4. Assembly Sets: Components that combine to create a finished product

  5. Replacement Kits: Collections of commonly replaced parts

  6. Training Sets: Items used together for training or demonstration purposes

Best Practices

  • Meaningful SKUs: Use descriptive SKU patterns that indicate the set's purpose

  • Complete Data: Include comprehensive metadata in the data field for better management

  • Logical Grouping: Ensure items in the set have a logical business relationship

  • Documentation: Include assembly instructions, usage notes, or related documentation URLs

  • Validation: Verify all component items exist before creating the set

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

  • Create stock records for the item set in appropriate repositories

  • Set up pricing rules for bundle discounts

  • Configure movement rules for keeping sets together

  • Update catalog systems with the new item set

  • Create workflow rules for set assembly or disassembly

Error Handling

Common errors when creating item sets:

  • Duplicate SKU: The specified SKU already exists

  • Invalid Item References: One or more items in itemIDs don't exist or aren't accessible

  • Insufficient Permissions: User lacks permission to create item sets or reference specific items

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

Last updated

Was this helpful?