Skip to content

URS-023 · Generate Shipping Documentation Linked to Orders

Title: Generate Shipping Documentation Linked to Orders Date: 2026-08-03T23:02:06.491Z Duration: 132.2s Overall Status: ✅ PASS

The system shall generate orders and link shipments to the corresponding order.

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

Status: ✅ PASS

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:

A sales rep creates a new order in the system. This establishes the source document that shipping documentation will later be linked to, verifying the order initiation flow.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-08-03T23:02:25.071Z → 2026-08-03T23:02:40.955Z)

TimeTypeActionUserOrgPerformed
2026-08-03 23:02:35Zchecklistchecklists.createblair.bennett@corvetasurgical.comVantis
2026-08-03 23:02:35Zdecisionorder_request_createdblair.bennett@corvetasurgical.comVantisyes

Emails triggered by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

Email 1: Drop-Ship Order Created - OR-1-FO-1

Template: Drop-Ship_Order_Created_-_OR-1-FO-1

Drop-Ship Order Created - OR-1-FO-1

Screenshots:

step 01 location selected

step 01 products selected

step 01 review

step 01 order submitted

Video recording:


2. Step 2: Approve and find fulfillment — ✅ PASS

Section titled “2. Step 2: Approve and find fulfillment — ✅ PASS”

What this step proves:

A manufacturer user approves the submitted order and locates the associated fulfillment record. This verifies the order transitions to an approvable state and that the system correctly resolves the fulfillment entry for the order.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-08-03T23:02:50.171Z → 2026-08-03T23:03:17.199Z)

TimeTypeActionUserOrgPerformed
2026-08-03 23:02:57Zdecisiontickets.checklist_item_resolve.auto_resolve_ticketVantisno
2026-08-03 23:02:57Zdecisionextensiv_order_push.skippedVantisno
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis
2026-08-03 23:02:59Ztransactional_emailorder_createdCorveta Surgical Group

Screenshots:

step 02 order requests list

step 02 order detail

step 02 approval dialog

step 02 order approved

step 02 fulfillment list

step 02 fulfillment detail

Video recording:


What this step proves:

A shipping-notice CSV manifest is generated for the fulfillment order, uploaded to S3, and imported via the production Restate Import.runImportJob handler — the same path the UI /packages/upload form uses. This creates the shipping_package + items, links the package to the fulfillment order, and advances the fulfillment-order status.

Audit events generated by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

TimeTypeActionUserOrgPerformed
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis
2026-08-03 23:03:52Zfulfillment_orderstatus_changeVantis

Screenshots:

step 03 linked packages

Video recording:


What this step proves:

The shipment package record is verified to be linked to the originating order. This confirms that shipping documentation is correctly associated with the source order, satisfying the traceability requirement.

Screenshots:

step 04 fulfillment with package

step 04 shipping documentation

Video recording:


What this step proves:

This step proves the shipment is correctly linked to the order in the database. It provides direct evidence that the shipping record references the originating order, confirming the required order-to-shipment traceability.

Screenshots:

step 05 order with shipment

step 05 order status

Video recording:


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.

Assertion: At least one order request should have been created by Blair Bennett recently

SELECT orq.id, orq.request_number, orq.status, orq.shipping_status,
orq.created_at, orq.requested_by_user_id
FROM order_requests orq
WHERE orq.requested_by_user_id = $1
AND orq.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY orq.created_at DESC
LIMIT 5
idrequest_numberstatusshipping_statuscreated_atrequested_by_user_id
019fc9dd-5eb4-7a9c-a180-8755742ea79dOR-1approvedshipped2026-08-03T23:02:35.912Z17b8c9d0-e1f2-3456-1234-567890123456

Fulfillment order created and linked to order request — ✅ PASS

Section titled “Fulfillment order created and linked to order request — ✅ PASS”

Assertion: A fulfillment order should exist linked to the order request

