Setting up Quick Actions in Klaviyo
Recharge Quick Actions lets you automate your email notifications and empowers customers to manage their subscriptions.
Include Quick Actions in your Klaviyo flows and campaigns to improve the customer experience. You can use Klaviyo's email builder to design branded notifications that are sent to specific customer groups or create notifications that are triggered by certain customer events, like starting a new subscription.
Recharge Quick Action URLs can be included in both campaigns and flows. This guide explains how to set up Quick Actions for both flows and campaigns in Klaviyo.
- Recharge Checkout on Shopify
- Shopify Checkout Integration
Before you start
- It’s recommended to use Quick Actions with the Klaviyo integration.
-
Recharge Quick Actions are automatically enabled once you install the Klaviyo integration.
- If Quick Action URLS are used on multi-currency addresses, product prices will be calculated based on automatically converted rates.
-
Contact Klaviyo support if you have any questions about personalizing your email campaigns and flows. You may wish to work with a developer to ensure you’re making the most of Klaviyo’s offering through HTML and CSS.
Quick Actions and Klaviyo
Quick Action URLs are dynamic links that are emailed to your customers. Quick Actions automatically generate a unique link that is specific to each of your customers based on their subscription data. Quick Actions can be used in Klaviyo to create both email campaigns and custom flows.
Klaviyo flows are triggered by customers performing specific events, represented by metrics. Use Quick Actions in your flow to provide customers with different call-to-actions based on a specific event. For example, create a flow that sends customers a welcome email after they complete their first subscription order that includes a link to the customer portal.
Email campaigns are emails that are sent to a large group of customers. This could be a monthly newsletter, or a promotional email alerting customers of a storewide sale, where you include a Quick Action URL. You can create custom segments to target specific customers with campaigns like customers subscribed to specific products.
Review Klaviyo’s guide on understanding the difference between flows and campaigns to learn more.
Quick Action URLs
The following chart explains which actions can be included in a flow or campaign, as well as a link to additional information about that action.
While you can use the setup instructions provided to construct your Quick Action URL, it is recommended that you use the supported Recharge Quick Actions URL Builder.
Quick Action |
Flow |
Campaign |
View the customer portal |
View campaign setup instructions | |
Ship next order now |
View flow setup instructions |
Not available with campaigns |
Skip next order |
View flow setup instructions |
Not available with campaigns |
Delay next order |
View flow setup instructions |
Not available with campaigns |
Add one-time product to the next order |
View flow setup instructions | |
Add one-time product to the next order and apply a discount |
View flow setup instructions | |
Swap current subscription |
View flow setup instructions | View campaign setup instructions |
Apply discount to next order |
View flow setup instructions | View campaign setup instructions |
Reactivate canceled subscription |
View flow setup instructions | View campaign setup instructions |
Reactivate canceled subscription and apply discount code |
View flow setup instructions | View campaign setup instructions |
Reactivate canceled subscription and add one-time product |
View flow setup instructions | View campaign setup instructions |
Add subscription / Add subscription and apply discount |
View flow setup instructions | View campaign setup instructions |
Recharge Quick Actions and Klaviyo flows
Recharge metrics and Klaviyo flows
Every flow begins with a trigger, which sets the flow in motion when the trigger conditions are met. Metrics are one trigger type that can be used as a Flow Trigger. Metrics represent customer events and are used to trigger email flows when a customer performs a specific event.
Recharge passes customer information to Klaviyo through a metric when a certain event occurs. The following Recharge metrics are available in Klaviyo as triggers for flows that include Quick Action URLs:
- Subscription started on ReCharge
- Subscription cancelled on ReCharge
- Order upcoming on ReCharge
- Subscription expired on ReCharge
Visit the Initial set-up and installation steps to enable metrics in Klaviyo.
Metrics are displayed in Klaviyo once the initial corresponding events are triggered. The “Started Checkout” metric is not available as a trigger option when using Recharge Quick Actions as a subscription ID can not be assigned if a subscription is not created.
Note: Quick Action URLs are partially compatible with prepaid subscriptions. If you are using the “Order upcoming on ReCharge” metric, you must customize your emails to hide the URLs for prepaid products to avoid any issues.
Quick Actions
There are several different Quick Action URLs that you can include in your Klaviyo flows to allow customers to manage their subscriptions right through their email:
- View the customer portal
- Ship next order now
- Skip next order
- Delay next order
- Add one-time product to the next order
- Add one-time product to the next order and apply a discount
- Swap current subscription
- Apply discount to next order
- Reactivate canceled subscription
- Reactivate canceled subscription and apply discount code
- Reactivate canceled subscription and add one-time product
- Add subscription or Add subscription and apply discount
By default, Klaviyo flows are sent out as soon as the corresponding action occurs. For example, customers would receive an email immediately after they completed their checkout purchase if you had a flow configured that sent a Quick Actions URL email configured with the" Subscription started on ReCharge" metric. Use Klaviyo's Time Delay feature to create a delay between the event and the notification.
examplestore.myshopify.com
to your .myshopify.com URL if you copy any of the examples below directly into Klaviyo.View the customer portal
A Quick Action URL that sends customers to their customer portal page. This URL can be included in a flow that is triggered by any of the available metrics.
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=view_portal_page&page=subscriptions
Notes and limitations
- To adjust the section of the customer portal the customer lands on, add the page specification to the URL like
&page=subscriptions
.
Ship next order now
This Quick Actions URL is used to let customers change their charge date to ship their next order immediately.
The trigger for this URL depends on when customers should be given the option to change their charge date:
- Use the "Subscription started on ReCharge" metric to allow customers to change the charge date for the next upcoming order scheduled right after their initial subscription order.
- Use the "Order upcoming on ReCharge" metric to allow customers to change the charge date for their next upcoming order.
Example
When used with the "Subscription started on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=ship_now&subscription_id={{ event.extra.id }}
When used with the "Order upcoming on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=ship_now&subscription_id={{ event.line_items.0.subscription_id }}
Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to edit the upcoming order date.
Skip next order
This Quick Actions URL is used to let customers skip their next upcoming order.
The trigger for this URL depends on when customers should be given the option to skip their order:
- Use the "Subscription started on ReCharge" metric to give customers the option of skipping their next order as soon as their subscription starts.
- Use the "Order upcoming on ReCharge" metric to give customers the option of skipping their next upcoming order.
Example
When used with the "Subscription started on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=skip_next&subscription_id={{ event.extra.id }}
When used with the "Order upcoming on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=skip_next&subscription_id={{ event.line_items.0.subscription_id }}
Notes and limitations
- Add
&all_in_order=1
to the end of the URL so that customers can skip all of the items in the next upcoming order. - This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to skip the next shipment.
Delay next order
This Quick Action URL lets customers delay their next upcoming order by a predetermined period of time.
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=delay_next_order&charge_id={{ event.charge_id }}&count=<X>&interval=<DAYS/MONTHS>
X
to set the delay count. Select either DAYS
, or MONTHS
to set the interval frequency. For example, &count=3&interval=days
would delay the upcoming order by three days. Add one-time product to the next order
This Quick Actions URL is used to let customers add a one-time product to their upcoming order.
The trigger for this URL depends on when customers should be given the option to add a product to their next order:
- Use the "Subscription started on ReCharge" metric to give customers the option of adding a one-time product to their upcoming order after their initial subscription order.
- Use the "Order upcoming on ReCharge" metric to give customers the option of adding a one-time product to their next upcoming order.
Example
When used with the "Subscription started on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=add_onetime&subscription_id={{ event.extra.id }}&shopify_variant_id=<VARIANTID>
When used with the "Order upcoming on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=add_onetime&subscription_id={{ event.line_items.0.subscription_id }}&shopify_variant_id=<VARIANTID>
VARIANTID
with the actual Shopify product variant ID for the one-time product. Do not include the angle brackets around example entries.
Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- If you want to allow customers to add products but not apply discounts in the customer portal, contact Recharge Support to enable this.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- A product must be added to Recharge as a subscription or one-time product before a customer can add it to their upcoming order through a Quick Actions URL.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
Add one-time product to the next order and apply a discount
This Quick Actions URL is used to let customers add a one-time product to their upcoming order and apply a discount.
The trigger for this URL depends on when customers should be given the option to add a product to their next order:
- Use the "Subscription started on ReCharge" metric to give customers the option of adding a one-time product to their upcoming order and apply a discount after their initial subscription order.
- Use the "Order upcoming on ReCharge" metric to give customers the option of adding a one-time product to their next upcoming order and apply a discount.
Example
When used with the "Subscription started on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=add_onetime&action=apply_discount&subscription_id={{ event.extra.id }}&discount_code=<DISCOUNTCODE>&shopify_variant_id=<VARIANTID>
When used with the "Order upcoming on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=add_onetime&action=apply_discount&subscription_id={{ sub.subscription_id }}&shopify_variant_id=<VARIANTID>&discount_code=<DISCOUNTCODE>
VARIANTID
with the actual Shopify product variant ID for the one-time product. Do not include the angle brackets around example entries.
Notes and limitations:
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- If you want to allow customers to add products but not apply discounts in the customer portal, contact Recharge Support to enable this.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
Swap current subscription
This Quick Actions URL lets customers swap from one subscription product to another.
The trigger for this URL depends on when customers should be given the option to swap to a new product:
- Use the "Subscription started on ReCharge" metric to give customers the option of swapping to a new product as soon as their subscription starts.
- Use the "Order upcoming on ReCharge" metric to give customers the option of swapping to a new product on their next upcoming order.
Example
When used with the "Subscription started on ReCharge" metric:
https://sdk-demo-ssp.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=swap&subscription_id={{ event.extra.id }}&shopify_variant_id=VARIANTID&charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT
When used with the "Order upcoming on ReCharge" metric:
https://sdk-demo-ssp.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=swap&subscription_id={{ event.line_items.0.subscription_id }}&shopify_variant_id=VARIANTID&charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT
The URL contains &charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT
, allowing you to specify the frequency that should be set if a customer swaps to the new product:
- Update
CHARGEFREQUENCY
to specify the numeric frequency ie. 2 - Update
ORDERUNIT
to specify the time period for the frequency, ie. months
Remove this part of the URL if you would like the customer to use the same frequency for their existing subscription product. The URL will not work if this part of the URL is kept, and the values are not set.
VARIANTID
with the actual Shopify product variant ID for your product. Do not include the angle brackets around example entries.Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to swap the subscription product on the order.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple swap options.
Apply discount to next order
This Quick Actions URL is used to let customers add a discount to their subscription.
The trigger for this URL depends on when customers should be given the option to apply a discount to their subscription:
- Use the "Subscription started on ReCharge" metric to give customers the option of applying a discount as soon as their subscription starts.
- Use the "Order upcoming on ReCharge" metric to give customers the option of applying a discount on their next upcoming order.
Example
When used with the "Subscription started on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=apply_discount&subscription_id={{ event.extra.id }}&discount_code=<DISCOUNTCODE>
When used with the "Order upcoming on ReCharge" metric:
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=apply_discount&subscription_id={{ event.line_items.0.subscription_id }}&discount_code=<DISCOUNTCODE>
DISCOUNTCODE
with the discount code created in Recharge. Do not include the angle brackets around example entries.
Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to allow customers to input discount codes on the Customer Portal.
- If a customer already has a discount code applied to their subscription then a discount is only applied via a Quick Action if the value of that discount code is more than the existing discount code.
- Discount codes with special characters (ie. 10%OFF) are not supported by Recharge Quick Actions. Discount codes containing spaces do work with Recharge Quick Actions.
Reactivate a canceled subscription
This Quick Actions URL lets customers reactivate a previously canceled subscription.
The flow for this action is triggered by the “Subscription cancelled on ReCharge” metric.
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&subscription_id={{ event.extra.id }}
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. While the subscription is reactivated, the next charge date cannot be set.
Reactivate subscription and apply discount
Use the “Subscription cancelled on ReCharge” metric to create a flow that allows customers to reactivate their subscription and apply a discount to their next upcoming order.
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&action=apply_discount&subscription_id={{ event.extra.id }}&discount_code=<DISCOUNTCODE>
DISCOUNTCODE
with the discount code created in Recharge. Do not include the angle brackets around example entries.
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. While the subscription is reactivated, the next charge date cannot be set.
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to allow customers to input discount codes on the Customer Portal.
- If a customer already has a discount code applied to their subscription then a discount is only applied via a Quick Action if the value of that discount code is more than the existing discount code.
- Discount codes with special characters (ie. 10%OFF) are not supported by Recharge Quick Actions. Discount codes containing spaces do work with Recharge Quick Actions.
Reactivate subscription and add one-time product
Use the “Subscription cancelled on ReCharge” metric to create a flow that allows customers to reactivate their subscription and add a one-time product to their next upcoming order.
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&action=add_onetime&subscription_id={{ event.extra.id }}&shopify_variant_id=<VARIANTID>
VARIANTID
with the actual Shopify product variant ID for the one-time product. Do not include the angle brackets around example entries.
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. A Quick Action will reactivate a subscription in this case, but does not set the next charge date.
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- A product must be added to Recharge as a subscription or one-time product before a customer can add it to their upcoming order through a Quick Actions URL.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
Add subscription / Add subscription and apply discount
The Add subscription Quick Action allows you to leverage targeted upsells and strategic pairing strategies by targeting subscribers that have recently purchased a one-time product to convert their one-time purchase into a subscription. Increase your average order value (AOV) and provide subscribers with a personalized shopping experience.
When building this Quick Action URL, ensure the frequency is set. Both singular and plural usage for order interval units (day, month, or days, months) are accepted. Frequency must be set and if quantity is not set, it will default to 1.
Add subscription example
https://examplestore.myshopify.com/tools/recurring/quick_actions/ae1236544fsd54/process?action=add_subscription&shopify_variant_id=123456&charge_interval_frequency=30&order_interval_unit=days&quantity=1
Add subscription and apply discount example
https://examplestore.myshopify.com/tools/recurring/quick_actions/ae1236544fsd54/process?action=add_subscription&action=apply_discount&shopify_variant_id=123456&charge_interval_frequency=30&order_interval_unit=days&quantity=1&discount_code=10off
Notes and limitations
- You must allow the ability to add products within the customer portal.
- Price cannot be set manually as the data is calculated based on the plan ID associated with the product.
- Charge and shipping information are not available for translation.
- Cannot be used to add a prepaid subscription, applies to recurring subscriptions only.
- The Quick Action will not create a new address and will only add the subscription to an address that exists. If a customer has no addresses, the Quick Action will fail.
- If the subscription product has a subscribe and save discount, this price will be used though it cannot be used as a dynamic variable within the verification messaging. You can include the subscribe and save percentage in the email.
- You may encounter an error, Error: request cannot be completed in the following scenarios:
- Adding a subscription or one-time product to a customer that is not an inactive or active subscription customer (no payment method on file).
- If a customer has an existing charge error on file. All charge errors must be cleared on a customer address prior to making changes to an order.
- If the discount code that is being used isn't applicable to the address.
- Using a product ID rather than a variant ID in the Quick Action URL.
Recharge Quick Actions and Klaviyo campaigns
Recharge Quick Action URLs can be used within Klavyio email campaigns, and rely on custom properties to allow existing Recharge subscribers to manage their subscriptions.
Campaigns are email notifications that can be sent to all customers, or segments or lists that you build in Klaviyo.
Recharge Quick Action URLs can only be used by existing subscribers, so you will want to ensure that your campaign segments only target your existing subscribers.
You can include Quick Action URLs in your email campaigns, however, Quick Action URLs are not compatible with Campaign SMS.
The slice filter
Some Quick Actions URLs for campaigns contain a slice
filter. This filter allows you to limit the number of subscriptions you target within your campaign.
For example, a Quick Action campaign containing slice:”0:1”
, as displayed in the example below, ensures that only one Quick Action URL appears in the campaign email.
This Quick Action link applies to the first subscription a customer may have. If a customer has four subscriptions, the slice ensures that the Quick Action URL only applies to the first subscription.
You can adjust the number associated with the slice to change the number of Quick Action links available within an email. For example, if most of your customers have four subscriptions, you may want to consider updating the slice to slice:”0:4”
. That way four Quick Action URLs, one for each subscription, are included in the campaign.
View the customer portal
Example
https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=view_portal_page&page=subscriptions
Add a one-time product to the next order
Example
<p>
We have a new item! Would you like to add it to one of your upcoming subscriptions?<br />
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == active"%}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:1" %}
<a href="examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.recharge_customer }}/process?action=add_onetime&subscription_id={{ sub.subscription_id }}&shopify_variant_id=<VARIANTID>">Click here to add this one time product</a><br /> {% endfor %} {% endwith %} {% endwith %} </p>
VARIANTID
with the actual Shopify product variant ID for the one-time product. Do not include the angle brackets around example entries.Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
Add one-time product to the next order and apply a discount
Example
<P> We have a new item! Would you like to add it to one of your upcoming subscriptions and receive a discount on the order?<br/> {% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == active" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:1" %}
<a href="examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.recharge_customer }}/process?action=add_onetime&action=apply_discount&subscription_id={{ sub.subscription_id }}&shopify_variant_id=<VARIANTID>&discount_code=<DISCOUNTCODE>">Click here to add this offer</a><br /></a>
{% endfor %}
{% endwith %}
</p>
VARIANTID
with the actual Shopify product variant ID for the one-time product. Do not include the angle brackets around example entries.Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
Swap current subscription
This Quick Action URL is typically used in campaigns to offer customers the option to swap to a new product.
Example
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == ACTIVE" %}
{% with notPrepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in notPrepaidSubs %}
{% if sub.external_variant_id == 'VARIANTID' %}
<a href="https://sdk-demo-ssp.myshopify.com/tools/recurring/quick_actions/{{ person.recharge_customer }}/process?action=swap&subscription_id={{ sub.subscription_id }}&shopify_variant_id=VARIANTID&charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT">Click here to swap</a>
{% endif %}
{% endfor %}
{% endwith %}
{% endwith %}
VARIANTID
with the actual Shopify product variant ID for your product. The URL contains &charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT
, allowing you to specify the frequency that should be set if a customer swaps to the new product:
- Update
CHARGEFREQUENCY
to specify the numeric frequency ie. 2 - Update
ORDERUNIT
to specify the time period for the frequency, ie. months
Remove this part of the URL if you would like the customer to use the same frequency for their existing subscription product. The URL will not work if this part of the URL is kept, and the values are not set.
Notes and limitations
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to swap the subscription product on the order.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple swap options.
Apply discount to next order
Example
<p>
While you're at it, why don't you give yourself 30% off your next shipment!<br/>
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == active" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:1" %}
<a href="examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.recharge_customer }}/process?action=apply_discount&subscription_id={{ sub.subscription_id }}&discount_code=<DISCOUNTCODE>">Click here to add this offer</a></span><br />
{% endfor %}
{% endwith %}
{% endwith %}
</p>
DISCOUNTDCODE
with the discount code created in Recharge. Do not include the angle brackets around example entries.
Notes and limitations
- This campaign fires a link for each active subscription code. You can configure your discount code to apply once per customer to prevent customers from using the discount code on multiple subscriptions.
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to allow customers to input discount codes on the Customer Portal.
- If a customer already has a discount code applied to their subscription then a discount is only applied via a Quick Action if the value of that discount code is more than the existing discount code.
- Discount codes with special characters (ie. 10%OFF) are not supported by Recharge Quick Actions. Discount codes containing spaces do work with Recharge Quick Actions.
Reactivate canceled subscription
Example
<p>Come back to us and reactivate your subscription!<br/>
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == CANCELLED" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:2" %}
<a href="https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&subscription_id={{ sub.subscription_id }}">Click here to reactivate</a> your subscription for {{ sub.product_title }}<br/>
{% endfor %}
{% endwith %}
{% endwith %}
</p>
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. While the subscription is reactivated, the next charge date cannot be set.
- Use the variable {{ sub.product_title }} to include the product title in your “click here” text.
Reactivate canceled subscription and apply discount code
Example
<p>
Come back to us and get a discount code cause you deserve it.<br/>
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == CANCELLED" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:2" %}
<a href="https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&action=apply_discount&subscription_id={{ sub.subscription_id }}&discount_code=<DISCOUNTCODE>">Click here to reactivate</a> your subscription for {{ sub.product_title }}<br/>
{% endfor %}
{% endwith %}
{% endwith %}
</p>
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. While the subscription is reactivated, the next charge date cannot be set.
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to allow customers to input discount codes on the Customer Portal.
- If a customer already has a discount code applied to their subscription then a discount is only applied via a Quick Action if the value of that discount code is more than the existing discount code.
- Discount codes with special characters (ie. 10%OFF) are not supported by Recharge Quick Actions.
- Discount codes containing spaces do work with Recharge Quick Actions.
- Use the variable {{ sub.product_title }} to include the product title in your “click here” text.
Reactivate canceled subscription and add one-time product
Example
<p>
Come back to us and get access to our special subscriber sale item.<br/>
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == CANCELLED" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:1" %}
<a href="https://examplestore.myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&action=add_onetime&subscription_id={{ sub.subscription_id }}&shopify_variant_id=<VARIANTID>">Click here to reactivate</a> your subscription for {{ sub.product_title }}<br/>
{% endfor %}
{% endwith %}
{% endwith %}
</p>
Notes and limitations
- This Quick Action URL reactivates on the subscription level. Customers need to reactivate each subscription if they have multiple canceled subscriptions.
- Quick Action URLs cannot be used to reactivate subscriptions that expired after a set number of charges. While the subscription is reactivated, the next charge date cannot be set.
- This Quick Action URL only works if your customer portal settings are configured to allow both the Storeowner and customer to add products to a subscription.
- You need to create and include one Quick Action URL for each product if you wish to provide customers with multiple product options.
- You must also create multiple Quick Action URLs even if you want to offer customers different variants of the same product.
- A product must be added to Recharge as a subscription or one-time product before a customer can add it to their upcoming order through a Quick Actions URL.
- Quick Actions allows customers to add one-time products to their upcoming orders even if the product is out of stock.
- Use the variable {{ sub.product_title }} to include the product title in your “click here” text.
Add subscription / Add subscription and apply discount
Add subscription example
{% with activeSubs=person.rc_all_subscriptions %}
{% for sub in activeSubs|slice:"0:1" %}
<a href="https://examplestore.myshopify.com/tools/recurring/quick_actions/{{person.rc_customer_hash}}/process?action=add_subscription&shopify_variant_id=VARIANTID&charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT&quantity=1">Click here to add this offer </a><br/>
{% endfor %}
{% endwith %}
Add subscription and apply discount example
{% with activeSubs=person.rc_all_subscriptions %}
{% for sub in activeSubs|slice:"0:1" %}
<a href="https://examplestore.myshopify.com/tools/recurring/quick_actions/{{person.rc_customer_hash}}/process?action=add_subscription&action=apply_discount&shopify_variant_id=VARIANTID&charge_interval_frequency=CHARGEFREQUENCY&order_interval_unit=ORDERUNIT&quantity=1&discount_code=DISCOUNTCODE">Click here to add this offer </a><br/>
{% endfor %}
{% endwith %}
Create a flow or campaign in Klaviyo that includes a Recharge Quick Action URL
Step 1 - Create your Quick Actions URL
Use the Quick Actions URL Builder to auto-generate the correct Quick Actions URL for your Klaviyo flows or campaigns.
There are some preliminary setup instructions and limitations for specific Quick Actions. We recommend reviewing the documentation related to the specific Quick Action you are creating before using the builder to confirm if any additional steps are required.
- From the Recharge merchant portal, click Storefront and select Quick Actions to open the Quick Actions URL Builder.
- In the What would you like to do? drop-down, select a Quick Action.
- In the following drop-down, select a trigger.
- The Quick Action URL auto-populates in the textbox. Select Copy link to add the Quick Action URL to your clipboard.
- You may need to make additional adjustments to the Quick Actions URL depending on the action before inserting it into your Klaviyo notification. Replace any texts in <brackets>:
- If you are using a Quick Action to swap a product or add a product, replace the VARIANTID field with the variant ID from your store.
- If you are including a discount code in your Quick Action, replace the DISCOUNTCODE field with the desired discount code.
- Add the URL to your Klaviyo flow or campaign once finished.
Campaigns
When creating campaigns you typically must include {% with activeSubs=person.rc_all_subscriptions|dictfilter:"status
== active %}
or {% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == CANCELLED"
%}
at the beginning of each Quick Actions URL to loop and find the subscriptions associated with this customer.
The status you use depends on the type of campaign you’re running. The CANCELLED status would be if you’re targeting canceled subscriptions and the active status would be if you're targeting active subscriptions.
Typically, Quick Actions URLs for campaigns target all of the subscriptions a customer has. You can use HTML and IF statements to further customize who the campaign should send to if the customer has multiple subscriptions.
Subdomains and redirects
You must hardcode your URL in Klaviyo instead of using {{ organization.url }}
if you are using a subdomain instead of a domain in your notifications, or a redirected URL. Using the {{ organization.url }}
variable with a subdomain or a redirect causes a 404 error even when everything is configured correctly.
<a href=".shop.myshopify.com/tools/recurring/quick_actions/
{{ person.recharge_customer }}
/process?action=view_portal_page&page=subscriptions">
View your subscription
</a>
Step 2 - Add your Quick Actions URL to a Klaviyo flow or campaign
Add a Quick Action URL to a Klaviyo flow
- Create a flow in Klaviyo.
- Select Metric as your Trigger setup.
- Use the appropriate metric to trigger the notification. The metric must end in "on ReCharge" to work successfully.
- Build your flow. Use the Email action to create an email where you can send out the Quick Actions URL created in Step 2. You can add the URL to the Source code in a Text Block. Alternatively, you may want to offer the Quick Actions URL through a button or image.
Add a Quick Action URL to a Klaviyo campaign
Follow Klaviyo’s instructions to send out an email campaign. You may want to use Recharge custom properties in Klaviyo to create segments or lists to send to specific customers.
Quick Action URLs do not apply to prepaid products. You can use the loop {%
with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
to prevent customers with prepaid subscriptions from receiving your campaigns.
Test your Quick Action URLs
Test Quick Actions within Klaviyo
It is recommended to test how the Quick Action performs in your Klaviyo notifications to ensure that functions correctly.
Klaviyo’s preview option is not compatible with Quick Action URLs as Klaviyo does not have the ability to pull the necessary customer information when creating a preview email.
Flows
There are two methods you can use to preview your Quick Action URLs in a Klaviyo notification.
Method 1 - Preview the notification
- Open your flow in Klaviyo.
- Select the three dots next to the email you wish to preview and then select Edit.
- Select Edit Content.
- Select the Preview button from the left-hand side navigation.
- Determine if you wish to preview the email directly in Klaviyo, or if you wish to have the email sent to a specific address.
- Select Preview now to view your Flow as if you were a customer. You should be able to click on the Quick Action URL and begin the process of managing your subscription.
Method 2 - Trigger the notification
Once you’ve created your flow in Klaviyo set a Trigger for the flow that only applies to your test customer account. This ensures that the flow is only sent to you as a test customer. Enable your flow.
Once the flow is enabled, you need to perform the necessary action to trigger the notification. You can process a checkout order to trigger the “Subscription started on ReCharge” metric, and cancel a subscription to trigger the “Subscription cancelled on ReCharge” metric. You should receive the test notification immediately.
You will need to adjust the charge date on your subscription to trigger the “Order upcoming on ReCharge” metric. The new charge date must correspond with the scheduled upcoming charge notification, which is typically sent out three days before the customer’s charge.
For example, you need to set the charge date for your subscription to be four days in the future if the upcoming order notification is sent three days prior to the charge. This ensures that you receive the notification tomorrow.
Test a Quick Action URL included in a campaigns
- Create a customer segment that only applies to your test customer credentials.
- Clone the campaign you plan on sending to customers.
- Send the campaign to your test segment.
This will send the campaign to your inbox as if you were a customer receiving the notification. Once you’re satisfied with the campaign, delete the duplicate campaign and send the real one to the correct customer list.
Test Quick Actions outside of Klaviyo
You can also manually construct your Quick Action URLs for testing purposes. Complete the following steps before testing your URL to ensure your testing environment is set up correctly.
Step 1 - Create test information
- Create a test customer in Recharge, using your real email and phone number to test your customer information. You will need to create a test customer by going through the checkout with a subscription product if you are using the Shopify Checkout Integration.
- Add two to three products to your test customer account. If you are testing a re-activation action, then you will want to cancel one of the products.
Step 2 - Build your Quick Actions URL manually
When testing Quick Actions URLs outside of Klaviyo, you will have to manually include the information that Klaviyo's variables would normally pull in automatically. For example, the Shopify URL, customer hash, and subscription ID.
Example:
https://examplestore.myshopify.com/tools/recurring/quick_actions/5244250087ca77ba5cd96c57/process?action=add_onetime&subscription_id=111076384&shopify_variant_id=32475718385739
Step 3 - Test the URL
After constructing the URL, enter the URL into your browser, ensuring that the .myshopify.com component of your URL is reflective of your store's Shopify address.
Limitations
- Quick Action URLs do not work with BigCommerce or Custom headless stores.
- Quick Action URLs can be used with prepaid subscription products to update the next charge date, but not the shipment date.