Klaviyo - Wishlist Back in Stock Emails

Created by Gopinath Nagalingam, Modified on Fri, 21 Jun at 3:06 PM by Gopinath Nagalingam

TABLE OF CONTENTS



How To Implement

1. Enable Back-in-Stock Event

Before you get started, you need to make sure you’ve enabled the wishlist back in stock event within Swym Admin. To confirm, once you’ve logged in to Swym Admin, navigate to Integrations via the left nav.

Select Klaviyo to view the configuration settings. Click Configure next to “A product that a shopper was interested in is now back in stock”.

Once enabled, Swym will send an event to Klaviyo each time a product on a customer’s wishlist is back in stock.

To ensure that this feature is working as expected, you can test the trigger from the ‘Send a Test Event’ section, which you can find by scrolling down after saving the trigger. Simply input the email address, choose the “Back in stock alert” trigger, and then click on “Send Test trigger” and a test trigger of the event will be sent to Klaviyo, which can be found in the Activity feed of the respective event section of Klaviyo.

You can check if the test trigger has been sent by checking the same on Klaviyo which we will discuss in the next step.

2. Create Klaviyo Flow and Select Trigger

In Klaviyo, navigate to the Flows page and select “Create from Scratch”–> “Build your Own”.

In this example, we’re going to call this flow “Wishlist Back in Stock”. 

Next, you’ll need to set the trigger for this flow. For this, go to the ‘Your Metrics’ tab from the options on the right and select ‘Wishlist Plus’

Choose “Swym-backinstock” from the Metric list.

You can optionally filter based on any of the attributes passed in the event to add any conditional trigger with this event or only apply to certain groups of people.

Once the changes are saved, a dialogue box will appear to confirm the trigger, click on “Confirm and save”.

If you’re not seeing “Swym-backinstock” in your dropdown you probably haven’t had a wishlisted product come back in stock since you enabled the Klaviyo integration in Swym. Klaviyo will not display flow triggers until they’ve received at least one event. In this scenario, you can make use of our Test Trigger feature as discussed earlier.

After sending a test alert you can check it in Klaviyo under Analytics>Metrics>Swym-backinstock>Activity Feed.

In the Activity Feed, you will find the email address from which the sample alert was sent and the time at which it was sent.

Because the timing of this event isn’t driven by an action taken by the shopper, there’s likely no benefit to adding a time delay before the email is sent.

Next add an email to your flow, this is will be your back in stock message.

3. Create Your Email Template

The next thing we’ll do is build an email template that consumes the back in stock data passed from Swym to create our triggered email campaign. 

Here are the event-level data elements included with the event which you can use to personalize your email template to fetch the details from the event payload sent to Klaviyo:

Data Element

Merge Tag

Example

What will this populate

UTC time of the event

{{ event.EventTime }}

2023-03-01T14:07:36Z

Time of subscription

Medium of the event

{{ event.Medium }}

sms

Medium that the subscriber has chosen

Product ID

{{ event.ProductId }}

42738631246058

Product ID of the item the shopper has subscribed to

Product Title/Name

{{ event.ProductName }}

Basic Logo Hoodie

Name/title of the product the shopper has subscribed to

Product Price

{{ event.ProductPrice }}

25

Price of the product the shopper has subscribed to

Product Quantity

{{ event.ProductQuantity }}

100

Quantity available of the product the shopper has subscribed to

Product Vendor/Brand

{{ event.ProductBrand }}

Swym

Vendor/brand that sells the product the shopper has subscribed to

Product Type

{{ event.ProductCategory }}

Apparels

Type of product the shopper has subscribed to

Product Variant ID

{{ event.VariantId }}

39419525955782

Product variant of the item the shopper has subscribed to

Variant Info/Details

{{ event.VariantInfo }}

Black

Details of the variant of the item the shopper has subscribed to

Variant SKU

{{ event.VariantSKU }}

SKU12345

Variant SKU of the product the shopper has subscribed to

Product URL

{{ event.ProductURL }}

Basic Logo Hoodie  Or__OsZ7xldBGV1BfZaQolJR9pUrjS2vE3R 0vVg0j9JfxlbOu0a-xgz7yAhIVYWxKALQMdOeykz6UesZxMlm gETaYRBcNjLM8u2hE9_OxYxq8CD-hfqunVn43&empi=7663771156714&epi= 42738631246058

URL of the product the shopper has subscribed to

Product Image URL

{{ event.ImageURL }}

https://cdn.shopify.com/s/files/1/0534/36 35/0662/products/smartmockups_kh3ht1 ld_1024x1024@2x.jpg?v=1616130049

Image of the product the shopper has subscribed to


Select the Email block in the flow and configure the Email details such as subject line and preview text as per your requirement. You can also update the Subject to include the name of the product, which we pulled in dynamically using {{ event.ProductName }}.

Now, scroll down, and go to the template section, and click on the “Select template” option

 

If you’ve been using Klaviyo for a while you probably already have your templates set. For this exercise we’re going to choose the “Create Blank email” method which uses the drag-and-drop method if you don’t have an already existing template.

This will lead you to the email template editor page

Once the template editor is open you can add your logo to the top if you like or remove the image block. We’ll use the placeholder “text block” for the main message content as each back-in-stock event includes only one product at a time. For this example we’ll keep things simple, centering everything and using html to pull in data from the Swym-backinstock event.

Now, once you have added the Text block, you will have to work on the content section of the text block. For this please select the “Source Code ( </> )” option from the menu in the Left section.

 

Here’s the HTML we used for our simple template:

<p style=”text-align: center;font-family:verdana,geneva,sans-serif;”>The {{ event.ProductName }} you subscribed for is now back in stock!&nbsp;</p>&nbsp;
<p style=”text-align: center”><img height=”0″ src=”{{ event.ImageURL }}” width=”400″ /></p>
<p style=”text-align: center”><a href=”{{ event.ProductURL }}”>{{ event.ProductName }}</a></p>

4. Preview the Message

Once you are satisfied with your template and have saved it, you can preview it to make sure everything is working as expected. Klaviyo lets you choose real example events that have flowed over for the preview, so the previews should expose any issues you might be experiencing. Click on the Done button on the content section and then Save the template.

We like to preview first in Klaviyo to make sure everything is working and then check it out in a real inbox. Here’s what our preview looked like:

5. Set Your Email Status to "Live"

When you’re satisfied with your testing the last step is to set your email status from “draft” to “live”. Once that switch is flipped your emails should start flowing!






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article