> ## 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 Units Sold: Repeat Buyer Quantity

> Track total product units purchased by returning customers. Analyze repeat buyer basket size and loyalty trends compared to first-time buyers.

<Tip>
  Total product units purchased by returning customers who have previously placed an order.
</Tip>

## Formula

<Info>
  **Returning Customer Units Sold** = **SUM** ( Units ) **WHERE** [customer\_type = returning\_customer](/data-dictionary/measures-and-dimensions#visitor-dimensions)
</Info>

### Formula Components

| Metric                                                                                                  | Definition                                                 |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| **Units**                                                                                               | Product quantity from order line items                     |
| [**customer\_type = returning\_customer**](/data-dictionary/measures-and-dimensions#visitor-dimensions) | Filters to orders from customers who have purchased before |

| Metadata        |                             |
| --------------- | --------------------------- |
| **Type**        | Number                      |
| **Data Source** | [Shopify](/sources/shopify) |
| **Aggregation** | Sum                         |

***

## Example

Your store sold **5,895 units** to returning customers this month:

| Week   | RC Units | RC Orders | Units/Order |
| ------ | -------- | --------- | ----------- |
| Week 1 | 1,412    | 398       | 3.5         |
| Week 2 | 1,523    | 435       | 3.5         |
| Week 3 | 1,489    | 426       | 3.5         |
| Week 4 | 1,471    | 420       | 3.5         |

***

## How It Works

Returning Customer Units Sold sums the quantity of all line items from orders placed by customers who have previously purchased. A customer is classified as "returning" if they have at least one prior order in Shopify. This metric helps you understand the purchasing volume of your loyal customer base.

***

## When to Use

| Scenario                      | Action                                                          |
| ----------------------------- | --------------------------------------------------------------- |
| Measuring loyalty basket size | Compare units per order for returning vs new customers          |
| Evaluating retention programs | Track if repeat buyers purchase more units after loyalty launch |
| Inventory planning            | Forecast demand from returning customer segments                |
| Lifetime value analysis       | Monitor unit volume growth from your retained base              |

***

## Related Metrics

| Metric                                                                                                    | Relationship                                          |
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [Units Sold](/reference/metrics/orders/counts/units-sold)                                                 | Total units across all customers                      |
| [New Customer Units Sold](/reference/metrics/orders/counts/new-customer-units-sold)                       | Units from first-time buyers (compare to this metric) |
| [Returning Customer Units Per Order](/reference/metrics/orders/counts/returning-customer-units-per-order) | This metric ÷ Returning Customer Orders               |
| [Returning Customers](/reference/metrics/orders/customers/returning-customers)                            | Count of repeat buyers                                |

[See all Order Counts metrics →](/reference/metrics/orders/counts)
