Maegham

Restore Order API

Introduction

The restoreOrder API in IBM Sterling OMS is used to restore archived or purged order back to active operational tables. This is essential in scenarios where historical order data is needed for further processing such as returns, exchange or audits.

Purpose

In IBM Sterling OMS , in the normal lifecycle of an order , once it is completed, the Purge Agent archives the order data into history tables to optimize system performance. However, certain business scenarios—like customer returns, exchanges, or compliance audits—require access to this archived data. The restoreOrder API facilitates this by rehydrating the order and its related entities into the live system.

Tables Restored by the restoreOrder API

The following relevant tables are repopulated with the restored content in sterling OMS.

  • YFS_ORDER_HEADER
  • YFS_ORDER_LINE
  • YFS_ORDER_LINE_SCHEDULE
  • YFS_ORDER_DATE
  • YFS_CHARGE_TRANSACTION
  • YFS_INVOICE_COLLECTION
  • YFS_ORDER_RELEASE
  • YFS_ORDER_RELEASE_STATUS
  • YFS_ORDER_INVOICE

Restored Components by restoreOrder API

  • Order Data Restores the complete order structure, including the order header, individual line items, and all associated details.
  • Multiple Shipments Supports restoration of orders involving multiple shipments, as well as shipments that contain multiple orders.
  • YFS_ORDER_RELEASE_STATUS Records For each release status record with a non-zero quantity.

Handling for Exchange Orders

When restoring an exchange order, the API also:

  • Restores the return order associated with the exchange.
  • Restores the original sales order linked to the return.
  • Restores all related work orders to ensure complete operational continuity.

Input Requirements

ORDER_HEADER_KEY or Order Number: To identify the archived order.

Example

  1. The order is currently marked as ‘Shipped’, indicating it has reached the final stage of the fulfillment process.
  • Verify if the order exists in the YFS_ORDER_HEADER table. If it is present, the order has not been purged.
  • The Purge Agent removed the order after all the required eligibility conditions were met. The order is now successfully purged.
  • After successful Purging , verified that the order exists in the YFS_ORDER_HEADER_H table

YFS_ORDER_HEADER_H

  • The following tables receive entries when an order is purged.
    • YFS_CREDIT_CARD_TRANSACTION_H
    • YFS_CHARGE_TRANSACTION_H
    • YFS_LINE_CHARGES_H
    • YFS_TAX_BREAKUP_H
    • YFS_ORDER_INVOICE_DETAIL_H
    • YFS_INVOICE_COLLECTION_H
    • YFS_ORDER_LINE_SCHEDULE_H
    • YFS_ORDER_LINE_H
    • YFS_ORDER_RELEASE_H
    • YFS_ORDER_RELEASE_STATUS_H
    • YFS_ORDER_AUDIT_DETAIL_H
    • YFS_ORDER_AUDIT_LEVEL_H
    • YFS_ORDER_AUDIT_H
    • YFS_PAYMENT_H
    • YFS_ORDER_DATE_H
    • YFS_ORDER_HEADER_H
  • Execute the restoreOrder API to transfer the order from the history table back to the main table.

Input XML

<RestoreOrder OrderHeaderKey=”202510150948011298317″/>

Output XML

<ApiSuccess/>

  • After the API executed successfully, the order was moved from the history table to the main table. It is now visible in the console and has been restored across all relevant tables.

YFS_ORDER_HEADER

YFS_ORDER_LINE

YFS_ORDER_RELEASE_STATUS

YFS_ORDER_LINE_SCHEDULE

YFS_CHARGE_TRANSACTION

YFS_INVOICE_COLLECTION

Conclusion

This API is critical for maintaining operational flexibility and ensuring that archived data can be reactivated when business needs arise.

 

Scroll to Top