Delete Inventory Repository

Delete Inventory Repository Mutation

Deletes an existing Repository object from the system.

Arguments

Name
Type
Description

id

ID!

The unique identifier of the repository to delete

Return Type

InventoryRepositoryDeletePayload! - Contains information about the deleted repository and related workflows.

Return Fields

InventoryRepositoryDeletePayload:

Field
Type
Description

deletedID

ID

The ID of the deleted repository

workflows

[TemporalWorkflow]

Workflow instances that were triggered by the deletion

Usage Example

mutation {
  deleteInventoryRepository(id: "repo_123") {
    deletedID
    workflows {
      type
      id
      runID
      status
      startedAt
      completedAt
      result
      failure
    }
  }
}

JavaScript Example

Important Notes

  • Stock Validation: The system will prevent deletion if the repository contains inventory stock

  • Child Repositories: Parent repositories cannot be deleted if they have child repositories

  • Active Movements: Repositories with pending or active movements cannot be deleted

  • Workflow Triggers: Deletion may trigger workflows for:

    • Stock consolidation and transfer

    • Layout reconfiguration

    • Capacity reallocation

    • System cleanup processes

  • Hierarchical Impact: Deleting a repository affects the storage hierarchy structure

  • Authorization: Ensure you have proper permissions before deleting repositories

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

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

Pre-deletion Checklist

Before deleting a repository, ensure:

  1. Empty Stock: All inventory items have been moved out

  2. No Child Repositories: All child repositories have been deleted or reassigned

  3. No Pending Movements: All movements to/from this repository are completed

  4. No Active Orders: No picking or receiving orders reference this repository

  5. Proper Authorization: You have the necessary permissions

  6. Business Impact: Stakeholders are aware of the deletion

After deleting a repository, you may need to:

  • Redistribute stock to other repositories

  • Update warehouse layouts and capacity calculations

  • Modify picking and receiving processes

  • Update location mappings in related systems

Last updated

Was this helpful?