Order release status purge

The Order Release Status Purge agent extends the Order Purge agent's capabilities by purging order release status records before the Order Purge agent completely purges data to history tables.

If an order meets the criteria for purging, the order release status records with quantities of 0 are deleted from the YFS_ORDER_RELEASE_STATUS table and are not put into the history table.

When the Order Release Status Purge agent has completed, the task queue's AVAILABLE_DATE is reset to the date specified by the purge criteria for Order Purge. This enables the Order Purge agent to pick up and process an order as necessary. Order Purge will continue to purge order release status records as usual.

For the Order Release Status Purge agent, create a new criteria ID. Except for the "AdditionalPurgeCode" criteria parameter value, the rest of the criteria parameter values must be same as the Order Purge agent. For the "AdditionalPurgeCode" criteria parameter, set the value as ORDER_RELEASE_STATUS_PURGE.

If the following conditions are met, the Order Purge agent purges the order release status records:

  • All conditions for Order Purge are met. For information about the conditions for Order Purge, see Order purge.
  • The order release records have 0 quantity.
  • The "AdditionalPurgeCode" criteria parameter value in the Order Purge criteria is set to ORDER_RELEASE_STATUS_PURGE.
  • The order has been modified within the Order Purge lead days, AdditionalPurgeCode.

Criteria parameters

The following are the criteria parameters for Order Release Status Purge:

Table 1. Order release status 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.
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 Optional. Enterprise for which the Order Purge needs to be run. If not passed, then all enterprises are monitored.

When the EnterpriseCode is blank, the purge criteria configured for the DEFAULT enterprise is used; not the purge criteria configured for the order's enterprise.

Live Optional. Mode in which to run. Valid values are:
  • Y - Default value. Moves qualifying records from the regular tables listed under Tables Purged to the corresponding history tables.
  • N - Test mode. Determines the rows that are moved to history tables without actually moving them.
PurgeCode Required. To extend the Order Purge agent to purge order release status records, set to ORDERPRG. Used for internal calculations, such as determining retention days. You must also set AddtionalPurgeCode.
AdditionalPurgeCode Required. To purge order release status records, set this parameter to ORDER_RELEASE_STATUS_PURGE.
Note: Valid values for AdditionalPurgeCode are ORDER_RELEASE_STATUS_PURGE and ORDERAUDITDEL. It accepts comma-separated values. For example:

ORDERAUDITDEL,ORDER_RELEASE_STATUS_PURGE

ColonyID Required in a sharded deployment where a table may exist in multiple schemas. Runs the agent for the colony.

Statistics tracked

None.

Pending job count

The pending job count is the number of records available to be processed by Order Purge with the AVAILABLE_DATE value less than or equal to (<=) the current date value in the YFS_Task_Q table.

Events raised

None.

Tables purged

YFS_ORDER_RELEASE_STATUS