Skip to content

URS-049 · Parse Uniphar ASN messages and update inventory

Status: PASS  ·  Duration: 1m 37s  ·  Run Date: April 18, 2026


PASS

Step 1: Pre-ASN inventory


PASS

Step 3: Intake email list (ASN received)


Step 4: Intake email detail (parsed ASN body)

Section titled “Step 4: Intake email detail (parsed ASN body)”
PASS

Step 4: Intake email detail (parsed ASN body)


PASS

Step 5: Import job log (ASN parsed)


Step 6: Shipping package detail (pre-delivery)

Section titled “Step 6: Shipping package detail (pre-delivery)”
PASS

Step 6: Shipping package detail (pre-delivery)


Step 8: Shipping package detail (delivered)

Section titled “Step 8: Shipping package detail (delivered)”
PASS

Step 8: Shipping package detail (delivered)


Step 9: Inventory after ASN delivery (lots materialized)

Section titled “Step 9: Inventory after ASN delivery (lots materialized)”
PASS

Step 9: Inventory after ASN delivery (lots materialized)

intake_emails row exists for the Uniphar ASN

Section titled “intake_emails row exists for the Uniphar ASN”
PASS

intake_emails from notifications@secure-wms.com matched the URS-049 rule and was stored.

SELECT id, "from", "to", subject, matched_rule_id, received_at
FROM intake_emails
WHERE matched_rule_id = $1 AND received_at >= $2
ORDER BY received_at DESC
LIMIT 1
idfromtosubjectmatched_rule_idreceived_at
019d9e02-18dd-7a11-bc07-e50eb184ade4notifications@secure-wms.comzurimed.asn@agent.getdeviceflow.comrequested transaction notification01950049-0049-7049-8049-0000000000022026-04-18T00:33:50.819Z

import_jobs row completed for the Uniphar ASN

Section titled “import_jobs row completed for the Uniphar ASN”
PASS

import_jobs.status=complete with packagesCreated=1 and itemsAdded=3.

SELECT id, status, info
FROM import_jobs
WHERE organization_id = $1 AND import_config_id = $2 AND created_at >= $3
ORDER BY created_at DESC
LIMIT 1
idstatusinfo
019d9e02-18e5-7559-be02-8c8cb3312f4ecomplete[object Object]

shipping_packages row created for the Uniphar ASN

Section titled “shipping_packages row created for the Uniphar ASN”
PASS

A shipping_packages row with the ASN tracking number was created, routed to BOSS-001.

SELECT id, tracking_number, carrier, destination_location_id
FROM shipping_packages
WHERE organization_id = $1 AND created_at >= $2 AND tracking_number = $3
idtracking_numbercarrierdestination_location_id
019d9e02-18f6-76c4-bdd2-3d69903c7d93391472417837fedex1c8ef1cb-e333-48da-a893-4d3cc4d210db

shipping_package_items has 3 rows with correct quantities

Section titled “shipping_package_items has 3 rows with correct quantities”
PASS

Each ASN SKU line produced a shipping_package_items row with the expected quantity.

SELECT spi.id, spi.quantity, spi.info
FROM shipping_package_items spi
JOIN shipping_packages sp ON sp.id = spi.package_id
WHERE sp.organization_id = $1 AND sp.created_at >= $2
ORDER BY spi.source_file_row ASC NULLS LAST, spi.id ASC
idquantityinfo
019d9e02-18f8-7297-b78e-5c484cafa0253[object Object]
019d9e02-18f8-7297-b78e-5c49206d767b5[object Object]
019d9e02-18f8-7297-b78e-5c4ad0a4ac2c2[object Object]

PASS

shipping_packages.status=delivered after PackageTracker.mockUpdate.

SELECT id, status, delivered_at, destination_location_id
FROM shipping_packages
WHERE organization_id = $1 AND created_at >= $2 AND tracking_number = $3
idstatusdelivered_atdestination_location_id
019d9e02-18f6-76c4-bdd2-3d69903c7d93delivered2026-04-18T00:34:08.112Z1c8ef1cb-e333-48da-a893-4d3cc4d210db

inventory_items materialized for each ASN line

Section titled “inventory_items materialized for each ASN line”
PASS

One inventory_items row per ASN (productId, lot) at BOSS-001 with quantity_ready matching the ASN.

SELECT ii.id, ii.product_id, ii.lot, ii.quantity_ready, ii.real_world_location_id
FROM inventory_items ii
WHERE ii.organization_id = $1
AND ii.product_id = ANY($2)
AND NOT (ii.id = ANY($3))
idproduct_idlotquantity_readyreal_world_location_id
019d9e03-3e62-714b-b8f2-ad3392215e8c01989ca2-6a54-7834-8376-06a0251bacd8LOT-URS049-SP-A131c8ef1cb-e333-48da-a893-4d3cc4d210db
019d9e03-3e63-7d9c-b46b-8dd0dfee147101989ca1-f2f8-7ab7-8269-7179342797ccLOT-URS049-FL-B251c8ef1cb-e333-48da-a893-4d3cc4d210db
019d9e03-3e63-7d9c-b46b-8dd17cd26bf401984270-64c1-76da-aa82-eaf3f0a8326bLOT-URS049-MR-C321c8ef1cb-e333-48da-a893-4d3cc4d210db

inventory_history rows recorded for the ASN delivery

Section titled “inventory_history rows recorded for the ASN delivery”
PASS

3 inventory_history rows written during the run window for the ASN SKUs.

SELECT ih.id, ih.item_id, ih.quantity, ih.status, ih.info
FROM inventory_history ih
JOIN inventory_items ii ON ii.id = ih.item_id
WHERE ih.organization_id = $1
AND ih.created_at >= $2
AND ii.product_id = ANY($3)
iditem_idquantitystatusinfo
019d9e03-3e67-7978-ae9e-da5b10710c57019d9e03-3e62-714b-b8f2-ad3392215e8c3ready[object Object]
019d9e03-3e67-7978-ae9e-da5c398f7c7d019d9e03-3e63-7d9c-b46b-8dd0dfee14715ready[object Object]
019d9e03-3e67-7978-ae9e-da5d15019dea019d9e03-3e63-7d9c-b46b-8dd17cd26bf42ready[object Object]