Basket Recalculation

Once a customer performs any basket operation (e.g. adding items, changing item quantity, removing items), it is recommended to perform a basket recalculation. This sends the transaction to PCE via the POS Service interface and updates all prices, applies promotions, etc.

The request can be processed in the background and should not block the user interface. Once a customer is offline, the request can easily be skipped. The fallback is always to display the prices that are included in the offline master data.

For best practice, the requests should be queued:

  • All requests shall be added to a serial queue
  • The serial queue will send one request after another
  • Once a recalculate response is returned, the queue needs to be cleaned up, except for the latest request
  • Once a recalculate response is returned and an offline basket operation has occurred between the request being sent and the response, the response shall be ignored (since it would overwrite the latest offline operations)
  • Once a recalculate response is returned and no offline basket operation has occurred, the PCE response can be used to update the offline basket

Basket Operations