> For the complete documentation index, see [llms.txt](https://hthcapital.gitbook.io/izigift-help-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hthcapital.gitbook.io/izigift-help-docs/basics/klaviyo-integration/klaviyo-gift-card-data-sync.md).

# Gift Card Data Sync

## Overview

The Gift Card Data Sync feature pushes your customers' gift card data directly to their Klaviyo profiles as custom properties. This lets you build Klaviyo segments and flows based on gift card balances, card counts, and more — without any manual data exports.

### What gets synced

Each customer profile in Klaviyo receives the following custom properties:

| Klaviyo Property                     | Type   | Description                                                                           |
| ------------------------------------ | ------ | ------------------------------------------------------------------------------------- |
| `izigift_gift_card_balance`          | Number | Total current balance across all gift cards                                           |
| `izigift_gift_card_count`            | Number | Total number of gift cards                                                            |
| `izigift_gift_card_total_value`      | Number | Total initial value of all gift cards                                                 |
| `izigift_currency`                   | String | Your shop's currency code (e.g. `USD`, `EUR`, `GBP`)                                  |
| `izigift_last_gift_card_received_at` | Date   | When the customer last received a gift card                                           |
| `izigift_gift_cards`                 | Array  | Up to 20 most recent gift cards with code, balance, initial value, currency, and date |
| `izigift_gift_card_synced_at`        | Date   | When this profile was last synced                                                     |

### How it works

* **Manual sync** — Triggered from the iziGift admin. Syncs all customers who have gift cards and already exist as profiles in Klaviyo. Customers not in Klaviyo are skipped (profiles are not created).
* **Test sync** — Sync a single customer from the preview modal to verify data before running a full sync.
* **Daily auto-sync** — Automatically re-syncs all previously synced customers every day at 2:00 AM to keep balances and card data up to date.
* **Real-time sync** — After a gift card is redeemed, the affected customer's profile is automatically updated in Klaviyo with their new balance and card data.

> **Important:** Only customers who already have a profile in Klaviyo will be synced. This feature does not create new Klaviyo profiles.

***

## Setup

### 1. Prerequisites

Before enabling gift card data sync, make sure:

* Your Klaviyo integration is connected in iziGift with the appropriate scopes (see [Klaviyo Integration](/izigift-help-docs/basics/klaviyo-integration.md) for setup)

#### read\_customers permission (recommended)

For the best results, iziGift needs the **read\_customers** Shopify permission to attach recipient email and customer data to gift cards imported from outside of iziGift (e.g. gift cards created directly in Shopify admin or via another app).

If this permission hasn't been granted, a banner will appear on the Klaviyo settings page. Click **Grant Permission** to approve it. Once granted, iziGift will automatically refresh your gift card data in the background — and if gift card sync is already enabled, the Klaviyo sync will run automatically once the refresh finishes.

> **Note:** Gift cards issued through iziGift always include recipient data and are not affected by this permission.

### 2. Enable Gift Card Data Sync

1. In iziGift, go to **Settings → Integrations → Klaviyo**.
2. Find the **Gift Card Profile Sync** section.
3. Click **Enable** to turn on gift card sync.

### 3. Preview and test sync

Before running a full sync, you can preview what will be synced and test with individual customers:

1. Click **Preview & Test Sync** to open the preview modal.
2. The modal shows your 10 most recent gift card recipients with their current balance, card count, last received date, and sync status.
3. For any customer in the list, click the **Test Sync** button to sync just that one customer immediately.
4. After syncing, the status updates to show whether the profile was **Synced**, **Not in Klaviyo** (skipped), or **Failed**.
5. For synced profiles, a **View in Klaviyo** link lets you open the profile directly in Klaviyo to verify the data.

> **Tip:** Use test sync to confirm your Klaviyo API key has the correct permissions and that data appears as expected on the profile before syncing all customers.

### 4. Run your first full sync

After verifying with test sync, click **Run Sync** to sync all your existing gift card recipients in batches.

You can monitor the sync progress on the same page. The status will show:

* **In Progress** — Sync is running
* **Completed** — All customers processed
* **Failed** — Something went wrong (check your API key permissions)

If this is your first time enabling gift card sync, the page will show **"No sync has been run yet — click Run Sync to get started"** until you run your first sync.

The sync summary shows how many profiles were **synced**, **skipped** (not found in Klaviyo), or **failed**.

### 5. Enable daily auto-sync (optional)

To keep your Klaviyo profiles automatically up to date:

1. On the Klaviyo settings page, check **Daily auto-sync (2:00 AM)**.
2. Every day at 2:00 AM, iziGift will re-sync all previously synced customers with their latest gift card balances and data.

Daily auto-sync only runs after your first manual sync has been completed. It updates customers who were included in a previous sync — it does not discover new gift card recipients. Run a manual sync periodically to pick up new recipients.

***

## Removing synced data from Klaviyo

If you need to remove all iziGift gift card data from your Klaviyo profiles, you can do so directly from the settings page.

1. After running at least one sync, the **Remove Synced Data** button appears inline next to the last synced date.
2. Click **Remove Synced Data**. A confirmation dialog will list all the properties that will be removed.
3. Confirm to start the removal process.

The removal job processes all previously synced profiles in batches and fully deletes the following properties from each Klaviyo profile:

* `izigift_gift_card_balance`
* `izigift_gift_card_count`
* `izigift_gift_card_total_value`
* `izigift_currency`
* `izigift_last_gift_card_received_at`
* `izigift_gift_cards`
* `izigift_gift_card_synced_at`

The removal status will show as **In Progress** while running, and **Completed** when finished. Once complete, the local sync tracking data is also cleared.

> **Note:** This performs a true deletion of the properties from Klaviyo profiles (not just setting them to null). Any Klaviyo segments or flows that reference these properties will stop matching affected profiles.

***

## Using the synced data in Klaviyo

### Building segments

Use the synced properties to create targeted segments in Klaviyo. Go to **Klaviyo → Lists & Segments → Create Segment** and use conditions like:

* **Customers with unused gift cards:** `izigift_gift_card_balance` is greater than `0`
* **High-value gift card holders:** `izigift_gift_card_balance` is greater than `100`
* **Customers with multiple gift cards:** `izigift_gift_card_count` is greater than `1`
* **Recently received a gift card:** `izigift_last_gift_card_received_at` is in the last 30 days

### Using properties in email templates

You can personalize emails with gift card data using Klaviyo profile properties. Use these merge tags in your email templates:

| Merge Tag   | Output                                          |
| ----------- | ----------------------------------------------- |
| \`{{ person | lookup:'izigift\_currency' }}\`                 |
| \`{{ person | lookup:'izigift\_gift\_card\_balance' }}\`      |
| \`{{ person | lookup:'izigift\_gift\_card\_count' }}\`        |
| \`{{ person | lookup:'izigift\_gift\_card\_total\_value' }}\` |

**Example — Display a formatted balance with currency symbol:**

Klaviyo's `{% currency_format %}` tag converts a number into a formatted currency string using your account's currency setting (configured in **Settings → Organization → Organization language and regional format**):

```
You have {% currency_format person|lookup:'izigift_gift_card_balance' %} in gift card credit!
```

Outputs: `You have $25.00 in gift card credit!`

If your shop uses a different currency than your Klaviyo account default, or you want to show the currency code explicitly, you can use a conditional:

```
{% if person|lookup:'izigift_currency' == 'USD' %}${% elif person|lookup:'izigift_currency' == 'EUR' %}€{% elif person|lookup:'izigift_currency' == 'GBP' %}£{% elif person|lookup:'izigift_currency' == 'CAD' %}CA${% else %}{{ person|lookup:'izigift_currency' }} {% endif %}{{ person|lookup:'izigift_gift_card_balance' }}
```

**Example — Remind customers about unused gift cards:**

```
Hey {{ first_name }}, you still have {{ person|lookup:'izigift_gift_card_count' }} gift card(s) with a total balance of {% currency_format person|lookup:'izigift_gift_card_balance' %}. Don't let them go to waste!
```

### Building flows

Create automated flows triggered by gift card data. Some ideas:

* **Dormant gift card nudge** — Target customers who received a gift card more than 30 days ago but still have a balance. Create a segment of customers where `izigift_gift_card_balance` is greater than 0 and `izigift_last_gift_card_received_at` is more than 30 days ago, then trigger a flow from that segment.
* **Birthday gift card reminder** — Combine Klaviyo's birthday data with `izigift_gift_card_balance` to remind customers they have gift card credit to spend on their birthday.
* **VIP gift card holders** — Send exclusive offers or early access to customers with high gift card balances or multiple cards.

To build these, create a Klaviyo flow triggered by a segment, or use a metric-triggered flow combined with conditional splits based on the `izigift_*` profile properties.

***

## The gift cards array

The `izigift_gift_cards` property contains an array of up to 20 of the customer's most recent gift cards. Each entry includes:

```json
{
  "code": "abc-1234",
  "balance": 25.00,
  "initial_value": 50.00,
  "currency": "USD",
  "received_at": "2026-03-15T12:00:00+00:00"
}
```

You can use this array in Klaviyo templates to display individual gift card details. For example, to show a list of active gift cards in an email:

```
{% for card in person|lookup:'izigift_gift_cards' %}
  {% if card.balance > 0 %}
    Gift Card {{ card.code }}: {% currency_format card.balance %} remaining
  {% endif %}
{% endfor %}
```

> **Note:** If a customer has more than 20 gift cards, only the 20 most recent are included in this array. The top-level properties (`izigift_gift_card_balance`, `izigift_gift_card_count`, etc.) always reflect the totals across all gift cards.

***

## FAQ

**Does syncing create new profiles in Klaviyo?** No. Only existing Klaviyo profiles are updated. If a gift card recipient doesn't have a Klaviyo profile, they are skipped.

**How often does real-time sync happen?** Real-time sync runs automatically whenever a gift card is redeemed. The updated balance is pushed to Klaviyo within seconds.

**Can I run a manual sync more than once?** Yes. Running a manual sync again will update all profiles with the latest data. It's safe to run as many times as needed.

**What does test sync do?** Test sync lets you sync a single customer's gift card data to Klaviyo from the preview modal. It runs immediately (not queued) so you can verify the data appears correctly on the Klaviyo profile before committing to a full sync.

**What does daily auto-sync do?** When enabled, daily auto-sync re-syncs all previously synced customers every day at 2:00 AM. This catches any changes from gift card redemptions, new cards issued, or manual balance adjustments that may have been missed. It only updates customers from previous syncs — it does not discover new gift card recipients.

**Can I remove the synced data from Klaviyo?** Yes. Click **Remove Synced Data** on the Klaviyo settings page. This fully deletes all `izigift_*` properties from every previously synced Klaviyo profile. The removal is permanent — you would need to run a new sync to restore the data.

**What currency format is used?** The `izigift_currency` property uses your shop's Shopify currency code (e.g. `USD`, `EUR`, `GBP`, `CAD`). Balances are stored as numbers so Klaviyo can use them in comparisons and filters. Each individual gift card in the `izigift_gift_cards` array also includes its own currency.

**What if a customer's email is a phone number?** Some gift card recipients may have a phone number instead of an email. These are skipped during sync since they can't be matched to a Klaviyo profile by email.

**Why do some gift cards have missing recipient data?** Gift cards created outside of iziGift (directly in Shopify admin or via another app) may be missing recipient email data unless iziGift has the **read\_customers** Shopify permission. If you see a permission banner on the Klaviyo settings page, grant the permission to trigger an automatic data refresh.

**What happens when I grant the read\_customers permission?** iziGift immediately starts refreshing your gift card data in the background to fill in any missing recipient emails. If gift card sync is already enabled, a full Klaviyo sync will run automatically once the refresh completes — you don't need to trigger it manually.
