Sales email to ShipStation · 2026
Parse a sales email, hold it or build a label
Laboratoryscrocle.cloud/demo/shipstationIndependent engineer

Wholesale orders arrive as unstructured emails, and staff copy the shipping address, SKU, and quantity into ShipStation field by field. In the old workflow, a missing postal code still generated a shipping label, sending parcels to incomplete addresses. The system needed to parse the email, validate every address and line item, and halt incomplete orders before label creation.
The constraint
This demo does not watch Gmail and does not call a live ShipStation store. Extraction is patterns plus Pydantic, so every rule is readable and testable. Production would attach the inbox and POST the same JSON.
Built with
PythonFastAPIPydantic
How it works
Email in. Parse and validate. If it is complete, build order and label JSON. If not, hold. No live carrier.
Architectural calls and their cost
Every design choice, the operational pressure behind it, what it bought, and the ongoing maintenance cost.
Check before you print
A missing ZIP still produced a label in the old flow, so a bad address could ship before anyone read it.
Pydantic validators check city, state, postal code, and SKU quantities before building any carrier payload. Incomplete orders route to a hold queue, so no bad label reaches the warehouse floor.
The cost: An incomplete order stops, so a person has to resolve it before it ships.
Payloads you can read
An integration that posts straight to a live carrier cannot be reviewed before it acts.
The FastAPI app assembles the exact order and label JSON schemas that ShipStation’s REST API expects and renders them on screen without calling a live carrier, giving you a safe sandbox in the browser.
The cost: The demo stops short of the last step; a production build attaches the inbox and the store.
When orders arrive as plain text emails from distributors or sales reps, turning them into carrier labels has two failure modes: slow manual entry and unvalidated addresses that print bad labels.
This laboratory demo at scrocle.cloud/demo/shipstation shows the extraction and validation engine I put between an inbox and a fulfilment API. You select a sample inbound sales email and run the parser. Deterministic pattern rules extract the recipient, street address, city, state, postal code, and SKU line items, then pass the structured record through strict Pydantic validation models.
When every required field is present and valid, the FastAPI backend builds the exact order and shipping label JSON payloads required by ShipStation and renders a preview on screen. If a postal code is missing or a line item quantity is malformed, the pipeline refuses to build a label and parks the message in a hold state for human review. In a production deployment, the same FastAPI service attaches to your live mailbox via webhook and posts validated payloads straight to your store.
Current status and proof
Demo. Live at scrocle.cloud/demo/shipstation. The extract, validate, hold path runs against example orders.
- Complete orders generate ShipStation order and label JSON schemas, while incomplete addresses route to a hold queue.
- Extraction is patterns plus Pydantic, so every rule is readable and testable.
- No live carrier: the writes are simulated and no store is contacted.
- Live demo. The extract, validate, and hold path runs against example orders.
What was handed over
- How to run the FastAPI demo locally
- That ShipStation writes are simulated
- What a production inbox watch would add