Skip to content

URS-027 · Auto-notify distributors on applicable order types

Title: Auto-notify distributors on applicable order types Date: 2026-04-23T03:38:59.036Z Duration: 68.8s Overall Status: ✅ PASS

The system shall notify distributors (e.g., Uniphar) automatically when applicable order types are submitted.

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.

1. Step 1: Distributor notification recipients configured — ✅ PASS

Section titled “1. Step 1: Distributor notification recipients configured — ✅ PASS”

What this step proves:

Confirms the notification routing configuration has distributor recipients wired to the order_request_submitted event type. This pre-condition check ensures the auto-notify mechanism is enabled before any orders are submitted.

Audit events generated by this step:

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

TimeTypeActionUserOrgPerformed
2026-04-23 03:39:01Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED
2026-04-23 03:39:12Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:39:36Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:39:54Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED

Screenshots:

step 01 notifications settings

Video recording:


2. Step 2: Submit dropship order — ✅ PASS

Section titled “2. Step 2: Submit dropship order — ✅ PASS”

What this step proves:

A sales rep submits a dropship order, which is a notification-eligible order type. This triggers the order_request_submitted event and causes the system to automatically enqueue distributor notification emails, directly exercising the auto-notify requirement.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-04-23T03:39:21.367Z → 2026-04-23T03:39:32.146Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:39:32Zdecisionorder_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: New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Template: New_Order_Request_Submitted_-_OR-1_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Email 2: New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Template: New_Order_Request_Submitted_-_OR-2_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Email 3: New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Template: order_request_submitted

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Email 4: New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Template: order_request_submitted

New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Screenshots:

step 02 dropship form

step 02 dropship products

step 02 dropship review

step 02 dropship submitted

Video recording:


3. Step 3: Submit consignment order — ✅ PASS

Section titled “3. Step 3: Submit consignment order — ✅ PASS”

What this step proves:

A sales rep submits a consignment order to provide a contrast case. This verifies that the auto-notify behavior applies to multiple applicable order types and that the system processes each submission without error.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-04-23T03:39:44.549Z → 2026-04-23T03:39:50.353Z)

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

Emails triggered by this step:

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

Email 1: New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Template: New_Order_Request_Submitted_-_OR-1_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Email 2: New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Template: New_Order_Request_Submitted_-_OR-2_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Email 3: New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Template: order_request_submitted

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Email 4: New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Template: order_request_submitted

New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Screenshots:

step 03 consignment form

step 03 consignment products

step 03 consignment review

step 03 consignment submitted

Video recording:


4. Step 4: Manufacturer sees orders — ✅ PASS

Section titled “4. Step 4: Manufacturer sees orders — ✅ PASS”

What this step proves:

A manufacturer admin reviews both submitted orders in the system. This confirms that both order types are visible in the manufacturer view and that each submission completed successfully end-to-end.

Screenshots:

step 04 orders list

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.

Both URS-027 order_requests exist — ✅ PASS

Section titled “Both URS-027 order_requests exist — ✅ PASS”

Assertion: Both the dropship and consignment URS-027 test orders should exist

SELECT id, request_number, order_type, status, notes,
receiving_rep_user_id, fulfilling_organization_id, requesting_organization_id
FROM order_requests
WHERE requested_by_user_id = $1
AND notes LIKE $2
ORDER BY created_at DESC
idrequest_numberorder_typestatusnotesreceiving_rep_user_idfulfilling_organization_idrequesting_organization_id
019db86c-2b98-7b66-aef8-1a4710cf7244OR-2consignmentsubmittedURS-027 consignment contrast orderNULLa1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901
019db86b-e554-77a2-93af-0193daf5393dOR-1dropshipsubmittedURS-027 dropship distributor-applicable orderNULLa1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901

Both order types (dropship + consignment) successfully submitted — ✅ PASS

Section titled “Both order types (dropship + consignment) successfully submitted — ✅ PASS”

Assertion: Both a dropship and a consignment URS-027 order should exist (each must trigger distributor notifications independent of order_type).

SELECT id, request_number, order_type, status, notes,
receiving_rep_user_id, fulfilling_organization_id, requesting_organization_id
FROM order_requests
WHERE requested_by_user_id = $1
AND notes LIKE $2
ORDER BY created_at DESC
idrequest_numberorder_typestatusnotesreceiving_rep_user_idfulfilling_organization_idrequesting_organization_id
019db86b-e554-77a2-93af-0193daf5393dOR-1dropshipsubmittedURS-027 dropship distributor-applicable orderNULLa1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901
019db86c-2b98-7b66-aef8-1a4710cf7244OR-2consignmentsubmittedURS-027 consignment contrast orderNULLa1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901

Distributor + manufacturer notification recipients are configured — ✅ PASS

Section titled “Distributor + manufacturer notification recipients are configured — ✅ PASS”

Assertion: Both ZuriMED and StellarTech must have at least one CC recipient for order_request_submitted notifications

SELECT organization_id, notification_type, email_address, name,
recipient_purpose
FROM organization_notification_recipients
WHERE notification_type = 'order_request_submitted'
AND organization_id = ANY($1)
AND recipient_purpose = 'cc'
AND email_address IS NOT NULL
ORDER BY organization_id, email_address
organization_idnotification_typeemail_addressnamerecipient_purpose
a1b2c3d4-e5f6-7890-abcd-ef1234567890order_request_submittedurs027-distributor-test@zurimed-fulfillment.example.comURS-027 distributor recipientcc
b2c3d4e5-f6a7-8901-bcde-f12345678901order_request_submittedurs027-distributor-test@stellartech-distributor.example.comURS-027 distributor recipientcc

