Enable asynchronous orders flow
You can receive orders and process them asynchronously without waiting for the client response. Processing performance can be improve in situations where you have orders with large numbers of items (greater than 250).
To enable async order support feature in production, perform the following steps:
- Set
enableUpdateSettings
property to true on theOrderQueueSettings
component. - Set the
enabled
flag usingorderRetrySettings
admin endpoint:/ccadminui/v1/merchant/orderRetrySettings PUT { "enabled": true }
- Use
placeOrderAsync
flag in the submit order request at order level. Set it as true to enable async submit for an order. While placing an order through UI, merchant has to override methodisPlaceAsyncOrder
incc-store-configuration.js
usingapplicationJS
. This method will contain the logic to decide whether to place an order asynchronously or not. OOTB, the order is placed synchronously through UI (unless resilient orders feature is enabled, in which case, order will follow the resilient order submit flow). - Set appropriate
asyncSubmitRetryDelays
usingorderRetrySettings
admin endpoint:/ccadminui/v1/merchant/orderRetrySettings PUT { "asyncSubmitRetryDelays": [15,20,...] }
Note: The default
asyncSubmitRetryDelays
values are 10,25,65,125,185 - To move a QUEUED order to INCOMPLETE state rather than SUSPENDED state(default) once retries are exhausted and the latest error is of input kind:
/ccadminui/v1/merchant/orderRetrySettings PUT { "moveToIncompleteStateOnInputError" : true }