SELECT fo.id, fo.order_number, fo.status, fo.order_request_id,
fo.fulfilling_organization_id, fo.requesting_organization_id,
fo.shipping_street_address, fo.shipping_city, fo.shipping_state, fo.shipping_zip,
fo.created_at
FROM fulfillment_orders fo
JOIN order_requests orq ON fo.order_request_id = orq.id
WHERE orq.requested_by_user_id = $1
AND orq.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY fo.created_at DESC
LIMIT 5
idorder_numberstatusorder_request_idfulfilling_organization_idrequesting_organization_idshipping_street_addressshipping_cityshipping_stateshipping_zipcreated_at
019fc9dd-b44b-77ae-a94c-81ab77611498OR-1-FO-1shipped019fc9dd-5eb4-7a9c-a180-8755742ea79da1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901100 Charles River Plaza, Suite 300BostonMA021142026-08-03T23:02:57.785Z

Fulfillment order items match ordered products — ✅ PASS

Section titled “Fulfillment order items match ordered products — ✅ PASS”

Assertion: Fulfillment order should contain both NovaPatch and LiraLock products

SELECT foi.id, foi.fulfillment_order_id, foi.product_id, foi.description, foi.quantity,
op.title as product_name, op.sku
FROM fulfillment_order_items foi
JOIN org_products op ON foi.product_id = op.id
JOIN fulfillment_orders fo ON foi.fulfillment_order_id = fo.id
JOIN order_requests orq ON fo.order_request_id = orq.id
WHERE orq.requested_by_user_id = $1
AND orq.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY op.title
idfulfillment_order_idproduct_iddescriptionquantityproduct_namesku
019fc9dd-b44c-7eab-b448-4f64064431b7019fc9dd-b44b-77ae-a94c-81ab77611498fc000001-0000-4000-8000-000000000001LiraLock® Implant Kit2LiraLock® Implant KitIK2025LL
019fc9dd-b44c-7eab-b448-4f658b545789019fc9dd-b44b-77ae-a94c-81ab7761149801989ca2-6a54-7834-8376-06a0251bacd8NovaPatch® PET3NovaPatch® PETNP019N1A

Shipping package created with correct tracking — ✅ PASS

Section titled “Shipping package created with correct tracking — ✅ PASS”

Assertion: Shipping package should exist with tracking prefix URS023-TEST- and carrier UPS

SELECT sp.id, sp.tracking_number, sp.carrier, sp.status,
sp.organization_id, sp.created_at
FROM shipping_packages sp
WHERE sp.tracking_number LIKE $1
AND sp.organization_id IN ($2, $3)
AND sp.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY sp.created_at DESC
LIMIT 1
idtracking_numbercarrierstatusorganization_idcreated_at
019fc9de-8afc-77a4-9b5c-0b0688a9deb4URS023-TEST-1785798128939upsunknowna1b2c3d4-e5f6-7890-abcd-ef12345678902026-08-03T23:03:52.832Z

Shipping package linked to fulfillment order — ✅ PASS

Section titled “Shipping package linked to fulfillment order — ✅ PASS”

Assertion: The shipping_package_fulfillment_orders join table should link the package to the fulfillment order

SELECT spfo.id, spfo.shipping_package_id, spfo.fulfillment_order_id,
sp.tracking_number, fo.order_number
FROM shipping_package_fulfillment_orders spfo
JOIN shipping_packages sp ON spfo.shipping_package_id = sp.id
JOIN fulfillment_orders fo ON spfo.fulfillment_order_id = fo.id
WHERE sp.tracking_number LIKE $1
AND sp.organization_id IN ($2, $3)
AND sp.created_at > NOW() - INTERVAL '30 minutes'
idshipping_package_idfulfillment_order_idtracking_numberorder_number
019fc9de-8b04-769d-ac2b-c330948fe823019fc9de-8afc-77a4-9b5c-0b0688a9deb4019fc9dd-b44b-77ae-a94c-81ab77611498URS023-TEST-1785798128939OR-1-FO-1

Shipping package items contain correct products with order linkage — ✅ PASS

Section titled “Shipping package items contain correct products with order linkage — ✅ PASS”

Assertion: Shipping package items should reference the ordered products with correct quantities AND populate order_number + order_line_number for traceability

