Inventory purge

The Inventory purge removes inventory data from the system that reduces the load on the frequently accessed tables. You can use the purge codes pseudo-logic to analyze purges.

For YFS_INVENTORY_SUPPLY, if the following conditions are met, an inventory supply is picked up for purge:

  • Supply record has the same availability type as the node. For example, TRACK or INFINITE.
  • Supply record has 0 quantity and modifyts date is earlier than the system date minus the retention days of purge criteria.
  • Supply record does not contain the supply type INFO.

For YFS_INVENTORY_DEMAND, if the following conditions are met, an inventory demand is picked up for purge:

  • Demand record has 0 quantity and demand ship date is earlier than the system date minus the retention days of purge criteria.
  • Demand record does not have demand details as well as matching demand record in YFS_INVENTORY_DEMAND_ADDNL tables.
Note: While using the Hot SKU Optimistic Lock Avoidance functionality, demand or supply tables can have multiple records for unique supply or unique demand key with all the matching attributes. You can set property yfs.purge.MergeDemandSupplyMultiRec to true to merge these records before purging. Only those records that are qualifying for demand or supply purge can be merged.

For YFS_INVENTORY_TAG, it is purged if the INVENTORY_TAG_KEY is not used by any of the existing supply and demand.

For YFS_INVENTORY_RESERVATION, an inventory reservation is picked up for purge if it meets the following conditions:

  • Inventory reservation record has 0 quantity or expiration date is earlier than the system date minus the purge criteria's retention days.

For YFS_INVENTORY_NODE_CONTROL, it is purged if the INV_PIC_INCORRECT_TILL_DATE is earlier than the current time stamp minus the retention days of the purge criteria.

For YFS_IBA_TRIGGER, it is purged if IBA_REQUIRED = 'N', IBA_RUN_REQUIRED = 'N', and LAST_IBA_PROCESSED_TS is earlier than the current time stamp minus the retention days of the purge criteria.

For YFS_INVENTORY_ITEM, an inventory item is purged if following conditions are met.

  1. There are no records in following tables:
    • YFS_INVENTORY_SUPPLY
    • YFS_INVENTORY_SUPPLY_ADDNL
    • YFS_INVENTORY_SUPPLY_TEMP
    • YFS_INVENTORY_DEMAND
    • YFS_INVENTORY_DEMAND_ADDNL
    • YFS_INVENTORY_TAG
    • YFS_INVENTORY_NODE_CONTROL
    • YFS_IBA_TRIGGER
    • YFS_GLOBAL_SERIAL_NUM
    • YFS_INVENTORY_RESERVATION
    • YFS_INV_OWN_TRANSFER_RCD
    • YFS_INVENTORY_AUDIT
    • YFS_ITEM_NODE_VELOCITY
    • YFS_ITEM_NODE_VELOCITY_DUMP
  2. No pending status records in YFS_INVENTORY_PENDING_ADJ and YFS_INVENTORY_MATCH.
  3. There exist not yet posted records in YFS_INVENTORY_SHIPMENT and YFS_INVENTORY_RECEIPT.

Inventory purge also supports the following additional features:

Selective table purge

You can configure inventory purge to selectively purge the specific entities which can be configured under agent criteria parameter TableCode using comma-separated values. However, purge conditions for each of the entities remain same even if it is taken up for purge consideration through selective purge.

The complete list of entities supporting selective purge are listed under Tables Purged.

Inventory Purge with Sterling Intelligent Promising Inventory Visibility integration (Phase 2)

Upon successful migration from Sterling Global Inventory Visibility to Sterling Intelligent Promising Inventory Visibility (Phase 2), the data in YFS_INVENTORY_SUPPLY, YFS_INVENTORY_DEMAND & YFS_INVENTORY_RESERVATION is no longer updated or referred to by the application. Hence, you can configure Inventory purge to purge the data in the mentioned tables irrespective of quantity by setting the criteria parameter IsOrgMigratedToIV to Y.
Note:
  • This feature should not be used if any of the inventory org is not migrated to IV.
  • YFS_INVENTORY_ITEM records are taken up for purge consideration only if IV integration is not enabled.

Any enterprise that uses the Console must schedule purge transactions.

Note: When the Promising server is being used, this transaction is not called on the Order server.

Attributes

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

Table 1. Inventory purge attributes
Attribute Value
Base Transaction ID INVENTORYPRG
Base Document Type General
Base Process Type General
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Inventory 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 The inventory organization for which the Inventory Purge needs to be run.
Live Optional. Mode in which to run. The 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. 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 sharded deployment where a table may exist in multiple schemas. Runs the agent for the colony.
TableCode
  • Optional. Used in case of selective table purge. This parameter holds comma-separated list of tables to be purged. The complete list of entities supporting selective purge are listed under Tables purged.
  • Data type: Text - 400
IsOrgMigratedToIV
  • Optional. To be specified when the transaction is being used with IV integration enabled. Used for internal evaluation. Valid values are as follows:
    • N - Default value
    • Y - Indicates that inventory org has IV integration enabled

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Inventory purge statistics
Statistic Name Description
NumInventoryDemandsPurged Number of inventory demands purged.
NumInventoryNodeControlsPurged Number of inventory node controls purged.
NumInventoryReservationsPurged Number of inventory reservations purged.
NumInventoryTagsPurged Number of inventory tags purged.
NumItemBasedAllocationTriggers
Purged
Number of item based allocation triggers purged.

Pending job count

For this transaction, the pending job count is the total number of records that can be purged from the YFS_INVENTORY_SUPPLY, YFS_INVENTORY_DEMAND, YFS_INVENTORY_TAG, YFS_INVENTORY_RESERVATION, YFS_IBA_TRIGGER, and YFS_INVENTORY_NODE_CONTROL tables.

Events raised

None.

Tables purged

  • YFS_IBA_TRIGGER
  • YFS_INVENTORY_DEMAND
  • YFS_INVENTORY_TAG
  • YFS_INVENTORY_RESERVATION
  • YFS_INVENTORY_SUPPLY
  • YFS_INVENTORY_NODE_CONTROL
  • YFS_INVENTORY_ITEM
  • YFS_ITEM_NODE_VELOCITY
  • YFS_ITEM_NODE_VELOCITY_DUMP
  • INV_INVENTORY_ITEM_LOCK