Examples / State diagrams
Order lifecycle
The states an online order moves through, from placed to delivered, with the cancel, refund and failed-payment paths.
- State diagram
- E-commerce
Open in Plotix
A copy you can edit, or ask the agent to change.
Plotix's agent drew it from this request
Draw a state diagram of an online order: placed, payment pending, paid, packed, shipped, delivered; payment failed, cancelled, return requested, refunded. Label each transition with the event that causes it.
What's in it
- Start
- Placed
- Payment pending
- Payment failed
- Paid
- Packed
- Shipped
- Delivered
- Return requested
- Refunded
- Cancelled
How the parts connect
- Start → Placed order submitted
- Placed → Payment pending payment started
- Payment pending → Paid payment authorized
- Payment pending → Payment failed payment declined
- Payment failed → Payment pending customer retries payment
- Payment failed → Cancelled retries used up
- Placed → Cancelled customer cancels
- Paid → Packed items packed
- Paid → Cancelled cancelled before packing
- Packed → Shipped carrier collects parcel
- Shipped → Delivered delivery confirmed
- Delivered → Return requested customer requests return
- Return requested → Refunded returned item received
- Cancelled → Refunded refund issued for paid order
More on state diagrams.
Related examples
OAuth login with PKCESequence · How a single-page app signs a user in with OAuth 2.0 authorization code and PKCE, from th…
Stripe checkout and webhookFlow · The steps from a cart to a paid order with Stripe Checkout, including the webhook that co…
Serverless API on AWSDeployment · Where a serverless web API runs on AWS: CloudFront and S3 for the site, API Gateway and L…