1.Consumer feature with full acceptance criteria
When it fits: Use this when the user is a member of the public, the happy path is obvious, and the real work is in the timing rules and failure cases the criteria have to pin down.
Swap an out-of-stock item before the shopper picks it
Story: As a customer with a grocery order in progress, I want to choose a replacement when an item goes out of stock so that I do not receive a substitute I would never buy. Epic: [[Substitutions 2.0]] Priority: Must Estimate: 5 points
Context
- 18 percent of refunds in September were for unwanted substitutions; average refund $6.40
- Shoppers start picking about 90 minutes before the delivery window
Acceptance criteria
- Given my order has not started picking, when an item goes out of stock, then I get a push notification and up to 3 suggested replacements in the app.
- Given I pick a replacement, when the shopper reaches that aisle, then the shopper's app shows my choice instead of their own suggestion.
- Given I choose "No replacement", when the order is delivered, then the item is not charged and the receipt says "removed, out of stock".
- Given I have not answered within 20 minutes, when picking starts, then the shopper's default substitution applies and I am told which one.
Edge cases
- Replacement costs more: charge the difference only if it is under 20 percent, otherwise ask.
- Notifications turned off: show the choice on the order screen.
Out of scope
- Choosing replacements for items still in stock ("pre-approved substitutes"). Separate story.
Notes for the team
- Dependencies: stock feed from the store system updates every 5 minutes, which sets the earliest we can notify.
- Open questions: does "No replacement" refund delivery fees if the order drops below the minimum? (owner: Keiko)
Definition of done
- All four criteria pass on iOS and Android
- Event
substitution_chosenwith item and choice - Help center article updated