> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Returning Customer CM1: Gross Margin From Repeat Orders

> Returning Customer CM1 is gross margin from every order after a customer's first: net revenue minus product and other COGS. How Upstack flags repeat orders.

> [!TIP]
>
> Returning Customer CM1 is the gross margin, in dollars, from repeat orders: everything a customer buys after their first order, minus discounts, refunds, and product cost.

## Formula

> [!NOTE]
>
> **RC CM1** = [**RC Net Revenue**](https://docs.upstackdata.com/reference/metrics/orders/revenue/returning-customer-net-revenue.md) − [**RC COGS**](https://docs.upstackdata.com/reference/metrics/orders/cogs/returning-customer-cogs.md) − **RC Other COGS**

### Formula Components

| Metric | Definition |
| - | - |
| [**RC Net Revenue**](https://docs.upstackdata.com/reference/metrics/orders/revenue/returning-customer-net-revenue.md) | Repeat-order gross revenue − discounts − refunds |
| [**RC COGS**](https://docs.upstackdata.com/reference/metrics/orders/cogs/returning-customer-cogs.md) | Product cost of items on repeat orders |
| **RC Other COGS** | COGS-category order fees on repeat orders |

| Metadata | |
| - | - |
| **Type** | Currency |
| **Data Source** | [Shopify](https://docs.upstackdata.com/sources/catalog/shopify.md), [Cost Settings](https://docs.upstackdata.com/analytics/cost-settings.md) |
| **Aggregation** | Sum |

***

## How It Works

For every Shopify customer, Upstack finds the earliest non-cancelled order it has on record. That one order is the new customer order. **Every other order from that customer is a returning customer order**, including a second order placed the same day. Orders with no customer attached are in neither group.

RC CM1 sums gross revenue, discounts, refunds, product cost, and COGS-category order fees across those returning orders. Subscription renewals that come through as Shopify orders for the same customer count here too.

Upstack recalculates the flags on all of a customer's orders whenever it processes new orders for that customer.

***

## Example

A beauty brand with an active loyalty program, one month:

| Component | Amount |
| - | - |
| RC gross revenue | \$176,000 |
| RC discounts (10% loyalty) | −\$17,600 |
| RC refunds | −\$7,040 |
| RC product COGS | −\$61,600 |
| RC Other COGS | −\$1,760 |
| **RC CM1** | **\$88,000** |

RC net revenue is \$151,360. New customers produced \$109,600 of net revenue and \$41,000 of CM1 the same month. So returning customers bring 58% of net revenue but 68% of gross margin. Repeat buyers are where this store's margin comes from.

***

## How to Interpret It

RC CM1 is gross margin you didn't have to pay to acquire this period. Its size relative to [NC CM1](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/new-customer-cm1.md) tells you how dependent the business is on new customer acquisition.

* **Growing faster than RC net revenue** means repeat buyers are trading up to higher-margin products or receiving smaller discounts.
* **Flat while returning orders grow** points at loyalty discounts or a shift to lower-margin replenishment items.
* **Falling after a promo** usually means sitewide discounts went to customers who would have bought anyway.

For acquisition decisions, RC CM1 is the payoff side of the equation. Compare the RC CM1 a cohort generates over time with what you paid to acquire it.

***

## Common Pitfalls

* **Missing history.** If Upstack doesn't have a customer's earlier orders, their next order is classified as a first order and RC CM1 is understated. This is most visible right after setup.
* **Missing product costs** inflate RC CM1. Set **Default COGS %** in [Cost settings](https://docs.upstackdata.com/analytics/cost-settings.md) as a fallback.

***

## FAQ

> [accordion] What counts as a returning customer order in Upstack?
>
> Any order from a Shopify customer that isn't their earliest non-cancelled order in Upstack. It doesn't matter how long ago the first order was or whether it falls in your selected range.

> [accordion] Does RC CM1 include ad spend or shipping?
>
> No. Shipping and payment fees come off at [RC CM2](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/returning-customer-cm2.md), and ad spend at RC CM3.

***

## Related Metrics

| Metric | Relationship |
| - | - |
| [CM1 (Gross Margin)](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/cm1.md) | Store-wide gross margin |
| [RC CM1 %](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/returning-customer-cm1-percent.md) | RC CM1 as a share of RC net revenue |
| [RC CM1 per Order](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/returning-customer-cm1-per-order.md) | RC CM1 per returning customer order |
| [NC CM1](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin/new-customer-cm1.md) | Gross margin from first orders |
| [Returning Customers](https://docs.upstackdata.com/reference/metrics/orders/customers/returning-customers.md) | Distinct customers with a repeat order |

[See all Contribution Margin metrics →](https://docs.upstackdata.com/reference/metrics/orders/contribution-margin)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.