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
modifytsdate 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_ADDNLtables.
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.
- There are no records in following tables:
YFS_INVENTORY_SUPPLYYFS_INVENTORY_SUPPLY_ADDNLYFS_INVENTORY_SUPPLY_TEMPYFS_INVENTORY_DEMANDYFS_INVENTORY_DEMAND_ADDNLYFS_INVENTORY_TAGYFS_INVENTORY_NODE_CONTROLYFS_IBA_TRIGGERYFS_GLOBAL_SERIAL_NUMYFS_INVENTORY_RESERVATIONYFS_INV_OWN_TRANSFER_RCDYFS_INVENTORY_AUDITYFS_ITEM_NODE_VELOCITYYFS_ITEM_NODE_VELOCITY_DUMP
- No pending status records in
YFS_INVENTORY_PENDING_ADJandYFS_INVENTORY_MATCH. - There exist not yet posted records in
YFS_INVENTORY_SHIPMENTandYFS_INVENTORY_RECEIPT.
- 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.
- 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_RESERVATIONis 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 toY.Note:- This feature should not be used if any of the inventory org is not migrated to IV.
YFS_INVENTORY_ITEMrecords are taken up for purge consideration only if IV integration is not enabled.- The IsOrgMigratedToIV flag is available post 10.0.2403.0 release.
- Attributes
- The following are the attributes for this time-triggered transaction:
Table 1. Inventory purge attributes Attribute Value Base Transaction ID INVENTORYPRGBase 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 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
PurgedNumber 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, andYFS_INVENTORY_NODE_CONTROLtables. - Events raised
- None.
- Tables purged
-
YFS_IBA_TRIGGERYFS_INVENTORY_DEMANDYFS_INVENTORY_TAGYFS_INVENTORY_RESERVATIONYFS_INVENTORY_SUPPLYYFS_INVENTORY_NODE_CONTROLYFS_INVENTORY_ITEMYFS_ITEM_NODE_VELOCITYYFS_ITEM_NODE_VELOCITY_DUMPINV_INVENTORY_ITEM_LOCK