Recipes
Retail

Build an effective win-back campaign with Shopify + Klaviyo

Acquiring customers is a highly competitive and expensive process, but successful ecommerce sites know that there is another source of revenue: your current and previous customers. Increasing customer retention by as little as 5% can raise top-line revenue over 25%, so driving lifetime value for current customers is a top priority for direct-to-consumer (DTC) brands on Shopify.

Littledata

Made by Littledata

The more complete information you can gather from a customer’s interaction with your brand, the more you can personalize the outreach. The first time that a customer makes a purchase on your site, you capture their email and phone number. This gives you a greater chance of upselling, cross-selling, and winning the customer back for future purchases – but only if you target them with effective content. 

This recipe walks through an effective way to win customers back if they have become inactive, by gathering customer touchpoints from a Shopify store to create a specific customer list in Twilio Engage, and use this audience in email and SMS campaigns in Klaviyo.

We can then go step further, using a computed trait to target customers whose last order was significantly below their average order value.

To accomplish this, we will perform the following steps in Segment:

  1. Set up Shopify as a Segment source

  2. Set up Klaviyo as a Segment destination

  3. Build an inactive user audience based on purchase history

  4. Create an email campaign in Klaviyo

  5. Create a computed trait to refine this audience

Step 1: Set up Shopify as a Segment source

This recipe works for any brand using Shopify or Shopify Plus for their ecommerce checkout. The Shopify by Littledata source allows your brand to easily collect pre-checkout and post-checkout events, and link these to a customer profile in Segment.

The setup for this data source is automatic and takes around 10 minutes to configure.

Once connected to your Segment workspace, you will see a full list of enhanced ecommerce events feeding in.

s1

The user traits and events for purchasing customers include by default the `email` attribute that the Klaviyo destination will need.

To make the audience building possible from day 1 with Segment, you can request a historic order import from Shopify.

Step 2: Set up Klaviyo as a Segment destination

Klaviyo can be used as both a data source and destination in Segment. You need to set up the Klaviyo destination.

  1. Create a private API in Klaviyo to allow access to Klaviyo’s API. Go to the account menu in the bottom left, Integrations page, and then Developer Settings.

    s2

  2. Click to Manage API Keys and Create Private API Key.

    s3

  3. Copy this API key to the clipboard.

  4. Go to your Segment workspace, Connections, and Add Destination.

  5. Search for Klaviyo, select it and Configure Klaviyo.

    s4

  6. Under settings, paste in the private key from Klaviyo.

Tip: Do not enable the `Fallback on Anonymous ID` setting. This will add lots of users without emails to Klaviyo, which cannot be used for email campaigns.

Step 3: Build an inactive user audience based on purchase history

Now you are gathering the accurate order events and revenue in Segment, you can use Engage to build an audience. Twilio Engage is available as an add-on for your Segment workspace.

We’ll start by building our inactive customer audience, including those users that have not made a purchase in the last 45 days. 45 days is an example - you should adjust this based on the buying cycle of your product. Goods like food, consumables, and diapers typically have a shorter time between purchases, whereas luxury and electronics see a longer cycle. 

  1. In your Segment workspace, go to the Engage > Audiences page.

    s5

  2. Click on CREATE > Audience.

  3. Create the first rule for All users who Performed an Event.

    s6

  4. Using the builder, include customers who performed the Order Completed event at least once, with revenue of greater than zero (to exclude free samples / tests).

    s7

  5. Then add an AND condition to exclude customers who purchased zero times in the last 45 days.

    s8

  6. On the right hand side of the builder, click on Preview to display the number of customers in your audience. Note: you should uncheck the include anonymous users box. As you’ll be using this audience for email, you’ll only be able to send it to known users.

    s9

    Tip: On the right hand side of the builder, click on Preview to display the number of customers in your audience. Note that by default the include anonymous users will be unchecked to only include known users. Klaviyo only allows audiences with known users (with email addresses).

  7. Your first audience is ready, so click NEXT.

  8. Link this audience to the Klaviyo destination we set up previously.

    s10

  9. Now review and create your audience. Name it Inactive Customers - last 45 days.

    Note: Don’t worry about the ‘Realtime disabled’ message.

    s11

  10. Complete this action by clicking on the button in the bottom right, Create Audience.

Now that your audience has been created, Segment will keep updated with all users that fall within this criteria, and sync the audience with Klaviyo every hour.

Step 4: Create email content in Klaviyo

Now it’s time to create a win-back series to engage the Inactive Customers audience you created in the previous steps.

Klaviyo provides a number of resources and examples to master a winback strategy.

We’ll start by building your email content in the Klaviyo platform:

  1. After logging into Klaviyo, navigate to the Campaigns tab and click on Create Campaign, and choose Email.

    s12

  2. Name the campaign Winback Series - Inactive Last 45 Days, and in the Recipients list, choose the audience you created in Segment.

    s13

  3. It’s safest to keep on ‘Skip recently emailed profiles’ so these customers don’t get two emails from you in one day.

  4. In the content wizard, build your content (email template) using the platform’s drag-and-drop tool, or text-only.

    s14

  5. Lastly, you’ll save your content, review, send or schedule timing based on preference.

    s15

Step 5: Create a computed trait to refine an audience in Klaviyo

To go one step further, you might want to target customers whose last order was below their average order value. These customers are not inactive, but are declining in value. Creating such an audience will require a computed trait for average order value, which can be created in Engage.

  1. Click on the Computed Traits tab at the top of page and Create Computed Trait.

  2. Select an Aggregation trait type to average properties across a number of events.

    s16

  3. Select an Average aggregation type over the Order Completed event name for the revenue property. You could also use `subtotal` to sum up revenue before tax, shipping, and discounts.

    s17

  4. Select 365 days as the time window to make this an annual average.

  5. Click to Preview before clicking Next.

  6. Select the Klaviyo destination with which to share the trait as an Identify call. This means the computed trait will be synced with Klaviyo, and every time the customer buys again, the trait will be recalculated.

    s18

  7. Then name the trait Average order value and click to Create the trait. Note: it may take an hour for this trait to calculate and be available in an audience for the next step.

    s19

  8. Clone the audience we created in step 3 and add to the current space.

    s20

  9. Change the first condition to be users that had at least one order with greater than the average_order_value trait in the last year.

    s21

  10. The trait is selected from the dropdown, versus a constant value.

    s22

  11. And change the second condition to be users who also had one order with less than the average_order_value trait in the last 45 days.

    s23

  12. Repeat Step 4 above to use this audience in Klaviyo.

Summary

With this recipe, you accomplished the following:

  • Used Littledata to streamline Shopify events and send these events to Klaviyo

  • Used Engage to identify a group of inactive customers to reactivate, in order to increase top-line revenue and increase repeat purchase rate

  • Created and scheduled automated campaigns in Klaviyo to run systematically and increase efficiency

  • Created a further audience based on a computed trait

Overall, the goal of a winback strategy is not to reactivate all previous purchased or engaged customers, but those who are more likely to make a bigger purchase both now and in the future. It’s important to learn more about your customers, what offers work, and what draws the best return engagement. By utilizing Segment’s Engage feature to quickly, and continuously, identify inactive customers - or better yet, customers about to fall into inactivity - gives a brand that much power to drive top-line revenue and incremental retention.

Getting started is easy

Start connecting your data with Segment.