When a story is not enough
"As a customer, I want to return an item so that I get my money back" is a fine story. Then refinement starts: what if the return window has passed, what if the item was a gift, what if only one of three items comes back, what if the customer wants an exchange instead of a refund. Eight acceptance criteria later the story is a wall of text and the developer still asks "what happens after the carrier scan?".
A use case is the tool for this. It describes one actor achieving one goal through the system, as a numbered main flow with named branches. It is older than user stories and still the clearest format for anything with more than three branches: returns, claims, onboarding, approvals.
The skeleton
Every use case has the same parts, and the order matters:
| Part | What goes there |
|---|---|
| Name | verb + object: "Return an item" |
| Actor | who starts it (Customer) and who else takes part (Support, Carrier system) |
| Goal | one sentence: get a refund or replacement for an item |
| Preconditions | what must be true before step 1: the order is Delivered; the customer is logged in |
| Trigger | what starts it: the customer opens the order and chooses "Return" |
| Main flow | numbered steps, actor and system alternating, happy path only |
| Alternative flows | legitimate different paths that still reach the goal |
| Exception flows | paths where the goal is not reached, and what happens instead |
| Postconditions | what is true at the end: refund issued, stock updated, status Returned |
The main flow
Write it as a dialogue: the actor does, the system responds. One action per step, no branches, no "if".
Use case UC-12: Return an item
Actor: Customer. Secondary: Carrier system, Warehouse, Payment provider.
Preconditions: order status Delivered; customer logged in.
Trigger: customer chooses "Return" on an order line.
Main flow
1. Customer selects the item(s) and quantity to return.
2. System checks the return window and item eligibility.
3. System shows the refund amount and the return methods (drop-off, pick-up).
4. Customer selects a method and confirms.
5. System creates the return, generates a label, e-mails it, sets the line to Return requested.
6. Carrier system reports the parcel scanned.
7. System sets the line to In transit and notifies the customer.
8. Warehouse confirms receipt and condition.
9. System issues the refund via the payment provider and sets the line to Returned.
10. System e-mails the refund confirmation.
Ten steps, two of them from other systems. If the main flow is longer than about fifteen steps, it is two use cases.
Alternatives and exceptions: where the work is
Now go through every step and ask "what else could happen here?". Each answer is a branch, named after the step it leaves:
Alternative flows
1a. Customer selects fewer than all items on the line (partial return).
→ continue at 2 with the selected quantity; refund is pro-rata.
3a. Customer chooses exchange instead of refund.
→ system shows available sizes; at 9 creates a replacement order instead of a refund.
4a. Customer abandons before confirming.
→ nothing is created; the return window keeps running.
Exception flows
2a. Return window has passed.
→ system shows "Returns accepted within 14 days of delivery", offers Contact support. Ends.
2b. Item is not returnable (hygiene, personalised).
→ system shows the reason from the product page. Ends.
6a. No carrier scan within 10 days of the label.
→ system reminds the customer; after 14 days cancels the return (status back to Delivered). Ends.
8a. Warehouse reports the item damaged or not as described.
→ return goes to the Claims queue; customer informed; refund on hold. Ends in Claims.
9a. Payment provider refuses the refund (card expired).
→ system issues store credit and informs the customer. Continues at 10.
This is the part no user story contains and every tester needs: eight branches, each with a step number, an outcome and an end state. Reading them back against the status state machine from the shared topics is a good cross-check: every "Ends" must land on a real status.

From use case to stories and tests
The use case is the source; the backlog is derived from it:
- Stories come from slices of the flow: the main flow with one method first (drop-off only), then pick-up (the second return method in step 3), then exchanges, then the exception handling for 6a and 8a. Each story quotes the use case steps it covers.
- Acceptance criteria come from branches: each alternative and exception is at least one Given/When/Then.
- Test cases are the branches plus their boundaries (a return on day 14 versus day 15 after delivery, for 2a).
Keep one link: the story says "covers UC-12 steps 1–5, exception 2a". When the use case changes, you know which stories to re-check.
Common mistakes
- UI in the steps. "Customer clicks the blue Return button in the top right" ties the use case to a design that will change. Say what, not where.
- Branches inside the main flow. "If the window has passed, show an error" in step 2 makes the flow unreadable by step 6. Branches have their own section.
- Exceptions without an ending. Every exception says where it ends: a status, a queue, a message. "Show an error" is not an ending.
- Forgetting the secondary actors. Carrier and payment provider steps are where timeouts and failures live; leaving them out leaves out the hardest exceptions.
With AI
A model drafts a plausible main flow from a one-line goal in seconds, and it is a fair skeleton to correct. It is weak at exceptions that depend on your business (the hygiene rule, the 10-day scan deadline, store credit on refund failure) and it will happily invent them. Use the draft for structure, then walk every step with the people who handle returns and ask "what else happens here?". Their answers are the use case.
Try it (5–10 minutes)
Goal: "A patient books an appointment with a specific doctor through the clinic's website."
- Write the skeleton: actors (including the calendar system and the SMS provider), preconditions, trigger, postconditions.
- Write the main flow in 8 to 12 steps, actor and system alternating.
- Add at least three alternatives and four exceptions, each named by step, with an ending. Cross-check: does every ending land on an appointment status you could draw?
Where this shows up in real work
- BA job posts in banking, insurance, healthcare and public sector still ask for "use case specifications" and "functional specifications"; the interview exercise is a flow with exceptions.
- In real teams the use case is what the test lead asks for when the acceptance criteria stop fitting in the story; writing it first saves the rewrite.
- Freelance specification work for custom software is mostly use cases; clients understand "main flow and what can go wrong" better than any other format.
Sources worth reading
Practice it on real drills
Use case specificationUser stories & acceptance criteriaEntity lifecycle / state machine