Draft order purge
This purge archives data into history tables after a specified interval, which in turn, reduces the load on frequently accessed tables. For information about purging draft orders from history tables, see Draft order history purge.
Sterling™ Order Management System does not provide a transaction for draft order purges. If you are defining a transaction that purges draft orders, refer to the following Criteria Parameters section for details about the transaction criteria.
If you do not want to define your own transaction to purge draft orders, you can use the Order Purge transaction and specify DRAFTORDERPRG for the PurgeCode. To configure the Order Purge transaction for draft order purges, refer to Order purge for more information.
All the enterprise using the Console must schedule purge transactions.
Draft orders are picked up by the agent for validation when the following conditions are met:
- Draft order flag is set to Y.
- Modifyts is set for the retention date.
After the draft orders are picked up, each draft order is validated for purging based on the following conditions:
- No eligible order release status records (records with a status larger than zero) exist for the order.
- All the open child orders (derived, chained, return, exchange, or refund fulfillment) for the order are already purged.
If a draft order meets the set of conditions for validation listed earlier, the agent continues to verify the draft orders against the following criteria:
- Contains the Draft Created (1000) status, and all the extended Draft Created statuses.
- Does not have an order release status record that does not meet the retention days.
- The order's last modification should be before the lead time (in days) setup.
- In the case when an exchange order is part of a return order, the exchange order should be purged from history tables before the return order is purged.
- In the case of an order line reservation, the draft order cannot be purged.
- If the Draft Order Payment Processing flag is set to N, the draft orders are purged.
- If the Draft Order Payment Processing flag is set to Y and a charge exists on a draft order, the draft order is not purged. However, authorizations are not considered when validating draft orders for purge.
- For order lines, except service order lines:
- If the Seller inventory update is required, the Status Inventory Type has the Update Seller Supply option turned on, and the Seller Supply Type is Onhand, or blank. (The Seller Supply Type can also be a custom seller supply type, with the Onhand Supply check box enabled.)
- If the Seller Demand Type is blank.
- If the Buyer inventory update is required, and the Buyer Supply Type is Onhand, or blank.
Criteria parameters
The following are the criteria parameters for defining a draft order purge transaction:
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. |
Next Task Queue Interval | Optional. Specifies (in hours) how long a failed task should be suspended before it is considered for reprocessing. Defaults to 5 hours. |
EnterpriseCode | Required. Enterprise for which the Draft Order Purge has to
be run. If not passed, all the enterprises are monitored. When the EnterpriseCode is blank, the purge criteria configured for the DEFAULT enterprise is used, and not the purge criteria configured for the draft order's enterprise. |
Live | Optional. Mode in which to run. Valid values are:
|
PurgeCode | Required. Set to DRAFTORDERPRG. Used for internal calculations, such as determining retention days. Corresponds to 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
None.
Events raised
None.
Tables purged
YFS_ACTIVITY_DEMAND
YFS_ANSWER_SET_TRAN
YFS_ANSWER_TRAN
YFS_CHARGE_TRANSACTION
YFS_CHARGE_TRAN_DIST
YFS_CREDIT_CARD_TRANSACTION
YFS_ENTITY_ADDRESS
YFS_HEADER_CHARGES
YFS_INSTRUCTION_DETAIL
YFS_INVOICE_COLLECTION
YFS_LINE_CHARGES
YFS_MONITOR_ALERT
YFS_NOTES
YFS_ORDER_AUDIT
YFS_ORDER_AUDIT_DETAIL
YFS_ORDER_AUDIT_LEVEL
YFS_ORDER_HEADER
YFS_ORDER_HEADER_EXTENSION
YFS_ORDER_HOLD_TYPE
YFS_ORDER_HOLD_TYPE_LOG
YFS_ORDER_INVOICE
YFS_ORDER_INVOICE_DETAIL
YFS_ORDER_KIT_LINE
YFS_ORDER_KIT_LINE_SCHEDULE
YFS_ORDER_LINE
YFS_ORDER_LINE_EXTENSION
YFS_ORDER_LINE_OPTION
YFS_ORDER_LINE_REQ_TAG
YFS_ORDER_LINE_RESERVATION
YFS_ORDER_LINE_SCHEDULE
YFS_ORDER_LINE_SRC_CNTRL
YFS_ORDER_PROD_SER_ASSOC
YFS_ORDER_RELEASE
YFS_ORDER_RELEASE_STATUS
YFS_ORDER_SER_PROD_ITEM
YFS_ORDER_DATE
YFS_PAYMENT
YFS_PMNT_TRANS_ERROR
YFS_PROMOTION
YFS_PROMOTION_AWARD
YFS_RECEIVING_DISCREPANCY
YFS_RECEIVING_DISCREPANCY_DTL
YFS_REFERENCE_TABLE
YFS_TAX_BREAKUP