> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/event-editor/common-setups/vip-loyalty-purchases-meta-ads.md).

# Create a VIP purchase event

### What you'll build

A `VIPPurchase` event that fires only when a top-tier loyalty customer buys. You'll expose your loyalty app's data with a [custom data source](/event-editor/custom-data-sources.md), then create a [custom event](/event-editor/custom-events.md) conditioned on it.

Your loyalty app already knows who your best customers are. Most loyalty apps sync that data to Shopify as customer metafields, which the Event Editor can read. A VIP-only event lets a destination report on, trigger from, or optimize toward your most loyal buyers.

### What you need

* A loyalty app that writes VIP tier or points data to Shopify customer metafields (see the table below)
* At least one Littledata destination connected, for example [Meta Conversions API](/integrations/facebook-capi.md)
* Access to the Event Editor in the Littledata app

This setup works with any loyalty app that syncs customer metafields to Shopify. Examples:

| Loyalty app                   | Customer metafields                                       | Condition on     |
| ----------------------------- | --------------------------------------------------------- | ---------------- |
| Smile.io                      | VIP tier name                                             | Tier name        |
| Rivo                          | `vip_tier`, `status`, `points_balance`, `credits_balance` | Tier name        |
| LoyaltyLion                   | `points_pending`, `referral_url`                          | Points threshold |
| Yotpo Loyalty (Swell Rewards) | `point_balance`, `is_affiliate`                           | Points threshold |

{% hint style="info" %}
The exact metafield namespace and key depend on your app and setup; you'll find yours in the metafield list in step 1. Some apps need the sync switched on first. For example, Smile.io's VIP metafield sync is opt-in and available on its Growth plan and up.
{% endhint %}

### Steps

{% stepper %}
{% step %}

#### Expose the loyalty metafield

Go to **Settings → Custom Data Sources**.

Under **Customers**, find your loyalty app's tier or points metafield, for example Rivo's `vip_tier`, and select it.

If it doesn't appear, click **Refresh metafields** and check back in a few minutes. See [Custom data sources](/event-editor/custom-data-sources.md).
{% endstep %}

{% step %}

#### Add a custom event

Go to **Settings** for your destination, then open the [Events tab](/event-editor/getting-started.md).

Click **Add event**. Name the event `VIPPurchase`, or match the naming style your destination expects, and select **Purchase** as the base event. See [Derive a new custom event](/event-editor/custom-events.md).
{% endstep %}

{% step %}

#### Scope it with a trigger condition

Add a condition so the event only fires for your VIPs.

If your app writes a tier metafield, match on your top tier name:

| Field                  | Operation | Value  |
| ---------------------- | --------- | ------ |
| Loyalty tier metafield | `is`      | `Gold` |

If your app writes a points metafield instead, match on a points threshold that marks out your best customers:

| Field                    | Operation      | Value  |
| ------------------------ | -------------- | ------ |
| Loyalty points metafield | `greater than` | `1000` |

See [Trigger conditions](/event-editor/trigger-conditions.md).
{% endstep %}

{% step %}

#### Preview and save

Use the [event preview](/event-editor/event-preview.md) to check the payload, then click **Save**.
{% endstep %}
{% endstepper %}

## Destination notes

* **Meta**: in Events Manager, mark `VIPPurchase` as a custom conversion and choose it as a campaign's optimization event. Meta builds its audience model on your most loyal buyers.
* **GA4**: report VIP revenue share by channel, or mark the event as a key event.
* **Klaviyo**: use the event to trigger VIP-only flows.

## Verify it's working

1. Place a test order with a customer account in your top loyalty tier (or above your points threshold), or wait for a real VIP order.
2. Confirm the `VIPPurchase` event appears alongside the standard purchase event, for example in Meta **Events Manager**.

## Make it yours

This setup is a [custom event](/event-editor/custom-events.md) conditioned on an exposed metafield. Swap the condition to redraw the segment:

* No loyalty app? Condition on order value instead: `properties.total_price` `greater than or equal` your threshold gives you a high-value purchase event with no metafields needed.
* Loosen the condition to include your top two tiers, or lower the points threshold.
* Prefer audiences over a separate conversion? Skip the custom event and map the tier or points value onto the standard purchase event as a custom parameter instead. See [Remap existing events](/event-editor/field-mappings.md).
