Module 7 · Business Analysis Fundamentals
User stories and acceptance criteria
Express requirements as user stories that keep the user and the reason in view, split them to a buildable size, and pin down "done" with Given/When/Then acceptance criteria.
About 30 minutes
The problem
Ashgrove has chosen a supplier who works in two-week sprints, the agile way of building software in small, usable pieces. The supplier's developer looks at your requirements list and asks: "Which of these do I build first? And how will you decide it's finished?"
Agile teams don't work from long specifications. They work from a backlog of small items, each describing something a user needs and why, and each with a clear test of "done". The standard format for those items is the user story, and writing good ones is now a core BA skill in almost every job advert.
A story from the field: the story with a missing ending
A logistics startup in Lagos wrote this user story for its mobile app: "As a customer, I want to track my parcel so that I know when it will arrive." The developers built a map with a moving dot, demoed it, and everyone applauded.
Two weeks after launch, support was flooded. A customer in Ikorodu opened the app, saw a spinning wheel and phoned to say the app was broken. Another saw the dot jump across the map. A third saw "Delivered" while her parcel was still on the road.
The story was fine. What was missing was the acceptance criteria, the list of conditions that must be true for the story to count as done. Nobody had asked: what happens when the phone has no network? What if the rider's GPS is off? When exactly does "Delivered" appear, and who confirms it?
The analyst rewrote the story with criteria:
Output
Given the customer has an active order
When they open the tracking screen
Then they see the rider's position, updated every 30 seconds.
Given the phone has no network
When the customer opens the tracking screen
Then they see the last known position and the message "Last updated at [time]".
Given the rider has not confirmed delivery
When the parcel is near the address
Then the status stays "On the way" and never shows "Delivered".With these three short examples, the developers knew the edge cases, the testers knew what to check, and the support team knew what to tell customers. A user story starts the conversation. Acceptance criteria finish it.
The concept
The user story format
As a [type of user], I want [something], so that [benefit].
- As an accounts officer, I want a list of invoices past their due date, so that I know who to chase each Monday.
The "so that" is the most important part. It tells the team why, which lets them suggest a better way to deliver the benefit, and it lets the product owner prioritise by value.
INVEST: what makes a good story
| Letter | Means |
|---|---|
| Independent | can be built in any order |
| Negotiable | the details are open to discussion, not a contract |
| Valuable | gives a user something useful on its own |
| Estimable | the team can size it |
| Small | fits in one sprint, ideally a few days |
| Testable | has clear acceptance criteria |
A story too big to build in a sprint is an epic: split it, usually by user, by step in the process, or by rule ("send reminders" → "first reminder", "second reminder", "don't remind clients on a payment plan").
Acceptance criteria: Given / When / Then
Each story has a few acceptance criteria that define "done", written as scenarios:
- Given a starting situation,
- When something happens,
- Then this is the result.
Write one for the normal case and one for each important exception. They become the tests the team and the business use to accept the story.
Example
As an accounts officer, I want clients to receive an automatic reminder before their invoice is due, so that fewer invoices go overdue without me phoning anyone.
Acceptance criteria
- Given an unpaid invoice due on 30 June, when it is 23 June, then the client receives a reminder email showing the invoice number, amount and due date.
- Given an invoice that was paid on 20 June, when it is 23 June, then no reminder is sent.
- Given a client on an agreed payment plan, when a reminder would be due, then no reminder is sent, and the invoice appears on the accounts officer's exceptions list.
Criterion 2 catches the embarrassing bug (reminding someone who has paid). Criterion 3 comes straight from a business rule found in lesson 6. Good criteria are where the BA's knowledge of the edge cases pays off.
A real-world scenario: writing stories for a ticket-booking app
A small bus company wants customers to book seats from their phones. The analyst breaks the need into stories using the standard shape: As a [who], I want [what], so that [why].
Story 1: As a traveller, I want to choose my seat, so that I can sit with my family.
Acceptance criteria (Given / When / Then):
Output
Given a bus with seats 1 to 40 and seats 5, 6 and 12 already booked
When I open the seat map
Then seats 5, 6 and 12 appear greyed out and cannot be selected.
Given I have selected seat 7
When I press "Continue"
Then seat 7 is held for me for 10 minutes while I pay.
Given I did not pay within 10 minutes
When the time runs out
Then seat 7 becomes available to other travellers again.
Given two travellers pick seat 7 at the same moment
When both press "Continue"
Then only the first receives the seat and the second sees "Seat just taken, please choose another".Notice what the criteria are doing: they answer the questions a developer would otherwise have to guess, including the awkward cases (the seat is taken, the time runs out).
Practical checks for a good story:
- Independent: it can be built without waiting for another story.
- Small: it can be finished within one iteration of work.
- Testable: each criterion has a clear pass or fail.
- Valuable: the "so that" gives a real reason. If you cannot write one, the story may not be needed.
Common mistakes: writing stories for the system ("As the database, I want...") instead of for a person, hiding several features in one story, and leaving out the failure cases.
Walkthrough
- Take your Must and Should requirements from lesson 6 and turn each into one or more user stories.
- Check each against INVEST. Split anything too big: "a billing system" is an epic; "see overdue invoices sorted by days overdue" is a story.
- Write acceptance criteria for each, covering the normal case and at least one exception.
- Order the backlog: highest value and lowest risk first. The due date and the overdue list come before automatic reminders, because reminders need them.
- Review the stories with the accounts officer. If she can't tell from a story what she'll be able to do, rewrite it.
Practice
Task
8 minWrite three user stories for Ashgrove's billing change, each in the form As a … I want … so that …, for at least two different users (for example the accounts officer, a partner, a lawyer or a client).
Your work is checked for
- Three stories in the form As a … I want … so that …
- At least two different users
- The benefit isn't just restating the want (so that is followed by at least four words)
Task
8 minWrite acceptance criteria for this story, in Given / When / Then form: As a partner, I want to see the total overdue for each of my clients, so that I can raise it when I speak to them. Write at least three scenarios: the normal case and at least two exceptions (for example a client with nothing overdue, or an invoice paid today).
Your work is checked for
- At least three scenarios with Given
- Each has a When
- Each has a Then
- Covers a client with nothing overdue
- Includes a specific number, amount or date
Check your understanding
Answer every question to check.