How to Use Shopify's Flow and Klaviyo to Enhance your Referral Program Performance

Shopify’s Flow app is a task automation software that unlocks new ways to automate your ecommerce marketing. Here we explore a way to utilise Shopify Flow for addressing the following challenge with referral programs:

When an Advocate, who make successful referrals, receives their reward, there is often a delay before they redeem their code and make a purchase. They may go ahead and make a purchase and forget that they have a code they could use.

You can use Shopify Flow to automate a reminder to be sent to Advocates from time to time. This can be as either a dedicated email or as part of the email newsletters they receive.

You can achieve this automation in two steps:

  • Set up the Shopify Flow automation to send events to Klaviyo

  • Utilise the properties in Klaviyo to remind Advocates to redeem their rewards

Set up the Shopify Flow Automation

In Shopify Flow, we’ll need to implement the following flow:

  1. Trigger: When a new order is created

  2. Condition: Check that an Advocate’s discount code exists

  3. Action: Send an event to Klaviyo for a subscriber

1. Trigger: When a new order is created

We can create a Trigger in the Flow, for when an Order is created. You can also select an alternative trigger like “Order paid”.

2. Condition: Check that an Advocate Discount Exists

Next we add a condition to check that an ‘Order created’ trigger includes a discount code that can be identified as an Advocate code.

In this example, let’s say the referral program reward code sent to Advocates each include the characters ‘friend-’. We can specify in the Condition section that a discount code should include the characters: “friend-”.

A discount code should include the characters: “friend-”.

3. Action: Send an Event to Klaviyo

Now we can add an Action to the flow. This action will send an event and update properties in Klaviyo.

We do so by, first, connecting Shopify to Klaviyo. We can then add a Klaviyo Action to track an event and specify the event name as well as some customer properties.

In this example:

  • We give the event the name: gc_advocate_reward_code_used

  • We define the customer email as {{order.email}}. Clicking on ‘Add a variable’ and searching for a property will fetch and add the variable name.

  • In the Customer Properties section, we add the variable representing the order’s discount code. This is so that the discount code used can be sent to the customer’s profile on Klaviyo. To recap, we had previously added an event condition, where the event is only sent if the discount code used includes the characters ‘friend-’. This is so that we know it’s the referral program discount used by the Advocate.

Add an Event Name called: “gc_advocate_reward_code_used”

In the Customer Properties, add a property called “gc_used_reward_code”.

With this set up, we can now turn on the flow.

Shopify will check every order, check if there is a discount code matching an Advocate reward code, and if so send the Klaviyo account an event as well as the discount code property.

This brings us to setting up Klaviyo to send automated reminder emails to Advocates.

Set up Automated Reminders in Klaviyo

In the example above, after an order is placed with the Shopify store, using a discount code that matches the Condition set out in the article flow, the event is sent to Klaviyo, as shown in the screenshot below from Klaviyo.

The customer property sent by Shopify to Klaviyo.

Klaviyo also registers the event: gc_advocate_reward_code_used it receives from Shopify, as shown below under the customer’s Activity log tab.

With the gc_used_reward_code property set in a customer’s profile, we can add a conditional statement to an email newsletter to provide an Advocate with their reward code if it hasn’t been used.

To do so, we can write a conditional statement in a newsletter template to find the gc_used_reward_code property, where if a property value is set, this means the Advocate has indeed used their code. If no value has been set, this means the Advocate has not used their code.

In the latter case we can show the Advocate a reminder message, that they have a reward code available for them and they can use it on their next purchase.

These two articles from Klaviyo, one on Conditional logic, and the other on showing & hiding template blocks should help with programming a Klaviyo template to dynamically show subscribers reminder messages based on the properties they have on their profiles.

Considerations

The above example is simplified, so there are a number of consideration to take into account (depending on the type of referral program you run):

  • If Advocates can receive more than one reward code for referring multiple friends, you may need to consider adding more than one code to the properties sent from Shopify to Klaviyo.

  • When sending customer details to Klaviyo, you would need to ensure that they are indeed subscribed and have opted in to receive marketing emails. In the specific example, the Conditions we set look of a discount code that is uniquely given to Advocates. Where Advocates who are enrolled onto a referral program are typically subscribed to marketing, this may not necessarily be the case for your referral program; so it’s worth checking.

Conclusion

Here we have demonstrated an example in which we use Shopify’s Flow app as well as Klaviyo to remind Adovcates of a reward code they are yet to redeem.

This example also shows that the Shopify Flow - Klaviyo connection can also enable many other automations that can enhance your customer referral program.

If you have any questions regarding using Shopify Flow for enhancing your referral program, please don’t hesitate to reach out to us on hello@gathercustomers.com.