Macro Actions

Updated 8 hours ago by Tamara Zaric

You can enrich your Gorgias macros with actions that will trigger events inside other platforms that you have integrated. All that's left to do then is to simply apply the relevant macro on a ticket.

How it works

By default, there are a number of native macro actions that you can add to your macros. You will find them under the type field when you try to create a new macro.

However, we are aware that many of our clients use other integrations with Gorgias, many of which aren't native to our platform, and it could be useful to be able to attach some custom actions from those integrations to your macros as well.

This guide will help you set up some HTTP macro actions!

Please just keep in mind that this function is available to all customers but will only be supported for Advanced and Enterprise plan customers. While any plan can set up the integration following the instructions, due to the manual work it requires on our end, if you are on the Basic or Pro plan we will not be able to provide support in setting it up or fixing any issues with it should they arise.

Setup instructions

Here's how to set up some of the most common HTTP macro actions.

Shopify actions

HTTP actions can be used to trigger specific actions in Shopify that are not included by default in Gorgias.

For example, Shopify Plus allows you to create gift cards for customers. You can use macros to create custom gift card codes in Gorgias, and set the value of the gift card. To create a $10 gift card with a custom code please follow the guidelines below:

  1. Let's add a gift card action to a macro. In the Shopify admin, click on 'Apps'.
  2. At the bottom of the page, click on 'Manage private apps'.
  3. Click 'Create a new private app' and name it 'Gorgias gift cards'.
  4. Click on 'Review disabled Admin API permissions' and select 'Read & Write' in the price rule section, then hit 'Save'.
  5. Now, let's grab the API key first and copy it. The key now needs to be converted from ASCII to HEX and then from HEX to Base64. You can use any online converter to do this. Here's a video tutorial that will hopefully help:
  6. We're almost there, now head over to a ticket in Gorgias.
  7. Click on 'Manage macros' to open the macro menu and select the macro you want to edit.
  8. Click 'Add action' and select 'HTTP Hook'.
  9.  Put the config below:
Title: Create a new $10 gift card with a custom code
POST: https://your-store.myshopify.com/admin/gift_cards.json
Headers: Authorization Basic {copy text from 8b}
Body:
{
"gift_card": {
"note": "Created by Gorgias for customer {{ticket.customer.email}}",
"initial_value": 10,
"template_suffix": "gift_cards.birthday.liquid",
"code": "{{ticket.customer.integrations.shopify.customer.first_name}}{{ticket.id}}20GC"
}
}

Please just keep in mind that the macros that have any kind of Shopify/ReCharge/webhook action included cannot be used inside the rules. They will not show on the list under the 'apply macro' action once creating a rule.

LoyaltyLion actions

HTTP actions can be used to trigger specific actions in Loyalty Lion.

To award a given number of points to a customer, create an HTTP hook with the info below: 

Title: Award any number of points to a customer
POST
URL: https://api.loyaltylion.com/v2/customers/{{ticket.customer.integrations["xxxxx"].customers[0].merchant_id}}/points
Headers:
Authorization Basic {based64 encoded API key}
application/json
Body:
{
"points": 1500
}
Make sure to substitute "xxxxx" in the URL with the integration number of your Loyalty Lion integration. It's the last string of numbers that you see in the URL when you are on the Loyalty Lion integration page.

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. Here is an example: https://manage.kmail-lists.com/subscriptions/subscribe?a=123456789
  3. In Gorgias, open a ticket, click on Manage Macroscreate a macro, click Add action and click HTTP hook
  4. Fill the hook with the info below:
Title: Add customer to Klaviyo list
POST: url from step 2
Body (application/x-www-form-urlencoded): email {{ticket.customer.email}}

Done!

Now, to add a customer to a Klaviyo list, just use the macro. 

Please note that this macro will need to be used manually in order to push customer emails to a certain Klaviyo list. If you only have one list you want to push all customer emails to, you can simply set up an HTTP integration, as outlined here. If you have multiple lists, it would be best to keep using macros.

HTTP actions

HTTP actions can be performed with macros as well by adding webhooks directly inside a macro. Please have a look at these two video tutorials for some assistance on how to set these up:

HTTP Hooks inside macros

Snooze actions

We have a new feature now that lets you auto-snooze tickets using macros! Please have a look at the video tutorial below on how to set this up:


What do you think? Yay or Nay?