Running the InventorySnapshot agent

The InventorySnapshot agent provides a snapshot of your inventory picture and helps you to sync supplies and demands to Sterling Intelligent Promising Inventory Visibility.
Note:
  • Before you run the InventorySnapshot agent to sync supplies and demands to Sterling Intelligent Promising Inventory Visibility, run the following agents:
    • Inventory Purge agent to improve the performance of the snapshot agent by reducing unnecessary calls to Sterling Intelligent Promising Inventory Visibility.
    • Consolidate Additional Inventory agent to consolidate quantity in the demand and supply additional records back into the base YFS_INVENTORY_DEMAND or YFS_INVENTORY_SUPPLY tables.

      For more information about the Consolidate Additional Inventory agent, see Consolidate Additional Inventory.

  • During downtime, run the InventorySnapShot agent to avoid data inconsistency.

Attributes

Table 1. INV_SUPPLY_SYNC agent criteria
Attribute Description Default Value
NumberOfObjectsPerJob The number of objects to batch in the event. 100
NumberOfRecordsToBuffer The number of records to retrieve and process at one time. 5000
Object The object to synchronize supply or demand. Supply

The getJobs queries for supply are ordered by the Inventory_Supply_Key. The getJobs continues from the last message that contains the last inventory_supply_key. Each job is a collection of NumberOfObjectsPerJob supplies.

The executeJob raises the SUPPLY_SYNC event for the supplies as follows:
<Supplies>
    <Supply ETA="" InventoryItemKey="" InventoryOrganizationCode="" ItemID="" OwnerKey="" Quantity="" Segment="" 
    SegmentType="" ShipByDate="" ShipNode=""  SourceTs="" SupplyLineReference=""
    SupplyReference="" SupplyReferenceType="" SupplyType="" UnitOfMeasure="">
	<Tag BatchNo="" LotAttribute1="" LotAttribute2="" LotAttribute3="" LotKeyReference=""
	LotNumber="" ManufacturingDate="" RevisionNo=""/>
    </Supply>
</Supplies>
Table 2. INV_DEMAND_SYNC agent criteria
Attribute Description Default Value
NumberOfObjectsPerJob The number of objects to batch in the event. 100
NumberOfRecordsToBuffer The number of records to retrieve and process at one time. 5000
Object The object to synchronize supply or demand. Demand

The getJobs queries for YFS_Inventory_Demand are ordered by the Inventory_Demand_Key. The getJobs continues from the last message that contains the last inventory demand key. Each job is a collection of NumberOfObjectsPerJob demands.

The executeJob raises the DEMAND_SYNC event for demands as follows:
<Demands>
    <Demand DemandCancelDate="" DemandReference="" DemandReferenceType="" DemandShipDate=""
    DemandType="" InventoryItemKey="" InventoryOrganizationCode="" ItemID="" MinShipByDate=""
    ProductClass="" Quantity="" Segment="" SegmentType="" ShipNode=""  SourceTs=""  UnitOfMeasure="">
    <Tag BatchNo="" LotAttribute1="" LotAttribute2="" LotAttribute3="" LotKeyReference=""
    LotNumber="" ManufacturingDate="" RevisionNo=""/>
    </Demand>
</Demands>

Statistics tracked

None.

Pending job count

None.

Events raised

Enable the following events at the Hub level.

Transaction/Event Key Data Data Published Template Support
INV_SNAPSHOT.SUPPLY_SYNC None INV_SNAPSHOT.SUPPLY_SYNC.xml Yes
INV_SNAPSHOT.DEMAND_SYNC None INV_SNAPSHOT.DEMAND_SYNC.xml Yes

Troubleshooting - Cleaning up additional negative demands before running InventorySnapshot agent

Typically, there is a single demand and supply record in YFS_INVENTORY_DEMAND and YFS_INVENTORY_SUPPLY tables respectively for a given combination of unique identifiers. However, in certain cases, it is possible that multiple such records might exist in above tables for the same combination of unique identifiers. In such cases, you must do the following to clean the additional negative demands before running the InventorySnapshot agent:
  1. Set the property yfs.purge.MergeDemandSupplyMultiRec=true and run the Inventory Purge agent.
  2. Set the property yfs.inventorySnapshot.DemandSupplyMultiRec=true.