SELECT spi.id, spi.package_id, spi.quantity, spi.order_number, spi.order_line_number,
spi.info->>'sku' as sku, spi.info->>'productId' as product_id
FROM shipping_package_items spi
JOIN shipping_packages sp ON spi.package_id = sp.id
WHERE sp.tracking_number LIKE $1
AND sp.organization_id IN ($2, $3)
AND sp.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY spi.id
idpackage_idquantityorder_numberorder_line_numberskuproduct_id
019fc9de-8b02-7fcf-9db5-14d5842b4cd9019fc9de-8afc-77a4-9b5c-0b0688a9deb43OR-1-FO-11NP019N1ANULL
019fc9de-8b02-7fcf-9db5-14d649b11506019fc9de-8afc-77a4-9b5c-0b0688a9deb42OR-1-FO-12LL516SNANULL

Fulfillment order status advanced after shipment creation — ✅ PASS

Section titled “Fulfillment order status advanced after shipment creation — ✅ PASS”

Assertion: Fulfillment order status should be one of [partially_fulfilled, fulfilled, partially_shipped, shipped, delivered, partially_delivered, completed] once a shipment exists

SELECT fo.id, fo.order_number, fo.status
FROM fulfillment_orders fo
JOIN order_requests orq ON fo.order_request_id = orq.id
WHERE orq.requested_by_user_id = $1
AND orq.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY fo.created_at DESC
LIMIT 1
idorder_numberstatus
019fc9dd-b44b-77ae-a94c-81ab77611498OR-1-FO-1shipped

Per-declaration outcome of every expectedAuditActions and expectedEmailTemplates entry written into the orchestrator. Missing evidence here is a real test failure, not a soft warning.

Each row asserts that a declared expectedAuditActions entry produced a matching row in audit_events. A ❌ flips overall status to FAIL — the declaration is real proof, not just an annotation.

StepExpected Audit ActionFound
Step 1: Create orderuser_log:user:login
Step 2: Approve and find fulfillmentuser_log:user:login
Step 3: Create shipmentfulfillment_order:status_change

Each row asserts that a declared expectedEmailTemplates entry was matched (case-insensitive substring) by a captured email subject or template. A ❌ flips overall status to FAIL.

StepExpected TemplateFound
Step 1: Create orderDrop-Ship Order Created

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:02:04.702Z

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

14 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-08-03 23:02:13Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group
2026-08-03 23:02:35Zchecklistchecklists.createblair.bennett@corvetasurgical.comVantis019fc9dd-5ecf-7574-8054-83d7f1225c99
2026-08-03 23:02:35Zdecisionorder_request_createdblair.bennett@corvetasurgical.comVantis019fc9dd-5eb4-7a9c-a180-8755742ea79dyesOrder request OR-1 created (importSource=manual)
2026-08-03 23:02:44Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis
2026-08-03 23:02:57Zdecisiontickets.checklist_item_resolve.auto_resolve_ticketVantis019fc9dd-5ed6-7d5f-94af-0975181aa1c4noChecklist item is not linked to any ticket.
2026-08-03 23:02:57Zdecisionextensiv_order_push.skippedVantis019fc9dd-b44b-77ae-a94c-81ab77611498nowms_feature_flag_disabled
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis019fc9dd-b44b-77ae-a94c-81ab77611498Order automatically submitted for fulfillment
2026-08-03 23:02:57Zfulfillment_orderstatus_changemark.manufacturer@vantismedical.comVantis019fc9dd-b44b-77ae-a94c-81ab77611498Fulfillment order created from approved items
2026-08-03 23:02:59Ztransactional_emailorder_createdCorveta Surgical Group019fc9dd-b44b-77ae-a94c-81ab77611498
2026-08-03 23:03:51Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis
2026-08-03 23:03:52Zdecisionrecalculate_order_statusVantis019fc9dd-5eb4-7a9c-a180-8755742ea79dyesShipping status updated from null to shipped
2026-08-03 23:03:52Zfulfillment_orderstatus_changeVantis019fc9dd-b44b-77ae-a94c-81ab77611498All items shipped
2026-08-03 23:04:00Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis
2026-08-03 23:04:11Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis

1 notification email(s) were captured during this test run. Each email is rendered as a screenshot for compliance review.

Template: Drop-Ship_Order_Created_-_OR-1-FO-1

Drop-Ship Order Created - OR-1-FO-1