> ## 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 Opex: Retention Operating Expenses

> Track operating expenses for returning customer orders. Understand opex costs allocated to customer retention.

<Tip>
  Returning Customer Opex tracks user-defined operating expenses allocated to repeat buyer orders.
</Tip>

## Formula

<Info>
  **RC Opex** = **SUM** ( Order Cost Entries ) **WHERE** category = Operating Expenses **AND** customer\_type = returning\_customer
</Info>

### Formula Components

| Metric                                                                                                  | Definition                                             |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| **Order Cost Entries**                                                                                  | User-defined costs configured in Upstack Cost Settings |
| **category = Operating Expenses**                                                                       | Filters to costs categorized as opex                   |
| [**customer\_type = returning\_customer**](/data-dictionary/measures-and-dimensions#visitor-dimensions) | Filters to repeat buyer orders                         |

| Metadata        |                                                                      |
| --------------- | -------------------------------------------------------------------- |
| **Type**        | Currency                                                             |
| **Data Source** | [Upstack Costs](/sources/upstack-costs), [Shopify](/sources/shopify) |
| **Aggregation** | Sum                                                                  |

***

## Example

Your Shopify store has **\$10,000** in operating expenses for **300 returning customer orders**.

| Metric                    | Value    | Calculation              |
| ------------------------- | -------- | ------------------------ |
| Returning Customer Orders | 300      | Repeat buyers            |
| RC Opex                   | \$10,000 | Sum of opex cost entries |
| RC Opex Per Order         | \$33.33  | \$10,000 ÷ 300           |

This represents the portion of operating expenses attributable to repeat customers.

***

## How It Works

Operating expenses are allocated to returning customer orders based on your cost configuration. This helps you understand the true overhead burden of customer retention including fixed business costs.

***

## When to Use

| Scenario                         | Action                                          |
| -------------------------------- | ----------------------------------------------- |
| Complete retention profitability | Include opex in RC profitability                |
| Break-even analysis              | Understand overhead per returning customer      |
| Scaling decisions                | Model how RC opex changes with retention volume |
| NC vs RC opex comparison         | Compare overhead allocation patterns            |

***

## Related Metrics

| Metric                                                                                                                 | Relationship                            |
| ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| [Opex](/reference/metrics/orders/contribution-margin/opex)                                                             | Total operating expenses for all orders |
| [NC Opex](/reference/metrics/orders/contribution-margin/new-customer-opex)                                             | Opex for new customer orders            |
| [RC Agency Fees](/reference/metrics/orders/contribution-margin/returning-customer-agency-fees)                         | Agency costs for returning customers    |
| [Returning Customer Total Cost %](/reference/metrics/orders/contribution-margin/returning-customer-total-cost-percent) | All costs as percentage for RC orders   |

[See all Contribution Margin metrics →](/reference/metrics/orders/contribution-margin)
