Internal Transfer Workflow
This guide shows you how to create transfer recommendations, approve them, and execute the transfers.Prerequisites
- API Key: Valid API key with appropriate permissions:
transfers.readfor viewing recommendationstransfers.writefor generating recommendationstransfers.approvefor approving recommendationstransfers.executefor executing transfers
- Organization Access: Access to your organization’s transfer features
- Location IDs: Source and destination location IDs
Step-by-Step Guide
Step 1: Generate Transfer Recommendations
Generate transfer recommendations based on stock imbalances. Request:- Min Stock Difference: Minimum percentage difference to trigger recommendation (0-1)
- Positive ROI: Only generate recommendations with positive return on investment
- Unit Margin: Profit margin per unit for ROI calculation
- Priority: Automatically calculated based on stock levels and urgency
Step 2: List Pending Recommendations
Retrieve pending recommendations that need approval. Request:Step 3: Get Recommendation Details
Get detailed information about a specific recommendation. Request:Step 4: Approve Recommendation
Approve a transfer recommendation. Request:- Approval Required: Recommendations must be approved before execution
- Comment Optional: Include a comment explaining approval decision
- Role Required: Requires
ADMINorMANAGERrole
Step 5: Execute Transfer
Execute an approved transfer recommendation. Request:- Status Check: Only
APPROVEDrecommendations can be executed - Shipment Creation: Execution creates a shipment record
- Inventory Update: Inventory is updated when shipment is received
Step 6: Reject Recommendation (Alternative)
If a recommendation shouldn’t be executed, reject it. Request:Complete Example
Here’s a complete workflow example:Idempotency Notes
- Generate Recommendations: Generating recommendations multiple times may create duplicates. Check for existing recommendations before generating.
- Approve/Reject: Approving or rejecting a recommendation is idempotent - subsequent calls return the same result.
- Execute: Executing a recommendation creates a transfer/shipment. Multiple executions will create multiple transfers (not idempotent). Check status before executing.
Pagination Notes
- List Recommendations: Supports pagination with
limitandoffset(default: 50, max: 100). - Pending Recommendations: Returns all pending recommendations (may require pagination for large datasets).
Common Issues
Recommendations Not Generated
Symptom: No recommendations returned despite stock imbalances. Solutions:- Verify
minStockDifferencePctthreshold is appropriate - Check that
requirePositiveROIisn’t filtering out valid recommendations - Ensure source and destination locations have sufficient stock difference
- Verify locations are active and accessible
Cannot Approve Recommendation
Symptom: Error when trying to approve recommendation. Solutions:- Verify recommendation status is
PENDING - Check user has
ADMINorMANAGERrole - Ensure API key has
transfers.approvepermission - Verify recommendation hasn’t expired
Execution Fails
Symptom: Error when executing transfer. Solutions:- Verify recommendation status is
APPROVED(notPENDINGorREJECTED) - Check source location has sufficient stock
- Ensure destination location is active
- Verify shipment date is in the future