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 before the system date minus the retention days of the 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 the purge criteria.
- Demand record does not have demand details and matching demand record in
YFS_INVENTORY_DEMAND_ADDNL
tables. -
Note: When you use Hot SKU Optimistic Lock Avoidance, demand or supply tables might have multiple records for unique supply or unique demand key with all the matching attributes. You can set the
yfs.purge.MergeDemandSupplyMultiRec
property totrue
to merge these records before the purge. 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 ship date is earlier than the system date minus the retention days of the purge criteria.
For YFS_INVENTORY_NODE_CONTROL
, it is purged if the INV_PIC_INCORRECT_TILL_DATE
is earlier than the current timestamp 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 timestamp 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 the 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
- No pending status records in
YFS_INVENTORY_PENDING_ADJ
andYFS_INVENTORY_MATCH
. - There exist not yet posted records in
YFS_INVENTORY_SHIPMENT
andYFS_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)
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
. - 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.
Attributes
The following are the attributes for this time-triggered transaction:
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:
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. Valid values are as follows:
|
PurgeCode |
|
ColonyID | Required in a multi-schema deployment where a table might exist in multiple schemas. Runs the agent for the colony. |
TableCode |
|
IsOrgMigratedToIV |
|
Statistics tracked
The following statistics are tracked for this transaction:
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