Every event Appstle sends to Klaviyo carries the customer's and the subscription's details, so your Klaviyo emails and SMS can show them. This article shows how to insert them and lists the ones you will use most. For the complete list of properties, see the Klaviyo events reference.
Insert a variable in a Klaviyo message
In Klaviyo, open the flow whose trigger is an Appstle event, and edit its email or SMS. To find the event names, see Klaviyo triggers and events for subscription emails.
In the message, type the variable in double curly braces and start it with
event., for example{{ event.customer.first_name }}.Send a test from Appstle: on the template in More → Notification Settings, click Test Email, choose an address and click Send Test Email. Then preview the message in Klaviyo with the test event.
Always start the variable with event.. A variable without it, such as {{ customer.first_name }}, doesn't pick up Appstle's data.
Variables you will use most
Every event carries the same set of properties. A property that doesn't apply to an event can be empty.
Customer's first name:
{{ event.customer.first_name }}Customer's last name:
{{ event.customer.last_name }}Customer's email address:
{{ event.customer.email }}Link to the customer portal:
{{ event.manageSubscriptionLink }}Next order date:
{{ event.nextOrderDate }}Delivery frequency, such as 2 WEEK:
{{ event.frequency_of_subscription }}Price of the next recurring order:
{{ event.nextOrderPriceFormatted }}Name of the subscription plan:
{{ event.sellingPlanGroup }}Subscription ID:
{{ event.subscriptionContractId }}Number of the order that created the subscription:
{{ event.orderId }}Your store's name:
{{ event.shop.name }}The email's subject and heading, with Appstle's variables filled in:
{{ event.subject }}and{{ event.heading }}
List the products in a subscription
The products are in event.orderItems, one entry for each line of the subscription. Each entry has a title, a quantity, a price (the total for that line, not the price of one unit) and an imageUrl. Use a loop to list them:
{% for item in event.orderItems %}
{{ item.quantity }} x {{ item.title }}<br>
{% endfor %}The <br> puts each product on its own line in an email. Leave it out in an SMS.
Things to know
The portal link in
manageSubscriptionLinksigns the customer in for 2 hours after Appstle sends the event, if your store uses the standard customer portal. Don't add a long delay before the message in your flow.If you set a Button URL in the template's Manage Subscription section,
manageSubscriptionLinkcarries that URL instead of the sign-in link.The text you write in the Appstle email template comes through with the event, with Appstle's variables already filled in. You can use it in Klaviyo or write your own.
To add one-click action links to a Klaviyo email, build them in More → Quick Actions and choose Klaviyo under Where will you use this link?. See Quick Actions.
FAQs
Why is a variable empty in my Klaviyo message?
Check that it starts with event. and that the event carries a value for it. For example, event.nextOrderDate shows a dash (-) on the Subscription paused and canceled events, because no next order applies. The Klaviyo events reference describes what each property holds.
Can I use subscription details in a campaign or a segment?
Yes, through profile properties. Each time Appstle sends a customer an event, it also saves these on their Klaviyo profile: appstle_contracts (one entry for each subscription, with id, status, next_order_date, order_amount, currency_code and order_frequency), appstle_active_contract_count and appstle_total_contract_count.
To show the next order date of a customer's first subscription in a campaign, use this variable (change .0 to .1 for their second subscription):
{{ person|lookup:'appstle_contracts.0.next_order_date' }}For a segment of active subscribers, add the condition appstle_active_contract_count is greater than 0.
Where is the full list of properties?
In the Klaviyo events reference for developers. It lists every property, grouped by what it describes, with an example.
