Skip to content

URS-023 · Generate Shipping Documentation Linked to Orders

Title: Generate Shipping Documentation Linked to Orders Date: 2026-04-23T03:38:55.098Z Duration: 110.3s Overall Status: ✅ PASS

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

Source: User_Requirement_Specifications_ZuriMED_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-04-23T03:39:09.627Z → 2026-04-23T03:39:27.019Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:39:22Zdecisionorder_request_createdbob.kauffman@stellartech.comZuriMEDyes

Emails triggered by this step:

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

Email 1: Consignment Order Created - OR-1-FO-1

Template: Consignment_Order_Created_-_OR-1-FO-1

Consignment 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-04-23T03:39:35.947Z → 2026-04-23T03:40:04.168Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:39:44Ztransactional_emailorder_createdStellarTech Medical Solutions

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.

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 Bob Kauffman 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
019db86b-be52-7d41-9abc-970d5aa82787OR-1approvedNULL2026-04-23T03:39:22.030Z17b8c9d0-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
019db86c-1473-796a-82f2-9db373a39f2eOR-1-FO-1shipped019db86b-be52-7d41-9abc-970d5aa82787a1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901100 Charles River Plaza, Suite 300BostonMA021142026-04-23T03:39:44.064Z

Fulfillment order items match ordered products — ✅ PASS

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

Assertion: Fulfillment order should contain both SpeedPatch and FiberLocker 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
019db86c-1474-7f51-9808-33f92938c760019db86c-1473-796a-82f2-9db373a39f2e01978a05-ba4c-7f6d-91c8-bac1498e9bbeFiberLocker® Instrument (For Cadaver lab use)2FiberLocker® Instrument (For Cadaver lab use)FL2025CL
019db86c-1474-7f51-9808-33fac4dd6b0c019db86c-1473-796a-82f2-9db373a39f2e01989ca2-6a54-7834-8376-06a0251bacd8SpeedPatch® PET3SpeedPatch® PETSP019N1A

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
019db86c-7e55-7a5b-88f3-65d08521b59fURS023-TEST-1776915536723upsunknowna1b2c3d4-e5f6-7890-abcd-ef12345678902026-04-23T03:40:11.226Z

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
019db86c-7e5c-7c79-89db-e3e8515d224c019db86c-7e55-7a5b-88f3-65d08521b59f019db86c-1473-796a-82f2-9db373a39f2eURS023-TEST-1776915536723OR-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
019db86c-7e5b-784b-aa2b-0a9996303bf1019db86c-7e55-7a5b-88f3-65d08521b59f3OR-1-FO-11SP019N1ANULL
019db86c-7e5b-784b-aa2b-0a9ae2b4ad81019db86c-7e55-7a5b-88f3-65d08521b59f2OR-1-FO-12FL516SNANULL

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
019db86c-1473-796a-82f2-9db373a39f2eOR-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

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 orderConsignment 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-04-23T03:38:53.225Z

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-04-23 03:38:58Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:39:22Zdecisionorder_request_createdbob.kauffman@stellartech.comZuriMED019db86b-be52-7d41-9abc-970d5aa82787yesOrder request OR-1 created (importSource=manual)
2026-04-23 03:39:30Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED
2026-04-23 03:39:44Ztransactional_emailorder_createdStellarTech Medical Solutions019db86c-1473-796a-82f2-9db373a39f2e
2026-04-23 03:40:07Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED
2026-04-23 03:40:23Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED
2026-04-23 03:40:35Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED

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

Template: Consignment_Order_Created_-_OR-1-FO-1

Consignment Order Created - OR-1-FO-1