Order history purge

This purge deletes data from history tables after it completes its typical lifecycle. This reduces the load on frequently accessed tables.

The order should have been purged and moved into the history tables before you can run this transaction. For more information about this, see Order purge.

You can use purge codes pseudo-logic to analyze purges. If the following condition is met, an order is picked up for history purge:

Any enterprise using the Console must schedule purge transactions.

For more information about Additional Purge Criteria Based on Line Type, see the Configuring Sterling Distributed Order Management.

Attributes

The following are the attributes for this time-triggered transaction:

Table 1. Order history purge attributes
Attribute Value
Base Transaction ID ORDERHISTPRG
Base Document Type Order
Base Process Type Order Fulfillment
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Order history purge criteria parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
Number of Records To Buffer Optional. Number of records to retrieve and process at one time. If left blank or specified as 0 (zero), it defaults to 5000.
EnterpriseCode Optional. Enterprise for which the Order History Purge needs to be run. If not passed, then all enterprises are monitored.
Live Optional. Mode in which to run. Valid values are:
  • Y - Default value. Removes qualifying records from the history tables listed under Tables Purged.
  • N- Test mode. Determines the rows that are removed without actually removing them.
PurgeCode Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
ColonyID Required in a multi schema deployment where a table may exist in multiple schemas. Runs the agent for the colony.

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Order history purge statistics
Statistic Name Description
NumOrderHistoriesPurged Number of order histories purged.

Pending job count

For this transaction, the pending job count is the number of records that can be purged from the YFS_Order_HEADER_H table.

Events raised

None.

Tables purged

YFS_ANSWER_SET_TRAN_H

YFS_ANSWER_TRAN_H

YFS_CHARGE_TRAN_DIST_H

YFS_CHARGE_TRAN_REQUEST_H

YFS_CHARGE_TRAN_RQ_MAP_H

YFS_CHARGE_TRANSACTION_H

YFS_CREDIT_CARD_TRANSACTION_H

YFS_ENTITY_ADDRESS_H

YFS_HEADER_CHARGES_H

YFS_INSTRUCTION_DETAIL_H

YFS_INVOICE_COLLECTION_H

YFS_LINE_CHARGES_H

YFS_NOTES_H

YFS_ORDER_AUDIT_DETAIL_H

YFS_ORDER_AUDIT_H

YFS_ORDER_AUDIT_LEVEL_H

YFS_ORDER_DATE_H

YFS_ORDER_HEADER_H

YFS_ORDER_HEADER_H_EXTENSION

YFS_ORDER_HOLD_TYPE_H

YFS_ORDER_HOLD_TYPE_LOG_H

YFS_ORDER_INVOICE_DETAIL_H

YFS_ORDER_INVOICE_H

YFS_ORDER_KIT_LINE_H

YFS_ORDER_KIT_LINE_SCHEDULE_H

YFS_ORDER_LINE_H

YFS_ORDER_LINE_H_EXTENSION

YFS_ORDER_LINE_OPTION_H

YFS_ORDER_LINE_OPTION_H_EXTENSION

YFS_ORDER_LINE_REQ_TAG_H

YFS_ORDER_LINE_SCHEDULE_H

YFS_ORDER_PROD_SER_ASSOC_H

YFS_ORDER_RELEASE_H

YFS_ORDER_RELEASE_STATUS_H

YFS_ORDER_SER_PROD_ITEM_H

YFS_PAYMENT_H

YFS_PROMOTION_AWARD_H

YFS_PROMOTION_H

YFS_RECEIVING_DISCREPANCY_DTL_H

YFS_RECEIVING_DISCREPANCY_H

YFS_REFERENCE_TABLE_H

YFS_TAX_BREAKUP_H

YIC_BOM_HEADER_H

YIC_BOM_LINE_H

YIC_BOM_MESSAGE_H

YIC_BOM_PROP_H

YFS_ADDNL_LINE_PRICE_H