SalesOrderReverseAllocateAction
Releases the inventory previously reserved for a sales order, returning that stock to available on-hand, resets the affected lines to an unallocated state and updates the order's shipment status. Use it when a user or agent wants to undo or cancel the allocation of a sales order (or of specific lines on it) so the reserved stock goes back to available. By default, it reverse allocates every eligible line on the order. Add specific Sales Order Line IDs to reverse allocate only those lines. It does not cancel, delete or un-approve the order itself, and does not pick, ship or bill. An order that was never allocated or is in a state that cannot be reverse allocated cannot be processed. It accepts one or more sales orders and processes them in bulk, so pass every order you want reverse allocated in a single call. Input per order: the sales order ID, and optionally, the specific sales order line IDs to reverse allocate. Output per order: whether it succeeded, the resulting shipment status and any error message.
| Property | Value |
| Label | Fully Reverse Allocate a Sales Order |
| Category | Order and Inventory Management |
| Since | Summer 2026 |
| Read-only | No |
| Supports Agents | Yes |
| Supports Flows | Yes |
| Async Action | No |
| Keywords | reverse, unallocate, deallocate, release, stock, sales order |
Request Parameters
| Field | Type | Label | Description | Required |
salesOrderId | Id | Sales Order ID | The Salesforce record ID of the Sales Order (Sales_Order__c) to reverse allocate. The inventory reserved for this order is released back to available stock. It must be a valid ID of an existing sales order. This is mandatory. | Yes |
salesOrderLineIds | List<Id> | Sales Order Line Items IDs | Optional list of Sales Order Line Item (Sales_Order_Line_Item__c) IDs to reverse allocate. When provided, only these lines on the order are reverse allocated. When omitted or empty, every eligible line on the order is reverse allocated. This is optional. | No |
Response Parameters
| Field | Type | Label | Description | Required |
salesOrderId | Id | Sales Order ID | The ID of the sales order that was processed. It echoes the requested ID, so each result can be matched back to its request when several orders are reverse allocated in one call. | No |
isSuccess | Boolean | Successful Action | It is set to True when the reverse allocation ran without errors for this order. It is set to False when it failed (for example, the order was never allocated, is in a state that cannot be reverse allocated, the ID is invalid, or another business rule blocked it). Inspect shipment status to confirm the order returned to an unallocated state. | No |
shipmentStatus | String | Shipment Status | The order's resulting shipment status after the attempt. After a successful reverse allocation, this reflects the unallocated state of the order. It is empty when the sales order could not be found. | No |
message | String | Message | Error message explaining why the reverse allocation did not complete for this order. It is empty when the action is successful. Surface this text to the user to explain what to fix (for example an order that was never allocated). | No |
|