Delete Inventory Item

Delete Inventory Item Mutation

Deletes an existing InventoryItem object from the system.

Arguments

Name
Type
Description

id

ID!

The unique identifier of the inventory item to delete

Return Type

InventoryItemDeletePayload! - Contains information about the deleted item and related workflows.

Return Fields

InventoryItemDeletePayload:

Field
Type
Description

deletedID

ID

The ID of the deleted inventory item

workflows

[TemporalWorkflow]

Workflow instances that were triggered by the deletion

Usage Example

mutation {
  deleteInventoryItem(id: "item_123") {
    deletedID
    workflows {
      id
      type
      status
      runID
    }
  }
}

JavaScript Example

Important Notes

  • Cascading Effects: Deleting an inventory item may affect related stock records, movements, and transactions

  • Workflow Triggers: The deletion may trigger cleanup workflows or business process workflows

  • Authorization: Ensure you have proper permissions before deleting inventory items

  • Data Integrity: The system will prevent deletion if the item is referenced in active orders or movements

  • Audit Trail: Deletion events are typically logged for compliance and audit purposes

  • Recovery: Once deleted, the inventory item cannot be recovered through the API

After deleting an inventory item, you may need to:

  • Update stock levels in affected repositories

  • Cancel or modify related movements

  • Notify stakeholders about the item removal

  • Update item sets that contained this item

Last updated

Was this helpful?