# Klaviyo

Dollarback integrates seamlessly with Klaviyo, allowing you to synchronize store credit data, trigger automated emails, and personalize customer communication based on store credit transactions.&#x20;

This guide will walk you through the integration process and how to utilize DollarBack’s Klaviyo events and properties to enhance your email flows.

{% embed url="<https://youtu.be/-jV3B2rgrDI>" %}

***

## How to integrate Klaviyo with Dollarback

### Prerequisites

Before integrating DollarBack with Klaviyo, ensure that:

* You have an active **Klaviyo** account.
* Your **Klaviyo account is already integrated with Shopify**.
* You have installed **DollarBack** on your Shopify store.

### Step 1: Connecting DollarBack with Klaviyo

1. Open the **DollarBack** app in your Shopify Admin.
2. Navigate to the **Integrations** page.
3. Click **Connect with Klaviyo**.
4. A new page will open asking for permissions. Click **Continue**.
5. Review the permissions and click **Allow**.
6. Once connected, you will see the list of store credit properties that sync with Klaviyo.

### Step 2: Understanding Synced Properties

When integrated, Dollarback syncs the following store credit-related properties to Klaviyo:

* Dollar Balance - Customer's main store credit balance (i.e 36.85)
* Dollar Currency Code - Customer's main store credit currency symbol (i.e. "$")
* Dollar Formatted Balance - Customer's main store credit balance formatted amount (i.e. "$36.85")
* Dollar Symbol - Customer's main store credit balance currency (i.e. "USD")

To ensure data sync, a **dummy profile** (<dummy@dollarlabs.io>) is created before any store credit transactions even occur for ease of configuration.

### Step 3: Klaviyo Events Triggered by DollarBack

DollarBack pushes the following events to Klaviyo:

1. **Store Credit Credited** - Triggered when a customer receives store credit.
2. **Store Credit Debited** - Triggered when a customer spends store credit on an order.

Each event includes:

* **formattedAmount**: The store credit amount formatted for easy readability. ($36.85)
* **amount**: The raw numerical value of store credit. (36.85)
* **currency**: The currency of the transaction. (i.e. "USD")
* **symbol**: The currency symbol. (ie $)

You can view these events in Klaviyo under **Metrics** > **Store Credit Events**.

### Step 4: Creating Klaviyo Email Flows

To notify customers of store credit transactions, set up an automated **Flow** in Klaviyo.

#### 1. Creating a Store Credit Credited Flow

1. Open Klaviyo and navigate to **Flows**.
2. Click **Create Flow** and select **Build Your Own**.
3. Name your flow (e.g., "Cashback Credited").
4. In the **Trigger** section, choose **DollarBack** and select **Store Credit Credited**.
5. Click **Save**.
6. Drag and drop the **Email** action from the left panel into the flow.
7. Click **Edit** on the email action.
8. Use the **Drag-and-Drop Builder** to design your email.
9. To personalize the email with store credit data, click **Personalization** (top-right) and search for **dollar\_balance** or **formatted\_balance**.
10. Insert it into the email (e.g., "Your current balance is {{ formatted\_balance }}. Spend it now!").
11. Click **Save & Exit**.

#### 2. Creating a Store Credit Debited Flow

Repeat the same steps above but select **Store Credit Debited** as the trigger.

### Step 5: Preview and Test

1. Click **Preview & Test** within your email template.
2. Select a test customer to see how the store credit details appear.
3. Click **Send Test Email** to verify the email formatting and personalization.

### Step 6: Placing an Order to Validate

1. Place an order in your Shopify store that triggers a store credit event.
2. Check Klaviyo's **Activity Feed** to ensure the event is logged.
3. Verify that an email is sent based on your flow settings.

***

### Payload for events and profiles&#x20;

#### Synced Properties

| Name                             | Description                                                             |
| -------------------------------- | ----------------------------------------------------------------------- |
| **Dollarback Balance**           | Customer's main store credit balance (i.e. `36.85`)                     |
| **Dollarback Symbol**            | Customer's main store credit currency symbol (i.e. `"$"`)               |
| **Dollarback Currency Code**     | Customer's main store credit balance currency (i.e. `"USD"`)            |
| **Dollarback Formatted Balance** | Customer's main store credit balance formatted amount (i.e. `"$36.85"`) |

#### Synced Events

<table><thead><tr><th width="108.046875">Name</th><th width="220.7890625">Trigger Description</th><th>Properties</th></tr></thead><tbody><tr><td><strong>Store Credit Credited</strong></td><td>Triggered when a store credit has been credited to a customer.</td><td><strong>currency:</strong> String (i.e. <code>"USD"</code>)<br><strong>amount:</strong> Number (i.e. <code>36.85</code>)<br><strong>formattedAmount:</strong> String (i.e. <code>"$36.85"</code>)</td></tr><tr><td><strong>Store Credit Debited</strong></td><td>Triggered when a store credit has been debited from a customer.</td><td><strong>currency:</strong> String (i.e. <code>"USD"</code>)<br><strong>amount:</strong> Number (i.e. <code>36.85</code>)<br><strong>formattedAmount:</strong> String (i.e. <code>"$36.85"</code>)</td></tr><tr><td><strong>Store Credit Expiry Threshold</strong></td><td>Triggered when a store credit is about to expire.</td><td><strong>currency:</strong> String (i.e. <code>"USD"</code>)<br><strong>amount:</strong> Number (i.e. <code>36.85</code>)<br><strong>formattedAmount:</strong> String (i.e. <code>"$36.85"</code>)<br><strong>symbol:</strong> String (i.e. <code>"$"</code>)<br><strong>expiresAt:</strong> Date (i.e. <code>"Mar 5, 2025 at 3:07 AM"</code>)<br><strong>remainingDays:</strong> Number (i.e. <code>1</code>)</td></tr></tbody></table>

***

### Conclusion

Your Klaviyo integration with DollarBack is now live! You can further customize emails, automate notifications, and personalize communication based on store credit data. If you need any assistance, feel free to reach out to our support team!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.dollarlabs.io/dollarback-store-credit/notifications/klaviyo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
