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 Flows set up, both for Gift Cards and Store Credit issued through Govalo, which will listen to the corresponding event sent by Govalo and trigger the email containing the Gift Card or Store Credit details.

In this article

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 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 custom event 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 custom event 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>
    	
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us