Example: ecommerce user story

split user stories - agile user story
split user stories - agile user story

This blog purpose many articles about user-stories. But we will take an example with an ecommerce user story. Some peoples ask us to create real example to explain the creation of one user-story.

Here is our context

To create our user stories, I purpose you a simple context: an ecommerce website.

ecommerce context
ecommerce context – ecommerce user story

We will create a user-story with this context. Our customer who is an user of our ecommerce website, want buy a perfume. For that, he needs to add a product in the cart.

So, we have a title of our user-story:

Add a product in the cart

We create our user-story

We use the user-story format because we want to ensure that we will be customer focus. For that, we will use this classic format:

As a <persona>, 
I want <goal/desire> 
So that <benefit>

We will write the description of our user-story with this format:

As a customer,
I want to add a product in my cart
So that I buy this product

The benefit is logic so you can avoid to write the third part. Everybody can understand that the customer want buy the product.

But is it sufficient for the developer? No… So, we have to add more information about this story.

For this article, I will decide to use the story A4 format; it’s an effective format and easy to use.

Article: Story A4: effective user-story format

Here is an image that represent this story A4 :

story A4
story A4 – ecommerce user story

Now, we will write the management rules of our user-story :

ok if stock > 0 and preorder = 0
    take off 1 of the stock
ok if preorder = 1
ok if the product is visible

It’s very important to use easy words and syntaxe to write the management rules. It will be easier for everybody to understand the whole user story.

And to finish our user story, we have to write our acceptance tests. For that, we will use the gherkin language :

Given I'm in the product of id "1234"
And the stock is “0”
And the preorder activation is "0"
And the visibility of product is "1"
And the visibility of product is "1"
When I add the product in my cart
Then my cart send me the error message "impossible to add
the product in your cart"

Given I'm in the product of id "1235"
And the stock is “0”
And the preorder activation is "1"
And the visibility of product is "1"
When I add the product in my cart
Then the product of id "1235" is added in my cart

Given I'm in the product of id "1236"
And the stock is “1”
And the preorder activation is "0"
And the visibility of product is "1"
When I add the product in my cart
Then the product of id "1236" is added in my cart

Given I'm in the product of id "1237"
And the stock is “1”
And the preorder activation is "0"
And the visibility of product is "0"
When I add the product in my cart
Then my cart send me the error message "impossible to add
the product in your cart"

When you purpose that at the development team, you have more chance that the development team understand the work to do. Now, you have a complete user story.

Conclusion ecommerce user story

I hope that you well understand how to create a complete user-story. If it’s your first time in an agile team, I advice you to use the story A4 format that is very easy to use.

(Visited 29 times, 1 visits today)
About Judicaël Paquet 88 Articles
Judicaël package (agile coach and senior devops) My activities in France and Switzerland: - agile transformation architect - customized agile training - sensitization and manager coaching - agile maturity audits and situations - agile coaching (teams, orga, product owner, scrum master, agile coach) Specialties: scrum, kanban, management 3.0, scalability, lean startup, agile method.

Be the first to comment

Leave a Reply

Your email address will not be published.


*