Skip to content

URS-069 · Account Creation Updates (Required Fields, Pricing, Review)

Title: Account Creation Updates (Required Fields, Pricing, Review) Date: 2026-04-23T03:46:10.814Z Duration: 108.0s Overall Status: ✅ PASS

Account creation updates: require hospital/ASC label, require contact & invoicing details, enforce required fields, pricing logic, review screen, comment section.

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: Login and navigate — ✅ PASS

Section titled “1. Step 1: Login and navigate — ✅ PASS”

What this step proves:

Logs in as the distributor admin (Dan Distributor) and navigates to the new account creation wizard. Confirms the multi-step form is accessible to authorized users with the sales_accounts:create permission.

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:46:16Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:46:29Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions

Screenshots:

step 01 logged in

step 01 sales accounts list

step 01 creation form initial

Video recording:


2. Step 2: Manufacturer auto-selected — ✅ PASS

Section titled “2. Step 2: Manufacturer auto-selected — ✅ PASS”

What this step proves:

Verifies that the manufacturer step is skipped and ZuriMED is auto-selected because StellarTech has only one manufacturer partner. The form advances directly to the Account Details step and displays the auto-selected manufacturer name in the navigation footer.

Screenshots:

step 02 manufacturer auto selected


3. Step 3: Account details required fields — ✅ PASS

Section titled “3. Step 3: Account details required fields — ✅ PASS”

What this step proves:

Confirms that the Account Details step enforces required fields: submitting with an empty account name and no sales representative triggers inline validation errors. After filling in the account name and selecting a sales rep the form advances normally.

Screenshots:

step 03 account details form

step 03 required fields error

step 03 account details filled


4. Step 4: Shipping required fields — ✅ PASS

Section titled “4. Step 4: Shipping required fields — ✅ PASS”

What this step proves:

Confirms that the Shipping step enforces the required shipping address fields — line 1, city, state, and ZIP are each annotated as required in step3Schema via .min(1) (ZIP via regex). Submitting an empty form surfaces validation errors. Shipping contact name, email, and phone are optional at the schema level but are still collected on this step for downstream use, and the scenario fills them before advancing to the Billing step.

Screenshots:

step 04 shipping form empty

step 04 shipping validation errors

step 04 shipping filled


5. Step 5: Billing required fields — ✅ PASS

Section titled “5. Step 5: Billing required fields — ✅ PASS”

What this step proves:

Confirms that the Billing step enforces required contact fields and that the “Copy from Shipping” button auto-populates the billing contact with shipping data. A success toast confirms the copy, then billing contact details are updated before the form advances to the Pricing step.

Screenshots:

step 05 billing form empty

step 05 billing validation errors

step 05 billing copied from shipping

step 05 billing filled


What this step proves:

Verifies that the Pricing step pre-populates product prices from MSRP defaults and that a free-text Notes field is present and editable. Screenshots capture the full pricing grid as well as the entered notes.

Screenshots:

step 06 pricing with msrp

step 06 notes filled

step 06 pricing full view


What this step proves:

Verifies the Review step displays a summary of all data entered across previous steps: account name, billing and shipping contacts, notes, and “Edit” buttons for each section. Both the Previous navigation button and the Submit button are visible.

Screenshots:

step 07 review screen top

step 07 review screen middle

step 07 review screen bottom


What this step proves:

Clicks the “Submit Request” button and waits for the success confirmation. Confirms the success page displays the new account name, indicating the account was persisted to the database, and that the sales_account_creation_request_submitted notification fires to the manufacturer + distributor recipient lists (setup pre-seeds a marker recipient row on each org so the notification has a destination to deliver to). The captured email subject is “New Sales Account Creation Request from <distributor>”.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-04-23T03:47:38.106Z → 2026-04-23T03:47:46.707Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:47:38Zuser_logsales_account:createddan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:47:38Ztransactional_emailsales_account_creation_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 Sales Account Creation Request from StellarTech Medical Solutions

Template: New_Sales_Account_Creation_Request_from_StellarTech_Medical_Solutions

New Sales Account Creation Request from StellarTech Medical Solutions

Screenshots:

step 08 review before submit

