Deletes an existing RepositoryMovement object from the system, removing a planned or pending repository-level operation such as consolidations, reorganizations, or bulk transfers.
Arguments
Name
Type
Description
id
ID!
The unique identifier of the repository movement to delete
Return Type
InventoryRepositoryMovementDeletePayload! - Contains information about the deleted movement and related workflows.
Return Fields
InventoryRepositoryMovementDeletePayload:
Field
Type
Description
deletedID
ID
The ID of the deleted repository movement
workflows
[TemporalWorkflow]
Workflow instances that were triggered by the deletion
Movement State: Only non-executed repository movements can be deleted. Executed movements become part of the audit trail and cannot be removed
Scale Impact: Repository movements typically affect large quantities of inventory, so deletion should be carefully considered
Workflow Triggers: The deletion may trigger cleanup workflows, notification workflows, or resource deallocation workflows
Authorization: Ensure you have proper permissions before deleting repository movements - typically requires supervisor-level access
Data Integrity: The system will prevent deletion if the movement is part of an active collection or order
Resource Impact: Deleting a repository movement may free up reserved resources like equipment and staff
Audit Trail: Deletion events are logged for compliance and audit purposes
Recovery: Once deleted, the repository movement cannot be recovered through the API
Related Operations
After deleting a repository movement, you may need to:
Release reserved equipment and staff resources
Update related item movements that were part of the repository operation
Notify affected stakeholders about the canceled operation
Create replacement movements if the repository operation is still needed
Update scheduling systems to remove blocked time slots
Common Deletion Scenarios
Cancel Consolidation: Remove a planned repository consolidation that is no longer needed
Correct Planning Errors: Delete movements created with incorrect parameters or scope
Resource Conflicts: Remove movements when required resources are unavailable
Strategic Changes: Delete movements due to changes in warehouse strategy or priorities
Regulatory Compliance: Remove movements that would violate updated regulations
Safety Concerns: Delete movements that pose safety risks that cannot be mitigated
Safety Considerations
Repository movements often involve:
Large-scale equipment operation
Multiple staff members
Significant inventory value
Complex logistics coordination
Ensure proper authorization and communication before deleting these movements to avoid operational disruptions.
Error Handling
Common scenarios that may prevent deletion:
Executed Movement: Cannot delete a repository movement that has already been executed. The system will return the error: "cannot delete an executed movement"
Reason: Executed movements have already transferred physical stock and are part of the permanent audit trail
Solution: Only pending (non-executed) movements can be deleted. For executed movements, consider creating a reverse movement instead
Insufficient Permissions: User lacks permission to delete the movement (typically requires supervisor-level access)
Active References: The movement is referenced in active workflows, collections, or dependent operations
Resource Constraints: Equipment or staff resources are already committed and cannot be released
System Constraints: Business rules prevent deletion due to operational or safety requirements
When attempting to delete an executed movement, handle the error appropriately: