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:

  1. Set enableUpdateSettings property to true on the OrderQueueSettings component.
  2. Set the enabled flag using orderRetrySettings admin endpoint:
    /ccadminui/v1/merchant/orderRetrySettings PUT
    {
    "enabled": true
    }
  3. 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 method isPlaceAsyncOrder in cc-store-configuration.js using applicationJS. 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).
  4. Set appropriate asyncSubmitRetryDelays using orderRetrySettings admin endpoint:
    /ccadminui/v1/merchant/orderRetrySettings PUT
    {
    "asyncSubmitRetryDelays": [15,20,...]
    }

    Note: The default asyncSubmitRetryDelays values are 10,25,65,125,185

  5. 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
    }