> ## 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.

# rc_purchase Event

> Track purchases from returning customers — automatically generated by Upstack

<Info>
  **Automatically Generated** — This event is created by Upstack backend services for Shopify customers. You do not need to fire this event manually.
</Info>

## Overview

The `rc_purchase` (Returning Customer Purchase) event is generated when Upstack detects a purchase from a customer who has ordered before. This event fires alongside the standard `purchase` event, enabling you to measure retention and optimize campaigns for repeat purchases.

## How It Works

When a purchase occurs, Upstack's backend analyzes the customer's order history:

1. **Order received** — Shopify sends a purchase webhook to Upstack
2. **Customer lookup** — Upstack checks if this customer ID has any previous orders
3. **Classification** — If the customer has at least one previous order, an `rc_purchase` event is generated
4. **Forwarding** — The event is sent to your configured destinations with proper attribution

The classification happens server-side using Shopify's customer order history, providing accurate returning customer detection regardless of browser cookies or device changes.

## Properties

This event includes all properties from the original `purchase` event:

| Property | Type   | Description                              |
| -------- | ------ | ---------------------------------------- |
| orderId  | string | Shopify order ID                         |
| value    | number | Order total value                        |
| currency | string | ISO 4217 currency code (e.g., `USD`)     |
| items    | array  | Products purchased                       |
| email    | string | Customer email (hashed for destinations) |
| phone    | string | Customer phone (hashed for destinations) |

No additional properties are added — the event is the purchase event with a different event name for segmentation.

## Destination Mapping

This event is forwarded to destinations as:

| Destination           | Event Name                  | Notes                                              |
| --------------------- | --------------------------- | -------------------------------------------------- |
| **Meta CAPI**         | `Purchase` with custom data | Includes `customer_type: returning` in custom data |
| **Google Ads**        | `purchase`                  | Can be filtered by event name in Google Ads        |
| **TikTok Events API** | `CompletePayment`           | Event name included for segmentation               |
| **Klaviyo**           | `Placed Order`              | Tagged as returning customer                       |
| **GA4**               | `purchase`                  | Custom dimension for customer type                 |

## Use Cases

* **Measure retention** — Track how well retention and loyalty campaigns drive repeat purchases
* **Optimize for LTV** — Train ad algorithms to find customers likely to purchase multiple times
* **Retargeting performance** — Measure the true ROI of retargeting campaigns
* **Segment reporting** — Compare new vs. returning customer metrics side by side

## Why This Matters

Understanding your returning customer purchase rate helps you:

* Balance acquisition vs. retention spend
* Identify which channels drive the most loyal customers
* Calculate customer lifetime value more accurately
* Optimize campaigns for long-term revenue, not just first-time purchases

## Related Events

* [purchase](/pixel/standard-events#purchase) — The base purchase event for all orders
* [nc\_purchase](/pixel/events/upstack-generated/nc-purchase) — New customer purchases
* [all\_purchase](/pixel/events/upstack-generated/all-purchase) — All purchases (combines NC + RC)
* [lapsed\_purchase](/pixel/events/upstack-generated/lapsed-purchase) — Purchases from lapsed customers who returned