step 08 success page

step 08 success details


9. Step 9: Verify persistence — ✅ PASS

Section titled “9. Step 9: Verify persistence — ✅ PASS”

What this step proves:

Navigates to the sales accounts list and verifies the newly created account appears in the list. Opens the account detail page and confirms key information is visible, completing the end-to-end verification that the account was durably stored.

Screenshots:

step 09 account in list

step 09 account detail top

step 09 account detail middle

step 09 account detail bottom


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: Sales account “St. Mary’s Surgical Center” should exist in the database

SELECT id, name, status, organization_id, manufacturer_organization_id,
distributor_organization_id, created_at
FROM sales_accounts
WHERE name = $1
AND distributor_organization_id = $2
idnamestatusorganization_idmanufacturer_organization_iddistributor_organization_idcreated_at
019db873-523e-735d-bb8c-87576f135122St. Mary’s Surgical Centerproposeda1b2c3d4-e5f6-7890-abcd-ef1234567890a1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f123456789012026-04-23T03:47:38.673Z

Account organization relationships — ✅ PASS

Section titled “Account organization relationships — ✅ PASS”

Assertion: Account should be linked to ZuriMED (manufacturer) and StellarTech (distributor)

SELECT manufacturer_organization_id, distributor_organization_id
FROM sales_accounts WHERE id = $1
manufacturer_organization_iddistributor_organization_id
a1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901

Shipping location created with hospital facility type — ✅ PASS

Section titled “Shipping location created with hospital facility type — ✅ PASS”

Assertion: Shipping location should be created with address details and real_world_locations.type = “hospital”

SELECT rwl.type, rwl.street_address, rwl.city, rwl.state, rwl.zip
FROM sales_accounts sa
JOIN real_world_locations rwl ON rwl.id = sa.shipping_location_id
WHERE sa.id = $1
typestreet_addresscitystatezip
hospital123 Medical DriveHealth CityCT06001

Assertion: Shipping contact should be created

SELECT c.name
FROM sales_accounts sa
JOIN contacts c ON c.id = sa.shipping_contact_id
WHERE sa.id = $1
name
Dr. Sarah Johnson

Assertion: Billing contact should be “Accounts Payable Dept”

SELECT c.name
FROM sales_accounts sa
JOIN contacts c ON c.id = sa.billing_contact_id
WHERE sa.id = $1
name
Accounts Payable Dept

Assertion: At least one pricing record should be created for the account

SELECT sap.org_product_id, sap.price, sap.status
FROM sales_account_approved_pricing sap
WHERE sap.sales_account_id = $1
org_product_idpricestatus
01989ca2-6a54-7834-8376-06a0251bacd84000.00pending
01989ca1-f2f8-7ab7-8269-7179342797cc1000.00pending

Assertion: At least one sales representative should be assigned to the account

SELECT saua.user_id, u.name as user_name, saua.active
FROM sales_account_user_assignments saua
JOIN users u ON u.id = saua.user_id
WHERE saua.sales_account_id = $1 AND saua.active = true
user_iduser_nameactive
17b8c9d0-e1f2-3456-1234-567890123456Bob Kauffmantrue

Assertion: Account should have status “proposed” or “active”

SELECT status FROM sales_accounts WHERE id = $1
status
proposed

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: Login and navigateuser_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 8: Submit and verifySales Account Creation Request

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:46:08.915Z

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

4 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:46:16Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:46:29Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:47:38Zuser_logsales_account:createddan.distributor@stellartech.comStellarTech Medical Solutions019db873-523e-735d-bb8c-87576f135122
2026-04-23 03:47:38Ztransactional_emailsales_account_creation_request_submittedZuriMED019db873-523e-735d-bb8c-87576f135122

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

1. New Sales Account Creation Request from StellarTech Medical Solutions

Section titled “1. New Sales Account Creation Request from StellarTech Medical Solutions”

Template: New_Sales_Account_Creation_Request_from_StellarTech_Medical_Solutions

New Sales Account Creation Request from StellarTech Medical Solutions

The following screencast recordings were captured but could not be matched to a specific test step. Step-matched recordings appear inline in their respective step sections above.