Skip to content

URS-023 · Generate Shipping Documentation Linked to Orders

Status: PASS  ·  Duration: 1m 58s  ·  Run Date: April 21, 2026


PASS

Step 1: Create order

Step 1: Create order

Step 1: Create order

Step 1: Create order


PASS

Step 2: Approve and find fulfillment

Step 2: Approve and find fulfillment

Step 2: Approve and find fulfillment

Step 2: Approve and find fulfillment

Step 2: Approve and find fulfillment

Step 2: Approve and find fulfillment


PASS

Step 3: Create shipment

Step 3: Create shipment

Step 3: Create shipment


PASS

Step 4: Verify package

Step 4: Verify package


PASS

Step 5: Verify linkage

Step 5: Verify linkage

PASS

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
019dadd8-919e-76b8-b235-630676c9c93eOR-1approved2026-04-21T02:22:24.655Z17b8c9d0-e1f2-3456-1234-567890123456

Fulfillment order created and linked to order request

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

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
019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4OR-1-FO-1created019dadd8-919e-76b8-b235-630676c9c93ea1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901100 Charles River Plaza, Suite 300BostonMA021142026-04-21T02:22:46.426Z

Fulfillment order items match ordered products

Section titled “Fulfillment order items match ordered products”
PASS

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
019dadd8-e6be-7eff-b505-83e20b54f73e019dadd8-e6bd-7aa9-bf74-3c54c8caf6a401978a05-ba4c-7f6d-91c8-bac1498e9bbeFiberLocker® Instrument (For Cadaver lab use)2FiberLocker® Instrument (For Cadaver lab use)FL2025CL
019dadd8-e6be-7eff-b505-83e391c009f2019dadd8-e6bd-7aa9-bf74-3c54c8caf6a401989ca2-6a54-7834-8376-06a0251bacd8SpeedPatch® PET3SpeedPatch® PETSP019N1A

Shipping package created with correct tracking

Section titled “Shipping package created with correct tracking”
PASS

Shipping package should exist with tracking number URS023-TEST-VALIDATION 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 = $1
AND sp.organization_id IN ($2, $3)
LIMIT 1
idtracking_numbercarrierstatusorganization_idcreated_at
019dadd9-796c-761c-a7d6-097954ce1709URS023-TEST-VALIDATIONupsin_transitb2c3d4e5-f6a7-8901-bcde-f123456789012026-04-21T02:23:23.984Z

Shipping package linked to fulfillment order

Section titled “Shipping package linked to fulfillment order”
PASS

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 = $1
AND sp.organization_id IN ($2, $3)
idshipping_package_idfulfillment_order_idtracking_numberorder_number
019dadd9-796f-745d-ac1a-d9af8983df15019dadd9-796c-761c-a7d6-097954ce1709019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4URS023-TEST-VALIDATIONOR-1-FO-1

Shipping package items contain correct products

Section titled “Shipping package items contain correct products”
PASS

Shipping package items should reference the ordered products with correct quantities

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 = $1
AND sp.organization_id IN ($2, $3)
ORDER BY spi.order_line_number
idpackage_idquantityorder_numberorder_line_numberskuproduct_id
019dadd9-796e-70c4-80c2-b459ba3e7ef9019dadd9-796c-761c-a7d6-097954ce17092FL2025CL01978a05-ba4c-7f6d-91c8-bac1498e9bbe
019dadd9-796e-70c4-80c2-b45a9c2707bd019dadd9-796c-761c-a7d6-097954ce17093SP019N1A01989ca2-6a54-7834-8376-06a0251bacd8

Fulfillment order exists with valid status

Section titled “Fulfillment order exists with valid status”
PASS

Fulfillment order should exist (status updates to shipped/delivered when tracking events arrive)

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
019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4OR-1-FO-1created