> ## Documentation Index
> Fetch the complete documentation index at: https://help.smile.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use pre-built Klaviyo flows

> Use Smile's pre-built Klaviyo flows to send fully customizable reward program emails through your Klaviyo account.

Smile's integration with Klaviyo lets you send your reward program emails directly through Klaviyo, giving you maximum customizability and visibility into engagement metrics like open and click-through rates. You can use Smile events to trigger Klaviyo flows and embed Smile data into the emails Klaviyo sends.

<Info>
  **Important:** Make sure you have [setup the Klaviyo integration](/en/integrations/klaviyo/setup) before continuing with this guide.
</Info>

## Use Smile's pre-built flows

Smile's team has created ready-to-use Klaviyo flow templates that you can copy into your own Klaviyo account.

To use the flow templates, ensure you have the [Smile and Klaviyo integration](https://marketplace.klaviyo.com/en-us/apps/01hq3gjn5dmg8763hw7wjenxg4/) installed using OAuth. If you're using the old integration that requires copy-and-pasting API keys, installing the new OAuth integration will maintain your existing configuration and make flow templates available to you.

1. In Klaviyo, navigate to **Flows** > **Create Flow**.
2. In the **Select one or more integrations** drop-down, select **Smile: Loyalty & Rewards**.
3. Select the pre-built flow email.
4. Add any tags and click **Use template**.
5. Click on the email box, and in the right sidebar make any edits to the email contents.
6. In Smile, [disable](/en/articles/4036260-enable-or-disable-a-customer-email#h_3fc81e4d62) the corresponding customer email.

You can send the following customer emails directly from Klaviyo by using the specified pre-built flow.

| **Smile email name**        | **Klaviyo pre-built flow name** |
| --------------------------- | ------------------------------- |
| Points earned               | Points Earned on Order          |
| Reward redeemed             | Reward Redeemed                 |
| Birthday reward             | Birthday Reward                 |
| Points Expiry - Warning     | Points Expiry Warning           |
| Points Expiry - Last Chance | Points Expiry Warning           |
| Friend received referral    | Friend Received Referral        |
| Referral completed          | Referral Completed              |
| VIP tier achieved           | VIP Tier Achieved               |
| Reward expiry reminder      | Reward Expiring                 |

<Info>
  **Important:** It is not possible to send the **Referral shared through Smile** email from Klaviyo. This email can only be sent from Smile.
</Info>

<Note>
  **Note**: Both the **Points Expiry Warning** and **Points Expiry Last Chance** emails use the same pre-built flow.
</Note>

## Add event data to flow emails

<Tip>
  **Tip:** Using Klaviyo Flows to send reward program emails requires familiarity with email-sending best practices and some technical concepts. If you're new to Klaviyo or have not used Flows before, we recommend you first [get familiar with Flows](https://help.klaviyo.com/hc/en-us/articles/115002774932) or consider hiring a [Klaviyo Partner](https://connect.klaviyo.com/) to help you get set up.
</Tip>

Once you've [added an email](https://help.klaviyo.com/hc/en-us/articles/115003872191) to a Klaviyo flow, you can [insert event variables](https://help.klaviyo.com/hc/en-us/articles/115002779071#01FK12GQZA8853EXPY3NNWC75S) into the email body to provide a more dynamic customer experience. The available variables depend on the event you selected as the flow trigger and are described in the [events sent to Klaviyo](/en/integrations/klaviyo/data-syncing#events) page.

Some common examples include:

* When using the **Points Earned** event as a trigger, include the number of points a customer earned with the `{{ event.points_change }}` variable.
* When using the **Points Redeemed** event as a trigger, include the discount code with the `{{ event.reward_fulfillment.code }}` variable.
* When using the **Referral Started** event as a trigger, include the discount code with the `{{ event.receiver_reward_fulfillment.code }}` variable.

<Tip>
  **Tip:** Use Klaviyo's [Preview & Test functionality](https://help.klaviyo.com/hc/en-us/articles/115002779071#01FK12GQZA8853EXPY3NNWC75S) to see which event variables are available in a given email. **Variable values** will appear blank if you're previewing using an event associated from the `klaviyo-test-events@smile.io` profile, so we recommend previewing using a real event from real customer if you want to see variable values.
</Tip>

<Info>
  **Important:** Some of the content in the flow templates is generic and must be updated to reflect your specific program before being ready to send to customers. We recommend individually reviewing all of the blocks and emails (especially buttons and links) before sending.
</Info>

## Suggested manual flows

The following are examples of flows you can setup manually (in addition to using the pre-built flows).

### Welcome series flow

Introduce subscribers to your brand and convert them into first-time customers. This flow educates new members of your rewards program and motivates them to engage.

<Tip>
  **Tip:** Add reward program information into this flow if subscribers have a `Smile State = member`.
</Tip>

**What to include:**

* Ways to earn points, ways to spend points, points balance, and referral URL.
* Make sure to include [a Smile deep link](/en/articles/4036219-use-deep-links-to-open-the-panel#using-deep-links-in-emails) as your CTA to open the Smile panel immediately on the page.

### Post-purchase flow

Show appreciation for customers and let them know about related products. If they're a member, motivate them to earn more points and refer their friends. If they're a candidate or guest, get them to join the program by creating a store account.

<Tip>
  **Tip:** Add dynamic variables to differentiate messaging based on a customer's `Smile State`. The dynamic variable will be either `person|lookup:'Smile State' = 'member'` or `person|lookup:'Smile State' = 'candidate'`.
</Tip>

**What to include:**

* If they have a `Smile State = member`, update them on their points balance and remind them about your referral program.
* If they have a `Smile State = candidate`, notify them that they could've earned points for this order if they had created an account. Encourage them to create a store account and earn sign-up points.

<Note>
  **Note:** Candidate and Guest are the same type of customer — a customer who hasn't created a Smile account yet.
</Note>
