Modifying an order document type's purge criteria rule

You can modify an order document type’s purge criteria rule.

About this task

To modify an order document type's purge criteria rule:


  1. From the tree in the application rules side panel, choose Document Specific > (Document Type) > Purge Criteria. The Purge Criteria List window displays in the work area.
  2. Enter information in the applicable fields. Refer to Table 1 for field value descriptions.
  3. Choose the Save icon.
    Table 1. Purge criteria details pop-up window.

    Purge criteria field value descriptions

    Field Description
    Purge Code Identifies a purge program. This is a system defined code.
    Description Describes the type of purge.
    Rollback Segment Defines the rollback segment that should be explicitly used for the purge transaction qualified by the purge code. This is useful when there are huge logical data sets that have to be purged. This is optional and used for order related purges.
    Retention Days Enter the number of days the data is to be retained in the database (going backwards from the time the program runs). Make sure that your table size takes into account the number of retention days entered here.
    Write to Log File Check this box if you want purged data written to a log file. The log file can be backed up and used as a journal at a later date.
    Log File Name Enter a log file name. The log file is created in the directory specified in the yfs.purge.path property. If this is not passed, it defaults to the value specified in the file. If a variable is introduced, then the yfs.purge.path is ignored.

    To override this property, add an entry for it in the <INSTALL_DIR>/properties/ file.

    Additional Purge Criteria

    These parameters are used to override the order history purge retention days. This override is configured based on the line types within each order defined at the enterprise and document type levels.

    Note: These additional parameters can be defined only for order history purge (ORDHISTPRG) criteria.
    Line Type Select the line types from the drop-down list.
    Additional Retention Days Enter the additional number of days (apart from the retention days specified by the order history purge) the data is to be retained in the database. Make sure that your table size takes into account the number of retention days entered here.
    Note: To be considered for additional retention days, the order line must have at least some quantity that is not cancelled or shorted.
    Note: The history purge date cannot be reset when you restore the order after it was purged. For example, if an order is purged with a history purge date of 20070801 and when the order is restored in the year 2006, the history purge date still remains as 20070801.


The following example provides an use-case of the line type purge in an order placement scenario:

An order is placed with the following 4 order lines:

  • Order Line 1 - Television
  • Order Line 2 - 2 year Television service plan with Line Type as 2YR_WARRANTY. Therefore, the additional retention days are 721.
  • Order Line 3 - Stereo
  • Order Line 4 - 4 year Stereo service plan with Line Type as 4YR_WARRANTY. Therefore, the additional retention days are 1451.

Assume that the order is set to be purged after 30 days. On day 1, the order moves into a purgeable status. On day 30, the order is purged to the history table. The purge history date is set as:

Today + 10 + Maximum(721, 1491) = 1491 days, where 10 is the number of retention days for the history purge.

On day 40, the history purge agent does not pick up this order to purge, since the purge history date is set. Rather, the order is purged from the history on day 1491.