order_request_submitted notification was enqueued/sent for the dropship order — ✅ PASS

Section titled “order_request_submitted notification was enqueued/sent for the dropship order — ✅ PASS”

Assertion: There should be an email row tied to the dropship order in restate_outbox, restate_outbox_dlq, audit_events, or the spec-captured snapshot dir

restate_outbox + restate_outbox_dlq + audit_events + spec snapshots
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionstrue
audit_events019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionsfalse

order_request_submitted notification was enqueued/sent for the consignment order — ✅ PASS

Section titled “order_request_submitted notification was enqueued/sent for the consignment order — ✅ PASS”

Assertion: There should be an email row tied to the consignment order in restate_outbox, restate_outbox_dlq, audit_events, or the spec-captured snapshot dir

restate_outbox + restate_outbox_dlq + audit_events + spec snapshots
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionstrue
audit_events019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionsfalse

Dropship email recipients include BOTH the URS-027 distributor + manufacturer marker emails — ✅ PASS

Section titled “Dropship email recipients include BOTH the URS-027 distributor + manufacturer marker emails — ✅ PASS”

Assertion: The dropship order’s notification(s) must address both the ZuriMED and the StellarTech URS-027 marker recipients (on to or cc) — proves distributor wiring fired.

evidence rows aggregated
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionstrue
audit_events019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionsfalse

Consignment email recipients include BOTH the URS-027 distributor + manufacturer marker emails — ✅ PASS

Section titled “Consignment email recipients include BOTH the URS-027 distributor + manufacturer marker emails — ✅ PASS”

Assertion: The consignment order’s notification(s) must address both the ZuriMED and the StellarTech URS-027 marker recipients (on to or cc).

evidence rows aggregated
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionstrue
audit_events019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionsfalse

At least one dropship-email subject references the dropship request_number — ✅ PASS

Section titled “At least one dropship-email subject references the dropship request_number — ✅ PASS”

Assertion: At least one notification email for the dropship order must have a subject that references the dropship order’s request_number

evidence rows aggregated
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionstrue
audit_events019db86b-e554-77a2-93af-0193daf5393d["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-1 from StellarTech Medical Solutionsfalse

At least one consignment-email subject references the consignment request_number — ✅ PASS

Section titled “At least one consignment-email subject references the consignment request_number — ✅ PASS”

Assertion: At least one notification email for the consignment order must have a subject that references the consignment order’s request_number

evidence rows aggregated
sourcerelated_entity_idto_addressescc_addressessubjecthas_html
snapshot019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionstrue
audit_events019db86c-2b98-7b66-aef8-1a4710cf7244["URS-027 distributor recipient <urs027-distributor-test@zurimed-fulfillment.example.com>","URS-027 distributor recipient <urs027-distributor-test@stellartech-distributor.example.com>"][]New Order Request Submitted - OR-2 from StellarTech Medical Solutionsfalse

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: Distributor notification recipients configureduser_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 2: Submit dropship orderorder_request_submitted
Step 3: Submit consignment orderorder_request_submitted

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:57.156Z

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

8 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:39:01Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED
2026-04-23 03:39:12Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:39:32Zdecisionorder_request_createdbob.kauffman@stellartech.comZuriMED019db86b-e554-77a2-93af-0193daf5393dyesOrder request OR-1 created (importSource=manual)
2026-04-23 03:39:32Ztransactional_emailorder_request_submittedZuriMED019db86b-e554-77a2-93af-0193daf5393d
2026-04-23 03:39:36Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:39:50Zdecisionorder_request_createdbob.kauffman@stellartech.comZuriMED019db86c-2b98-7b66-aef8-1a4710cf7244yesOrder request OR-2 created (importSource=manual)
2026-04-23 03:39:50Ztransactional_emailorder_request_submittedZuriMED019db86c-2b98-7b66-aef8-1a4710cf7244
2026-04-23 03:39:54Zuser_loguser:loginmark.manufacturer@zurimed.comZuriMED

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

1. New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Section titled “1. New Order Request Submitted - OR-1 from StellarTech Medical Solutions”

Template: New_Order_Request_Submitted_-_OR-1_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

2. New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Section titled “2. New Order Request Submitted - OR-2 from StellarTech Medical Solutions”

Template: New_Order_Request_Submitted_-_OR-2_from_StellarTech_Medical_Solutions

New Order Request Submitted - OR-2 from StellarTech Medical Solutions

3. New Order Request Submitted - OR-1 from StellarTech Medical Solutions

Section titled “3. New Order Request Submitted - OR-1 from StellarTech Medical Solutions”

Template: order_request_submitted

New Order Request Submitted - OR-1 from StellarTech Medical Solutions

4. New Order Request Submitted - OR-2 from StellarTech Medical Solutions

Section titled “4. New Order Request Submitted - OR-2 from StellarTech Medical Solutions”

Template: order_request_submitted

New Order Request Submitted - OR-2 from StellarTech Medical Solutions