Can I use a Recharge Quick Action URL in a Klaviyo campaign button?
Klaviyo's built-in button blocks do not support Recharge Quick Action URLs. To include a Quick Action URL in a campaign, you must manually create a custom button using a custom HTML block and a styled <a> tag.
The following code block shows an example of a custom HTML button that links a customer to their Recharge customer portal.
<p style="margin:0 0 10px 0;">
Manage subscriptions in your customer portal.
</p>
<a href="https://[STORENAME].myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=view_portal_page&page=subscriptions"
style="display:inline-block;padding:12px 20px;background:#2A6949;color:#ffffff;text-decoration:none;border-radius:5px;font-weight:600;">
View the customer portal
</a>{% for %} loop, which creates a separate button for each cancelled subscription. It's important the button is inside the {% for %} loop, so there are multiple buttons for each property the code is looping through.The following code block shows an example of a custom HTML button with a loop. This will link customers with cancelled subscriptions to click and reactivate their subscription.
<p style="margin:0 0 10px 0;">
Come back to us and reactivate your subscription!
</p>
{% with activeSubs=person.rc_all_subscriptions|dictfilter:"status == CANCELLED" %}
{% with prepaidSubs=activeSubs|dictfilter:"is_prepaid == 0" %}
{% for sub in prepaidSubs|slice:"0:2" %}
<p style="margin:0 0 10px 0;">
Reactivate <strong>{{ sub.product_title }}</strong>
</p>
<a href="https://[STORENAME].myshopify.com/tools/recurring/quick_actions/{{ person.rc_customer_hash }}/process?action=reactivate&subscription_id={{ sub.subscription_id }}"
style="display:inline-block;
padding:12px 20px;
background:#2A6949;
color:#ffffff;
text-decoration:none;
border-radius:5px;
font-weight:600;">
Reactivate this subscription
</a>
<br><br>
{% endfor %}
{% endwith %}
{% endwith %}You can adjust the campaign link and language to best fit your needs, and customize the appearance of the button with CSS to seamlessly integrate with your notification's branding.
It is recommended you work with a Klaviyo Recharge partner when implementing customizations.
