Architecture perspectiveAnalytics & BI

E-commerce analytics: reconcile orders, refunds, and margin

A dependable commerce model follows the customer and order journey from demand creation through payment, delivery, returns, and contribution.

GGMS Analytics3 min read
Customer completing a digital payment in a real retail environment

Central idea

Commerce performance cannot be understood from orders alone. Customer acquisition, payment, inventory, fulfilment, cancellation, return, discount, and product cost must remain connected at a usable grain.

Decision flow

Traffic & campaigns
Customer journey
Order & payment
Fulfilment & returns
Margin action

Technology context

Relevant platforms and patterns—not a prescribed stack.

Commerce APIsGoogle Analytics 4BigQuerySQLLooker StudioPower BI

Make refunds traceable to the original transaction

Retain order-line and transaction identifiers through payments, shipments, and refunds. An order with several items may have more than one shipment or refund. Aggregate those events to the intended grain before joining them, or the join can inflate revenue and cost. Use the order and payment systems to reconcile the ledger; web analytics captures a different part of the journey.

  • Test a partial refund, failed payment, duplicate purchase event, and split shipment.
  • Display the treatment of tax, shipping, discounts, fees, and product cost.
  • Reconcile event counts with the commerce backend and explain tracking gaps.

One order is a chain of events

An order may be created, paid, partially fulfilled, cancelled, returned, refunded, discounted, or replaced at different times. Reporting only the creation event can overstate demand and disconnect commercial performance from the customer experience and operational cost.

The data model should preserve order, item, customer, product, payment, promotion, shipment, and return identifiers so each view can be reconciled to the underlying journey.

Reconcile commercial meaning before visualizing it

Revenue, gross sales, net sales, discount, refund, shipping income, tax, product cost, and channel fees require explicit treatment. Finance, commercial, product, and operations teams should approve the definitions and timing rules used in the analytical layer.

  • Separate order date, payment date, fulfilment date, and return date.
  • Preserve original currency and approved conversion treatment.
  • Make cancellations, partial returns, and failed payments visible.
  • Connect stock availability and fulfilment performance to conversion signals.

Serve different decisions from one governed model

Leadership needs growth, margin, customer, and service signals. Trading teams need product, pricing, and promotion detail. Operations needs inventory, fulfilment, cancellation, and return visibility. Marketing needs acquisition and journey context. These views should use the same reconciled facts rather than separate exports.

Introduce prediction after the journey is stable

Demand forecasting, propensity, recommendations, and churn models become more useful when historical availability, promotions, customer consent, fulfilment, and returns are represented accurately. A model should not learn that an unavailable product had no demand or that a refunded order created full value.

Sources and further reading

Sources checked 9 September 2026.

This article offers implementation guidance, not a report of a GGMS client engagement. The sources below support the referenced technical concepts; the proposed checks should be adapted to your systems and reviewed by the relevant business owner.

Published external case studies

What organizations have put into practice

These are Microsoft-published customer stories, not GGMS projects or client endorsements. Summaries describe the publisher’s account; the lessons are our interpretation. Follow the source for its full context.

Marks & Spencer

Making a shared data platform usable across retail

Microsoft describes M&S using Azure Synapse Analytics and Power BI, with its BEAM team opening access to relevant data across the business and automating pipelines and reports.

Our reading: a shared platform needs an ownership and access model as well as data movement.

Read the Microsoft story about Marks & Spencer

Apply the thinking

Discuss the business challenge behind your data.

Start a conversation