Skip to content

URS-049 · Update inventory from Uniphar ASN on delivered status

Title: Update inventory from Uniphar ASN on delivered status Date: 2026-08-03T23:04:11.296Z Duration: 89.1s Overall Status: ✅ PASS

The system shall update inventory based on ASN information, upon receipt of “delivered” status from Uniphar.

Source: User_Requirement_Specifications_Vantis_DeviceFlow.xlsx — the run below proves the system meets this requirement.

Status: ✅ PASS

This validation was captured as a single end-to-end screencast covering every step below.

Each step below corresponds to one Playwright test that ran sequentially. Screenshots and video recordings provide visual evidence of the UI behaviour.

What this step proves:

Documents the inventory state at ROSS-001 before any ASN is processed. This baseline proves that inventory increases seen after Step 9 are caused by the ASN delivery, not by pre-existing stock. The full end-to-end screencast video (attached below) covers all steps from pre-ASN baseline through delivery confirmation and inventory materialization.

Screenshots:

step 01 inventory before asn


2. Step 3: Intake email list (ASN received) — ✅ PASS

Section titled “2. Step 3: Intake email list (ASN received) — ✅ PASS”

What this step proves:

Confirms the Uniphar/secure-wms.com ASN email appears in the email intake log (/settings/email_intake) with a “processed” status. The email arrived via the same SES → Minio → Restate Import.processMail pipeline used in production — only the SES/SQS hops are replaced by a direct Minio upload in the test environment.

Screenshots:

step 03 intake email list


3. Step 4: Intake email detail (parsed ASN body) — ✅ PASS

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

What this step proves:

Drills into the ASN email detail page, showing the sender (notifications@secure-wms.com), subject, HTML table body, and the shipping_package + import_job entities the pipeline produced. Proves the parser correctly extracted account code, carrier, tracking number, and all three SKU/lot/quantity rows from the secure-wms.com HTML table format.

Screenshots:

step 04 intake email detail


4. Step 5: Import job log (ASN parsed) — ✅ PASS

Section titled “4. Step 5: Import job log (ASN parsed) — ✅ PASS”

What this step proves:

Shows the shipping-notice import job log with the parsed SKU, LOT, and quantity rows from the ASN. Confirms the text-extraction import_config matched the URS-049 email rule and the import job completed with status=complete, packagesCreated=1, itemsAdded=3.

Screenshots:

step 05 import job log


5. Step 6: Shipping package detail (pre-delivery) — ✅ PASS

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

What this step proves:

Captures the shipping_packages detail page before the delivery webhook fires. Confirms the package was routed to the Vantis ROSS-001 destination location with the correct tracking number and three shipping_package_items matching the ASN quantities.

Screenshots:

step 06 shipping package pre delivery


6. Step 8: Shipping package detail (delivered) — ✅ PASS

Section titled “6. Step 8: Shipping package detail (delivered) — ✅ PASS”

What this step proves:

After the PackageTracker.mockUpdate webhook sets status=delivered, the package detail page is re-captured to show the updated status. This is the trigger that causes the auto-add-inventory hook to fire, materializing inventory_items at ROSS-001.

Screenshots:

step 08 shipping package delivered


7. Step 9: Inventory after ASN delivery (lots materialized) — ✅ PASS

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

What this step proves:

Documents the inventory state at ROSS-001 after the delivery event. The three ASN lots (NP019N1A, LL516SNA, VM2025MR) now appear with quantities matching the ASN exactly, proving the requirement: “The system shall update inventory based on ASN information, upon receipt of delivered status from Uniphar.”

Screenshots:

step 09 inventory after delivery


The following SQL queries ran against the application database after the Playwright scenarios completed. Each query asserts a specific condition that proves the feature under test persisted its data correctly.

intake_emails row exists for the Uniphar ASN — ✅ PASS

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

Assertion: 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
019fc9de-fed3-7c2a-b5af-3dd8ad73bdcfnotifications@secure-wms.comvantis.asn@agent.getdeviceflow.comrequested transaction notification01950049-0049-7049-8049-0000000000022026-08-03T23:04:22.536Z

import_jobs row completed for the Uniphar ASN — ✅ PASS

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

Assertion: 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
019fc9de-ff12-72d4-bfa6-4328f6c5c8f2complete{"itemsAdded":3,"missingContacts":[],"packagesCreated":1,"missingLocations":[],"packagesReconciled":0,"backorderedItemsAdded":0,"unmatchedOrderNumbers":["URS049-PKG-A"],"fulfillmentOrdersLinked":0}

shipping_packages row created for the Uniphar ASN — ✅ PASS

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

Assertion: A shipping_packages row with the ASN tracking number was created, routed to ROSS-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
019fc9de-ff61-784d-b215-2bfbf76243cf391798251377fedex148e78e5-1f34-448a-90e5-f600f77749c7

