Order and Inventory Management Invocable Action Reference

SalesOrderAllocateAction

Reserves available on-hand inventory for every line of a sales order, following FIFO logic, up to the quantity ordered, then updates the order's shipment status. Use it when a user or agent wants to allocate or commit stock to a sales order so it can be approved, picked and shipped. The allocation runs in a batch (asynchronously): the action launches the batch and returns the batch job ID, so the result can be tracked, and the resulting shipment status is available once the job finishes. Optionally, it submits each order for approval when Submit for Approval is true. It does not pick, ship, bill or purchase stock. It accepts one or more sales orders and processes them in bulk, so pass every order you want allocated in a single call. Input per order: the sales order ID, optionally whether to submit it for approval, and optionally the batch size (how many sales orders are processed per batch; it defaults to 3). Output per order: whether the allocation batch was launched, the launched batch job ID and any error message.

PropertyValue
LabelFully Allocate a Sales Order
CategoryOrder and Inventory Management
SinceSummer 2026
Read-onlyNo
Supports AgentsYes
Supports FlowsYes
Async ActionYes
Keywordsallocate, reserve, commit, stock, inventory, sales order

Request Parameters

FieldTypeLabelDescriptionRequired
salesOrderIdIdSales Order IDThe Salesforce record ID of the Sales Order (Sales_Order__c) to fully allocate. Available on-hand inventory is reserved for every line of this order. It must be a valid ID of an existing sales order. This is mandatory.Yes
approveBooleanSubmit for ApprovalIndicates whether or not the sales order needs to be submitted for approval after it has been allocated. Set it to true to allocate and submit for approval in one step. Leave false (the default) to only allocate the stock. This is optional.No
batchSizeIntegerBatch SizeThe number of sales orders to process together in a single batch. Larger batches process more orders per transaction but are more likely to hit Salesforce governor limits. If one order in a batch fails, the whole batch is rolled back, so a smaller size isolates failures. It defaults to 3 when not specified. This is optional.No

Response Parameters

FieldTypeLabelDescriptionRequired
salesOrderIdIdSales Order IDThe 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 allocated in one call.No
isSuccessBooleanSuccessful Batch JobThis is true when the allocation batch was launched for this order. It is false when it could not be launched (for example, the ID is invalid or the batch could not be queued). Because allocation runs asynchronously, success means the batch started, not that the order is fully allocated: check the order's shipment status once the batch job has finished.No
batchJobIdIdBatch Job IDThe ID of the Async Apex Job that performs the allocation. Use it to track the batch to completion and to read the resulting shipment status afterwards. It is empty when the batch could not be launched for this order.No
messageStringMessageError message explaining why the allocation batch could not be launched for this order. It is empty if the batch is successful. Surface this text to the user to explain what to fix (for example, an invalid sales order ID).No
© Copyright 2009–2026 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.