inventory merging.md

Inventory merging (org setting)

This organizational setting drives the Merge Inventories function by automatically consolidating identical part inventories from multiple receipts and purchase orders into a single inventory record.

This feature can be switched on and off by navigating to your Organization Settings in ION and selecting 'Merge Inventories (V2)', as shown below:

This functionality was developed to address the following challenges:

This feature provides the following:

Use Cases

✅ Use Case 1: Multiple Receipts, Different Purchase Orders

✅ Use Case 2: Multiple Receipts, Same Purchase Order

✅ Use Case 3: Non-PO Inventory Integration

Details

Note: If Merge Inventories V1 is also turned on via the feature flag, and the the V2 org setting is switched on, inventory will be merged according to V2 logic (discussed below).

How to trigger merging:

{% embed url="https://www.loom.com/share/39560d85016c4a85843591e6e5ba9011?sid=f4b21ffa-0803-457a-ac01-b047b9392fab" %}

Note: Currently, merging is only triggered by customer interaction with the UI and not by any actions from scanning.

Merge criteria

In order for inventory items to be eligible for merge, the inventory candidates must have:

  1. Same underlying part id; part must be of type 'part' and not a tool
    1. Tracking type can be untracked or lot tracked, but cannot be serial tracked
    2. If part is lot tracked, lot IDs must match
    3. A part inventory with an assigned serial number will not be merged, even if the underlying part is not serial tracked
  2. The same location, and location must be set (i.e. two inventories with no location assigned will not merge)
  3. The same status, and status must be 'available' or 'unavailable'
  4. The same unit of measurement
  5. Merge candidate cannot be installed on another inventory's aBOM
  6. Merge candidate cannot have installations on its aBOM
  7. No related purchase order lines that are in 'canceled' status
  8. No related runs
  9. No related origin runs
  10. No related issues
  11. No related part kits
  12. No related plan reservations
  13. The quantity kitted and the quantity installed both should equal zero
  14. Must not be a 'Part used to fix issue' on an issue related to another inventory

⚠️ Important Limitations:

Merge will NOT occur when the same part is referenced on different purchase order lines within the same receipt.

Relationships currently existing between merge candidates and the following objects may block a merge, resulting in an error (but no change in data) or may be lost during merge:

Additionally, foreign key references for part inventory id will not be updated in the following places:

On inventories created through a merge from inventories that have related purchase orders with different suppliers, the supplier on the inventory will be equivalent to one of the multiple suppliers associated with the merge candidates. Not all of them will be reflected on the merged inventory itself, as shown in the query below. Also in the query below it can be observed that all supplier ids associated with a merged inventory can found by looking at related purchase order lines:

If a part inventory was created by a split from an inventory that ended up being a merge candidate, but the inventory in question was later excluded from merge candidacy (i.e. moved to a different location, having an issue opened against it etc.), that inventory will be excluded from merge, but when looking at its transaction history post-merge, it will appear that the inventory has been merged when it has not:

Additionally, there may be other incorrect or incomplete transaction history line items related to an inventory being merged in this UI.

Finally, looking up transaction history on an inventory that has been merged (and thus deleted) will show an error in the UI, though the transaction history for that inventory will be available.

Differences from Merge Inventories set through Feature Flag:

  1. Criteria for assessing merge candidates for a given inventory has changed (see above)
  2. Upon merge, a new part inventory is created and the part inventories to be merged are deleted
    1. Each custom attribute that has the same value across all merge candidates will have the value copied over to the new part inventory
    2. Comments, file attachments and labels are copied over
    3. No transaction history will exist prior to the merge for the newly created merged inventory (traceability to related PO lines and receipts is maintained)
  3. Old barcodes for the inventories that were merged in will now point to the new merged inventory