Klaviyo - Setting up your Flow and Email Template
Some aspects of this article require programming knowledge about HTML and Shopify Liquid.
When using the Govalo/Klaviyo integration you must have different Flows set up for the items issued through Govalo, which will listen to the corresponding event sent by Govalo and trigger the email containing the corresponding item, such as a Gift Card, Store Credit or Subscription Gift.
In this article
- Setting up your Gift Card Flow
- Setting up your Store Credit Flow
- If Recharge or Bold Subscriptions is integrated: setting up your Subscription Gift Flow
- Setting up a Gift Card Reminder Flow
- Sample Template
Let's start by setting one up for gift cards sent. After that, we can repeat the steps, with some small changes, to create a workflow for store credit. Also check the latest section in this document in case you have Recharge or Bold Subscriptions integrated with Govalo.
Setting up your Gift Card Flow
- 1
-
In your Klaviyo account, go to Flows and click Create Flow, then pick the option Create From Scratch.
- 2
-
Give your flow a name (e.g. "Received gift card") then click Create Flow.
- 3
-
Let's start by setting up your Trigger. Among the options offered, select Metric, then in the drop-down selector presented, select Received gift card. Next, click Done:
- 4
-
Next you'll set up an Action, through which an email will be sent. Drag the component Email and drop it under the trigger:
- 5
-
Click the three dots, then Edit to get to the editor where you'll add the custom template:
- 6
-
Fill out the fields accordingly, then click Save Changes. For setting up the email template, Klaviyo offers a few different options. We will go with the HTML one so we can add our custom template - click Start Coding:
- 7
-
Erase the sample code pre-filled by Klaviyo, then paste the sample template you see below:
<p>You received a Govalo gift card!</p> <p>Hi {{ event.recipient }}! {% if event.sent_to_self %}Here's your gift card.{% else %}{{ event.customer }} thinks you deserve to treat yourself.{% endif %}</p> {% if event.sent_to_self %} {% else %} {% if event.gift_note != "" %} <p>They also wanted us to tell you this:</p> <p>{{ event.gift_note }}</p> {% else %} {% endif %} {% endif %} <p><a href="https://redeem.govalo.com/card/{{ event.hash }}" target="_blank">Redeem your gift card</a></p> <p>Value: {{ event.card_value}} </p> <p>Gift card image:</p> <p><img alt="Gift card image" style="height: 300px; width: auto;" src="{{ event.gift_card_image }}" /></p>
Make sure to click Save once you're done editing the template.
Note: the template presented above is merely a suggestion of how you can make use of the variables sent by the Govalo event in a structured email. You may modify it as necessary. For more information about the variables sent with Govalo events, see Klaviyo - Variables for use in the email template.
- 8
-
Back to the flow's editing page, change your email from Draft to Live:
Congratulations, you're now ready to have your gift cards processed through Klaviyo! Make sure to proceed with the setup of the other flows as needed, as outlined in this document.
Setting up your Store Credit Workflow
Setting up the Store Credit workflow is similar as setting up the Gift Card one, so you can repeat the same steps, with a few minor differences:
- In Step 3, the trigger is named "Sent store credit"
- In Step 7, you can use a slightly different template (also change it as needed):
<p>You received a store credit of {{ event.card_value}}!</p> <br> <p>Hi {{ event.recipient }}! {{ event.customer }} thinks you deserve to treat yourself.</p> <br> <p><a href="https://redeem.govalo.com/card/{{ event.hash }}" target="_blank">Redeem your store credit</a></p>
If Recharge or Bold Subscriptions is integrated: setting up your Subscription Gift Workflow
If Govalo is integrated with Recharge or Bold Subscriptions, you must also set up a workflow for when a Subscription Gift is issued, so repeat the steps above, adjusting the following:
- In Step 3, the trigger is named "Received subscription gift"
- In Step 7, you can use a slightly different template (also change it as needed):
<p>You received a subscription gift!</p> <p>Hi {{ event.recipient }}! {% if event.sent_to_self %}Here's your subscription gift.{% else %}{{ event.customer }} thinks you deserve to treat yourself.{% endif %}</p> {% if event.sent_to_self %} {% else %} {% if event.gift_note != "" %} <p>They also wanted us to tell you this:</p> <p>{{ event.gift_note }}</p> {% else %} {% endif %} {% endif %} <p><a href="https://redeem.govalo.com/subscription/{{ event.hash }}" target="_blank">Redeem your subscription</a></p> <p>Value: {{ event.card_value}} </p> <p>Subscription image:</p> <p><img alt="Gift card image" style="height: 300px; width: auto;" src="{{ event.gift_card_image }}" /></p> <br>
Setting up a Gift Card Reminder Flow
Once a gift card has been issued, if it hasn't been used for a period of 7 days, Govalo will send to Klaviyo an event named Gift card unused, which you can use as a trigger to send a reminder to the gift card's recipient.
The variables included in this event are the same variables you can find on the gift card event, therefore you can follow the same steps for setting up a flow for gift cards, but selecting the metric Gift card unused as the trigger.
Sample Template
We have included very basic templates throughout this guide, just so you can see how the variables included in the events we send to Klaviyo can be used to compose your Govalo emails, but if you prefer you can make use of all the features offered in Klaviyo's editor, either using their drag-and-drop components and plugging in our variables, or making use of an entirely customized HTML template.
With that in mind, we have added below a custom HTML template for the gift card flow that you can add to Klaviyo, with all the elements and styles pre-defined, ready for use (once you open the link below, make sure to download the page, so you can open it in an editor to have access to the HTML code):
gift-card-klaviyo-template.html
You can either upload this to your Klaviyo templates, to have it ready to be used with any emails set up in your flows (Klaviyo has intructions for how to do it here), or add the HTML code directly into the email you're editing.
If you prefer to use Klaviyo's Drag and Drop editor to build an email template from scratch, please refer to Creating a custom email template