When the associate touches the Suspend
button on the shopping cart page, the Suspend modal dialog displays:

The Suspend Modal Dialog
When this modal is opened, ASA calls the Oracle Commerce Platform server with a request to re-price the Order, including the tax charges. This lets the associate review the final charges before committing to suspending the order.
In ASA taxes are implemented with a simple 5% tax calculator, but you could integrate with your existing tax service in an actual implementation. The default is not to perform a tax calculation.
The next step is triggered whenever the user touches the Suspend
button within the confirmation modal. Once this step is taken, the order is suspended and can no longer be edited in ASA. This button triggers two operations:
From ASA to CSC, the order is marked as suspended using
suspendOrderActor.xml
.From ASA to ORMPOS, in
ATGPOSManager.m
, the series of calls are initiated that change the ORMPOS representation of the ATG Order (a transaction) to a suspended state.
To avoid a potential mismatch between the two systems, the ATG order is first marked as suspended, and then made read-only to effectively lock the order before attempting to suspend it to ORMPOS. In this way, if the call to ORMPOS to suspendTransaction
fails, the order can be unlocked by setting its status back to incomplete. For code level details, see the suspendOrderActor.xml
configuration in Mobile/DCS-CSR/MPOS/REST/config/atg/commerce/custsvc/order.
Once the order has been marked as suspended on the Oracle Commerce Platform server, a series of ORMPOS calls are triggered:
From ASA to ORMPOS
Displaying and Printing the Order/Transaction Barcode
From ASA to ORMPOS
loadExternalOrder
is invoked at:
/order/{version}/{storeID}/{registerID}/loadExternalOrder/{orderID}
This is a synchronous call, which means that the request thread will either get a response or time out. If the request times out, the call is attempted a second time, and ORMPOS detects that this is a second call, and does not restart the entire operation from the beginning, which helps avoid a potential for a repeating request loop. ASA limits the number of repeating requests to ten, as an extra safe guard against looping timed-out requests. Once there is a successful response from ORMPOS, the transaction ID for the order is obtained from that response and the transaction ID is then used to suspend the transaction.
ASA calls:
/saletxn/1.0/{storeID}/{registerID}/{txnID}/suspend
The transaction ID is passed along with this call.