Turn retail policies into consistent software behavior.
A promotion affects more than the original checkout. When a shopper returns one item from a bundle, the original discount allocation can determine the correct refund.
Written for: Merchandising lead, returns operations lead, ecommerce product owner, engineer.
No organization, policy, rule or record named here is real. Kandryn ships none of them. It works with the documented rules your own team supplies.
What the team is trying to get right
A returns operations lead needs one refund amount that every channel agrees on. The amount is not a calculation the team invents; it follows from the returns policy and from what the customer actually paid. What the lead owns is the policy, and the expectation that the store and the website apply it the same way on the same transaction.
What it costs to get wrong
A refund that uses the current catalog price instead of the amount paid is wrong in one direction during a promotion and wrong in the other after it ends. It is also quiet: the customer who is overpaid does not call, so the error surfaces as margin loss in a monthly report rather than as a bug. A difference between the store and the website is worse, because it reaches a customer who can see both.
Where the meaning lives
Four sources, each contributing something the others do not. Kandryn reads the ones your team supplies and connects them to the request. It ships none of these rules, and it has no library of them.
| Source | What it contributes |
|---|---|
| Returns policy | What the shopper is entitled to receive for a returned item. |
| Promotion terms | How a bundle discount is allocated across the items in it. |
| The original transaction line | The recorded price and allocated discount for the item being returned. |
| The work item and its acceptance criteria | Which channels the change has to cover and what the expected refund is. |
Why the ticket alone is not enough
Support partial returns for promotional bundles.
That sentence has two defensible readings, and they produce different software.
- Refund the item's current price, which is simple and wrong whenever a price has moved.
- Refund the amount paid on the original transaction, after the discount allocated to that item.
The returns policy refunds the original item amount after its allocated promotion discount.
What still needs a person
The policy settles which amount. It does not settle how fractional cents are handled when a multi-quantity line is partially returned, and that rounding decision belongs to the retailer, because it is a question about money rather than about arithmetic.
What Kandryn does with it
- The work item it starts from
- The request to support partial bundle returns, with the acceptance criteria naming the channels.
- The background it follows
- The parent initiative, and the passages of the returns policy and promotion terms that bear on allocation.
- The repository it reads
- The selected files behind the refund path and the transaction model.
- What it proposes
- A calculation that reads the recorded allocation rather than recomputing a discount, and an acceptance example stated in money.
- What reviewers get back
- The proposed change on its own branch, and the record of which policy passages and files informed it.
How much should the customer receive for one returned bundle item?
A retailer sells an item with a $50 original price as part of a promotional bundle. The transaction allocates $10 of the bundle discount to that item. The returns policy refunds the amount originally paid for the returned item.
- Request
- Support partial returns for promotional bundles.
- Source
- Returns policy (sample), promotional returns section
- Operating rule
- Refund the original item amount after its allocated promotion discount.
- Original price
- $50
- Allocated bundle discount
- minus $10
- Amount paid
- $40
- Expected refund
- $40
$50 original price minus $10 allocated discount is a $40 refund.
Tax and tender are out of scope for this example. A real change would state how both are handled.
Business review
Does the refund match the retailer's treatment of partial promotional returns?
Engineering review
Does the implementation use the recorded transaction allocation, and does the acceptance example hold across the supported return channels?
Where it gets hard
The cases a first implementation usually misses. Two of them have a right answer. At least one does not, and belongs to whoever owns the rule.
The catalog price changes after the original sale.
The refund does not move. This is the case that separates an implementation reading the transaction from one reading the catalog, and it is worth writing as a test even though nothing in the ticket mentions it.
The same item is returned twice.
The second return refunds nothing. A refund path that recalculates from the original line without checking what has already been returned will pay out again.
A multi-quantity line is partially returned and the allocation does not divide evenly.
The rounding rule is the retailer’s decision. A proposal should surface the fractional-cent question rather than silently round one way.
Question for the domain owner
When the rule changes
- What changes
- A new allocation method is introduced for future promotions.
- What your team does
- Merchandising defines the new method and the date it applies from, and decides that historical transactions keep the allocation recorded against them.
- What the next run sees
- The updated promotion terms are uploaded and the repository index refreshes after the next Kandryn commit, so a later run proposes against the current rule rather than the old one. Kandryn does not notice a promotion changing on its own.
Kandryn does not detect changes outside your project. It refreshes its repository index after a Kandryn commit and selects relevant material for each run. Your team maintains its own source policies, requirements and documents.
How to judge whether it helped
- The request to bring
- One promotion type and one partial-return scenario, across two channels the team already supports.
- Who needs to be there
- A returns operations lead who owns the policy, and an engineer who knows the transaction model.
What to measure
Agree these before the run and compare them with how the same work goes today. They are things to measure, not results we are promising.
- Whether the store and digital paths produce the same amount on the same transaction.
- Effort spent clarifying the policy before anyone could judge a proposal.
- Corrections requested before the change was accepted.
Discuss a retail operating rule.
Bring the request, the rule behind it, and one example of the result you expect. We will walk through the context Kandryn identifies, the change it proposes, and what your reviewers would inspect before deciding.