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
enableUpdateSettingsproperty to true on theOrderQueueSettingscomponent. - Set the
enabledflag usingorderRetrySettingsadmin endpoint:/ccadminui/v1/merchant/orderRetrySettings PUT { "enabled": true } - Use
placeOrderAsyncflag 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 methodisPlaceAsyncOrderincc-store-configuration.jsusingapplicationJS. 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
asyncSubmitRetryDelaysusingorderRetrySettingsadmin endpoint:/ccadminui/v1/merchant/orderRetrySettings PUT { "asyncSubmitRetryDelays": [15,20,...] }Note: The default
asyncSubmitRetryDelaysvalues 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 }