Assigning coupons using JeriCommerce is easy. You can use coupons just as you do on Klaviyo, but now with the new communication channel, the Wallet Pass.
You can gain a deeper understanding of how coupon assignment works in our article. Here, we explain how to do it in Klaviyo.
From Klaviyo, you could assign a coupon from your usual flows using the web-hook action.
This process is similar to what a developer would follow to assign the campaign through an API call.
To create a web-hook that points to our API. First, obtain an API key from our admin area (Settings > Technical > Create API-key) and get your program identifier or slug (Settings > Technical > Program Information).
Now the first thing is complete the Destination URL
on the web-hook action replacing the elements inside thwith your information, also remove the symbols:
https://api.jericommerce.com/v1/program/{{program_slug}}/campaigns/{{campaign_slug}}/assignation
Now you should authenticate this API call with the API key by adding it to the header parameters. In the key field, write api-key
and in the value field, paste the API key you obtained from our admin area.
On the JSON body, we define the assigned individual. The customer's email address will suffice. Here is a template of what to include in the body if you want to assign the coupon to the same profile that triggered the flow in Klaviyo:
{
"email": "{{ person.email }}"
}
One hidden feature allows you to overwrite the default content of the coupon as the title and the body, with the content you create at that moment.
This is very helpful if you want to send really personalized message based on actions that happens on klaviyo and you cannot obtain from JeriCommerce.
The coupon analytics will be tracked as usual, so you won't lose any tracking information.
Here is a content example from Klaviyo for sending a coupon by rewriting the title of the assignment:
{
"email": "{{ person.email }}",
"title": "{{ person.name }}, here is a gift for your loyalty"
}