Updated: Jul 23, 2026 • 2 min read
Automate ecommerce discount performance reporting
Sales generated with a discount are not automatically sales generated by the discount. A promotion report should connect code usage with margin, customer type, product mix, returns, and repeat behavior so the team can distinguish useful offers from expensive leakage.
Why discount code usage is only the starting point
Shopify's sales report documentation explains that the Sales by discount codes report groups sales by discount and that orders can appear more than once when combinable discounts are used.
That report answers how codes were applied. A decision-ready workflow also asks:
- Did the offer acquire new customers or subsidize existing demand?
- Which products and margins absorbed the discount?
- Did discounted orders return at a higher rate?
- Did the promotion increase average order value or units per order?
- Did customers acquired by the offer buy again?
- Were expired, stacked, or unintended codes used?
Data to connect
Use read-only access to:
- Shopify orders, line items, discounts, refunds, and customer history
- Product cost and contribution margin inputs
- Campaign and affiliate identifiers
- Klaviyo or lifecycle campaign data
- Subscription and loyalty data, if applicable
Define how combined discounts, free shipping, gift cards, returns, and canceled orders are treated before comparing promotions.
Metrics and comparisons
For each discount or promotion, calculate:
- Orders and customers using the offer
- Gross and net sales
- Discount value
- Average order value and units per order
- Gross or contribution margin
- New versus returning customer mix
- Refund and return rate
- Repeat purchase rate after a defined window
- Code stacking or eligibility exceptions
Where possible, compare with a holdout, an unexposed segment, or a similar non-promotion period. Label observational comparisons clearly and do not present correlation as incremental lift.
Example Agent instruction
"Every Monday, report discount performance for active and recently ended promotions. Show orders, net sales, discount value, average order value, units per order, contribution margin, new customer share, return rate, and repeat purchase rate when the observation window is mature. Flag stacked codes, use outside eligibility rules, margin below threshold, and promotions with weak retention. Distinguish measured lift from descriptive comparison."
What the Agent should produce
A strong report contains:
- Promotion scorecard
- Margin and product mix impact
- Customer acquisition and retention quality
- Returns and refund impact
- Code leakage or stacking exceptions
- Recommendation to continue, revise, test, or stop
Every recommendation should state the evidence, confidence limit, and owner.
Implementation workflow
- Define promotion, margin, and customer status rules.
- Connect Shopify, lifecycle, and cost sources through Connectors.
- Reproduce one completed promotion manually.
- Validate combined discount and refund treatment.
- Schedule the weekly scorecard in a Document.
- Route pricing changes and code deactivation for human approval.
- Use Logs to trace missing cost or campaign data.
Review checklist
- Combined discounts are not double counted.
- Net sales include the agreed refund treatment.
- Margin uses complete product and variable cost data.
- Repeat purchase windows are mature.
- New and returning customers are defined consistently.
- Descriptive results are not called causal lift.
How to measure success
Track contribution margin by promotion, discount leakage, reporting hours, promotion decision time, new customer quality, and percentage of offers evaluated with a valid comparison.
Next step
Choose one recently completed promotion and reconcile its orders, discounts, refunds, and margin. Once the scorecard is trusted, schedule the report for every active offer. Book a demo to set up the workflow.