URS-049 · Parse Uniphar ASN messages and update inventory
Status: PASS · Duration: 1m 37s · Run Date: April 18, 2026
Test Scenarios
Section titled “Test Scenarios”Step 1: Pre-ASN inventory
Section titled “Step 1: Pre-ASN inventory”
Step 3: Intake email list (ASN received)
Section titled “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)”
Step 5: Import job log (ASN parsed)
Section titled “Step 5: Import job log (ASN parsed)”
Step 6: Shipping package detail (pre-delivery)
Section titled “Step 6: Shipping package detail (pre-delivery)”
Step 8: Shipping package detail (delivered)
Section titled “Step 8: Shipping package detail (delivered)”
Step 9: Inventory after ASN delivery (lots materialized)
Section titled “Step 9: Inventory after ASN delivery (lots materialized)”
Recordings
Section titled “Recordings”urs 049 uniphar asn
Section titled “urs 049 uniphar asn”Database Validations
Section titled “Database Validations”intake_emails row exists for the Uniphar ASN
Section titled “intake_emails row exists for the Uniphar ASN”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| id | from | to | subject | matched_rule_id | received_at |
|---|---|---|---|---|---|
| 019d9e02-18dd-7a11-bc07-e50eb184ade4 | notifications@secure-wms.com | zurimed.asn@agent.getdeviceflow.com | requested transaction notification | 01950049-0049-7049-8049-000000000002 | 2026-04-18T00:33:50.819Z |
import_jobs row completed for the Uniphar ASN
Section titled “import_jobs row completed for the Uniphar ASN”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| id | status | info |
|---|---|---|
| 019d9e02-18e5-7559-be02-8c8cb3312f4e | complete | [object Object] |
shipping_packages row created for the Uniphar ASN
Section titled “shipping_packages row created for the Uniphar ASN”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| id | tracking_number | carrier | destination_location_id |
|---|---|---|---|
| 019d9e02-18f6-76c4-bdd2-3d69903c7d93 | 391472417837 | fedex | 1c8ef1cb-e333-48da-a893-4d3cc4d210db |
shipping_package_items has 3 rows with correct quantities
Section titled “shipping_package_items has 3 rows with correct quantities”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| id | quantity | info |
|---|---|---|
| 019d9e02-18f8-7297-b78e-5c484cafa025 | 3 | [object Object] |
| 019d9e02-18f8-7297-b78e-5c49206d767b | 5 | [object Object] |
| 019d9e02-18f8-7297-b78e-5c4ad0a4ac2c | 2 | [object Object] |
shipping_package was delivered
Section titled “shipping_package was delivered”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| id | status | delivered_at | destination_location_id |
|---|---|---|---|
| 019d9e02-18f6-76c4-bdd2-3d69903c7d93 | delivered | 2026-04-18T00:34:08.112Z | 1c8ef1cb-e333-48da-a893-4d3cc4d210db |
inventory_items materialized for each ASN line
Section titled “inventory_items materialized for each ASN line”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))| id | product_id | lot | quantity_ready | real_world_location_id |
|---|---|---|---|---|
| 019d9e03-3e62-714b-b8f2-ad3392215e8c | 01989ca2-6a54-7834-8376-06a0251bacd8 | LOT-URS049-SP-A1 | 3 | 1c8ef1cb-e333-48da-a893-4d3cc4d210db |
| 019d9e03-3e63-7d9c-b46b-8dd0dfee1471 | 01989ca1-f2f8-7ab7-8269-7179342797cc | LOT-URS049-FL-B2 | 5 | 1c8ef1cb-e333-48da-a893-4d3cc4d210db |
| 019d9e03-3e63-7d9c-b46b-8dd17cd26bf4 | 01984270-64c1-76da-aa82-eaf3f0a8326b | LOT-URS049-MR-C3 | 2 | 1c8ef1cb-e333-48da-a893-4d3cc4d210db |
inventory_history rows recorded for the ASN delivery
Section titled “inventory_history rows recorded for the ASN delivery”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)| id | item_id | quantity | status | info |
|---|---|---|---|---|
| 019d9e03-3e67-7978-ae9e-da5b10710c57 | 019d9e03-3e62-714b-b8f2-ad3392215e8c | 3 | ready | [object Object] |
| 019d9e03-3e67-7978-ae9e-da5c398f7c7d | 019d9e03-3e63-7d9c-b46b-8dd0dfee1471 | 5 | ready | [object Object] |
| 019d9e03-3e67-7978-ae9e-da5d15019dea | 019d9e03-3e63-7d9c-b46b-8dd17cd26bf4 | 2 | ready | [object Object] |