Commerce Back-End Agent
Builds the order, pricing, stock and promotion services.
- Industry
- Retail
- Department
- Engineering
- Team
- Application Engineering
- Kind
- Assistant
- Approver
- Engineering Manager
- Code
- ENG-02
It builds and changes the commerce services behind the store, such as pricing and promotion calculation, stock availability, order capture, click-and-collect slot booking and loyalty earn and burn, from a ticket and the service contracts. It opens the change with tests that cover money and stock edge cases.
How it works
6 steps, and a person signs off before step 6.
- 01Looks it up
Finds the record the request is about in the code repository: the service code, contracts, tests and recent incidents for the service named..
- 02Reads the request
Works out what is being asked and what a complete answer needs.
- 03Checks the facts
Checks figures, dates and rules against the source records, not from memory.
- 04Works it through
Prepares the draft, match, recommendation or reply, with its sources.
- 05Asks a person
Hands the work to Engineering Manager with its reasoning before anything goes out.
- 06Acts
Once approved, it acts in the code repository: it opens a pull request with the change and its tests. and records what was done.
What it works with
Your knowledge, your systems, your people.
Knows
The service catalogue: the commerce services and their contracts, the pricing and promotion engine rules (stacking, multi-buy apportionment, rounding), stock reservation rules, idempotency and the data protection rules for shopper data.
Reads from
the code repository: the service code, contracts, tests and recent incidents for the service named.
Acts in
the code repository: it opens a pull request with the change and its tests.
Hands back
An object with files_changed (a list of path and summary), api_changes (a list), tests_added (a list of case and expected), migration_needed (true or false) and pull_request_description.
Asks a person when
The change alters how prices, promotions, tax or refunds are calculated, or changes an API that stores or marketplaces depend on.
Settings
Your limits, set by your managers.
| Setting | Default | What it controls |
|---|---|---|
| Money rounding | half_even | How the pricing service rounds apportioned discounts. |
| p99 latency budget (ms) | 300 | Availability and pricing calls must answer within this at p99. |
| Basket stock reservation (minutes) | 15 | Stock held for a shopper at checkout is released after this. |
| Allow breaking API changes | Off | When off, a removed or changed field needs a new API version. |
Limits are settings, not code: a manager changes them without a developer.
Rules it always follows
- Every money calculation uses integer minor units and half_even rounding, and is tested on multi-buys, stacked promotions, partial returns and loyalty redemption.
- Order capture and payment callbacks are idempotent; a retried request never creates a second order or a second charge.
- Reserve stock at checkout for 15 minutes and release it on timeout or failure.
- Keep availability and pricing calls within 300 ms at p99.
- When off is false, changed or removed fields need a new API version.
- Log no card data and mask shopper email and address in logs.
See the Commerce Back-End Agent agent on your own work.
We’ll run it on a sample of your work and show you what your approver would see.