Received file with the Name of Innnnnyyyymmdd.INV On FTP server
Below are details:-
the file name starts with the capital letter I
followed by the supplier number as provided by Client
padded out with leading zeros. nnnnn
followed by a datestamp in the format yyyymmdd
followed by the file name extension .INV
Then This will become YantraMessageGroupID for particular set of Inventory Update Innnnnyyyymmdd,
Now The loadInventoryMismatch API is used for inserting inventory supply information into the YFS_INVENTORY_SUPPLY_TEMP table to be processed by the syncLoadedInventory API during the inventory synchronization process.
Note: if the same inventory supply already exists for the same YantraMessageGroupID in the YFS_INVENTORY_SUPPLY_TEMP table, it will not be inserted.
After that The syncLoadedInventory API is used for comparing and applying differences between the inventory supply information in the YFS_INVENTORY_SUPPLY_TEMP table (loaded by the loadInventoryMismatch API) and the inventory supply kept within the system, which stores in the YFS_INVENTORY_SUPPLY table. If there are any records in the YFS_INVENTORY_SUPPLY_ADDNL table with the processing node, the API will consolidate them into the YFS_INVENTORY_SUPPLY table before retrieving and applying differences. Inventory differences can be automatically applied and inventory supplies in the YFS_INVENTORY_SUPPLY table will be adjusted based upon the differences.
The ON_INV_MISMATCH event will be raised to publish the inventory differences for each item. During the synchronization process, unsuccessful inventory updates will be collected as unprocessed differences. Lastly, the ON_INV_SYNC_SUCCESS will be raised at the end of the synchronization process and publish any unprocessed differences if any.
Now If you want to check the activity of updated Inventory and order inventory then you can check in yfs_inventory_audit Table using below query for particular item and date.
select * from yfs_inventory_audit where inventory_audit_key like '20170805%' and ITEM='ITEMID';
Scenario 1:
a. Lets assume Item_A had quantity of 5 for Node1
b. XML message received with Item_A with Quantity as 5 for Node1
c. loadInventoryMismatch api called
What is expected here ?
Option 1: No record created in YFS_INVENTORY_SUPPLY_TEMP
Option 2: Record inserted into YFS_INVENTORY_SUPPLY_TEMP
Option 3: Exception
Answer : Option 2, record gets insert into supply temp table. But when syncLoadedInventory called no inventory mis-match found. So inventory not added.
Notice: Trying to access array offset on value of type null in /home/activeki/blog.activekite.com/wp-content/plugins/wpforo/wpf-themes/classic/layouts/3/post.php on line 62
Load & Sync Simple Words : The Inventory first inserted into YFS_INVENTORY_SUPPLY_TEMP table and then the “syncLoadedInventory” process compares
the Inventory between YFS_INVENTORY_SUPPLY_TEMP and YFS_INVENTORY_SUPPLY table.
This process also takes into consideration records in YFS_INVENTORY_SUPPLY_ADDNL. The difference is updated into YFS_INVENTORY_SUPPLY table.
Notice: Trying to access array offset on value of type null in /home/activeki/blog.activekite.com/wp-content/plugins/wpforo/wpf-themes/classic/layouts/3/post.php on line 62