Start with the money you intend to optimise
An ecommerce model can look convincing while answering the wrong question. Orders placed, gross revenue, net revenue and contribution profit are different outcomes. Choose one before joining the media data. If finance makes decisions on revenue after discounts and returns, a model trained on checkout value will need an explicit bridge to that measure.
- Reconcile orders
- Align refunds
- Record promotions
- Test a bounded budget
Write a one-page outcome contract: currency, tax treatment, shipping, discounts, cancellations, refunds and the date used for recognition. Keep the original transaction fields so the weekly series can be reproduced. The MMM data requirements guide provides the broader input checklist.
A useful model starts with a consistent outcome and a decision it can inform. The marketing mix modelling learning path connects this idea to the assumptions, practical checks and next steps.
To work through the connected decisions, read CPG MMM: separate media lift from price and promotion and MMM for profit: choose contribution over revenue alone.
Work through a promotion week
Suppose a fictional shop records £100,000 of full-price merchandise value, £20,000 of discounts and £10,000 of eventual returns. Net merchandise revenue is £70,000 before any other adjustments. Using £100,000 as the response overstates that week's retained value by £30,000. If the promotion also doubles paid social spend, the model could assign the combined promotion-and-media rise to advertising.
Keep effective selling price, promotion timing and availability alongside media inputs. Do not automatically add every downstream metric as a control: site visits and branded searches can be changed by the advertising you are trying to measure. Draw the causal sequence before choosing controls.
Handle refunds without looking into the future
Two legitimate calendars answer different questions. A transaction-date series recognises refunds when they occur. An order-cohort series revises the original purchase week when the return arrives. The first supports cash or accounting flows; the second can describe acquisition value once cohorts mature. Document which one the model uses.
For a historical holdout, reconstruct what was known at the forecast date. A fully matured cohort label can be used for evaluation, but feeding its future refund information into training features would leak information. Keep data-as-of snapshots and a maturity rule rather than silently changing old weeks.
Translate the model into a restrained action
If a channel's apparent gain is concentrated in discount events, compare specifications with credible promotion controls and inspect non-promotional periods. Ask whether the model has examples of the same media level with different discounts. Without that variation, a precise separation may not be supported.
For a proposed £5,000 budget increase, calculate the incremental net revenue and contribution under several plausible responses. Account for fulfilment capacity and stock. Start with a bounded change and an agreed review window. The price elasticity guide helps explain why a revenue lift can coexist with weaker margins.
A practical delivery checklist is to reconcile weekly totals to finance, flag revised weeks, compare gross and net outcomes, retain an untouched future period, and record a rollback condition. If returns are still immature, label the recommendation provisional instead of presenting the model as final.
Sources and further practice
This article’s worked example is illustrative, not a measured client result. Use the linked methodology to check the assumptions before applying it.