shipping_package_items has 3 rows with correct quantities — ✅ PASS

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

Assertion: 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
AND sp.tracking_number = $3
ORDER BY spi.source_file_row ASC NULLS LAST, spi.id ASC
idquantityinfo
019fc9de-ff67-7aa8-b1b9-f0fb433cc7373{"lot":"LOT-URS049-SP-A1","sku":"NP019N1A"}
019fc9de-ff67-7aa8-b1b9-f0fc706e6c7d5{"lot":"LOT-URS049-FL-B2","sku":"LL516SNA"}
019fc9de-ff67-7aa8-b1b9-f0fdb47deaee2{"lot":"LOT-URS049-MR-C3","sku":"VM2025MR"}

shipping_package was delivered — ✅ PASS

Section titled “shipping_package was delivered — ✅ PASS”

Assertion: 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
019fc9de-ff61-784d-b215-2bfbf76243cfdelivered2026-08-03T23:04:35.870Z148e78e5-1f34-448a-90e5-f600f77749c7

inventory_items materialized for each ASN line — ✅ PASS

Section titled “inventory_items materialized for each ASN line — ✅ PASS”

Assertion: One inventory_items row per ASN (productId, lot) at ROSS-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
019fc9e0-1481-7cbd-80f5-efc0183c011001989ca2-6a54-7834-8376-06a0251bacd8LOT-URS049-SP-A13148e78e5-1f34-448a-90e5-f600f77749c7
019fc9e0-1481-7cbd-80f5-efc113dc211301989ca1-f2f8-7ab7-8269-7179342797ccLOT-URS049-FL-B25148e78e5-1f34-448a-90e5-f600f77749c7
019fc9e0-1481-7cbd-80f5-efc28882fd0101984270-64c1-76da-aa82-eaf3f0a8326bLOT-URS049-MR-C32148e78e5-1f34-448a-90e5-f600f77749c7

inventory_history rows recorded for the ASN delivery — ✅ PASS

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

Assertion: 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
019fc9e0-148b-7006-8e5d-19027d377da9019fc9e0-1481-7cbd-80f5-efc0183c01103ready{"action":"added","reason":"auto_added_package","packageId":"019fc9de-ff61-784d-b215-2bfbf76243cf"}
019fc9e0-148b-7006-8e5d-1903013ce17d019fc9e0-1481-7cbd-80f5-efc113dc21135ready{"action":"added","reason":"auto_added_package","packageId":"019fc9de-ff61-784d-b215-2bfbf76243cf"}
019fc9e0-148d-7cd1-9669-d3cc771c84fc019fc9e0-1481-7cbd-80f5-efc28882fd012ready{"action":"added","reason":"auto_added_package","packageId":"019fc9de-ff61-784d-b215-2bfbf76243cf"}

Every row written to audit_events while this test was running (scoped to the demo organizations). Provides compliance evidence that user actions are traced end-to-end (URS-003).

Capture window start: 2026-08-03T23:04:09.439Z

SELECT
ae.created_at,
ae.event_type,
ae.action,
ae.user_id,
u.email AS user_email,
ae.organization_id,
o.name AS organization_name,
ae.object_id,
ae.secondary_object_id,
ae.payload,
ae.route,
ae.trace_id
FROM audit_events ae
LEFT JOIN users u ON u.id = ae.user_id
LEFT JOIN organizations o ON o.id = ae.organization_id
WHERE ae.created_at >= $1
AND ae.organization_id = ANY($2::uuid[])
ORDER BY ae.created_at ASC

7 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-08-03 23:04:10Zchecklistchecklists.createCorveta Surgical Group019fc9de-cf4f-709a-aa55-8e619fe1f85b
2026-08-03 23:04:10Zdecisionensure_lot_expiration_checklistCorveta Surgical Groupb2c3d4e5-f6a7-8901-bcde-f12345678901yescreated_1_reopened_0_already_open_1
2026-08-03 23:04:17Zuser_loguser:loginalex.admin@vantismedical.comVantis
2026-08-03 23:04:22Zdecisionimports.mail_intake.rule_matched_hardcodedVantis01950049-0049-7049-8049-000000000002yesmatched_hardcoded_intake_rule
2026-08-03 23:04:22Zdecisionimports.mail_intake.rule_matched_flexibleVantis01950049-0049-7049-8049-000000000002nomatched_hardcoded_rule
2026-08-03 23:04:22Zdecisionimports.mail_intake.no_rule_matchVantis01950049-0049-7049-8049-000000000002noactionable_rule_matched
2026-08-03 23:05:33Zdecisionenable_team_tracked_inventory_routingVantis019fc9de-ff61-784d-b215-2bfbf76243cfyesPackage not linked to direct or dropship order