Purge order details to an external system

Purge order details to an external system instead of history tables.

The current implementation of purge always moves data from transactional tables to history tables. However, the process does not produce an output that can be used by other systems. Therefore, a new user exit named YFSPurgeOrderToExternalDataStoreUE is added, which takes in the order details XML as input and returns a document denoting whether the data was stored to an external system or not.

To be able to purge order details to an external system, you must implement the YFSPurgeOrderToExternalDataStoreUE user exit. The Purge Order agent constructs an XML document that represents the records to be purged. The constructed XML document is then passed to the user exit so that users can store the data according to their business requirements.

The purgeOrder API invokes the YFSPurgeOrderToExternalDataStoreUE user exit once the order details XML is constructed. If the data is stored successfully in the external system, it is denoted by <PurgeOrderToExternalDataStore PurgedOrderToExternal=‘Y’/> in the output. Then, the data is deleted from the transactional tables in the database. If a different result is returned, the records are not deleted from the transactional database and the purge does not take place. If the user exit fails, the purge does not execute. Also, if the user exit is not implemented, the order details are purged to the history tables by default.

Note:

After you successfully integrate Sterling Order Management System Software with Archive Service and then, run the Order Archive agent, the agent archives all confirmed orders and the corresponding details from history tables to Archive Service. After archiving all confirmed orders, the Order Archive agent deletes confirmed orders from Sterling Order Management System Software.

When you implement the YFSPurgeOrderToExternalDataStoreUE user exit, orders are purged to an external system instead of purging to history tables. To leverage the functionality provided by the Archive Service to purge orders to history tables by using the Order Archive agent, ensure to disable the YFSPurgeOrderToExternalDataStoreUE user exit.

For more information about archiving confirmed orders by using the Order Archive agent, see Order Archive agent.

User Exit and Agent

To configure the user exit, go to Application Platform > System Administration > User Exit Management and find com.yantra.yfs.japi.ue.YFSPurgeOrderToExternalDataStoreUE in the user exit list. For more information, see Defining user exits.

To configure the Purge Order transaction, go to Application Platform > Process Modeling > Order Fulfillment > Transactions > Purge Order. For more information about the Order Archive agent, see Order Archive agent.