HTTP, LoyaltyLion, and Klaviyo ActionsUpdated 7 months ago
HTTP Actions can also be performed by adding webhooks directly inside a Macro.
LoyaltyLion Actions
To award a given number of points to a customer, create an HTTP hook with the info below:
1Title: Award any number of points to a customer2POST3URL: https://api.loyaltylion.com/v2/customers/{{ticket.customer.integrations[XXXXX].customers[0].merchant_id}}/points4Headers:5 Authorization Basic {based64 encoded API key}6 application/json7Body:8{9 "points": 150010}1112
Klaviyo Actions
If you want to add a customer to a specific Klaviyo list, you can add an HTTP Action that will do it for you.
1. Go to the Klaviyo you want to subscribe customers to.
2. Copy the Subscribe URL (for example https://manage.kmail-lists.com/subscriptions/subscribe?a=123456789).
3. In Gorgias, go to Settings -> Productivity -> Macros.
4. Click on Create macro in the top right.
5. Click on Add action -> External actions -> HTTP hook.
6. Fill the hook with the info below:
1Title: Add customer to Klaviyo list2POST: url from step 23Body (application/x-www-form-urlencoded): email {{ticket.customer.email}}
To add a customer to a Klaviyo list, just use the Macro you just created.
If you only have one list you want to push all customer emails to, you can simply set up an HTTP integration. If you have multiple lists, it would be best to keep using Macros.