Gorgias logo
Gorgias logo

All collections

Macro Actions

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.

The instructions below 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. From there you will want to click 'Sales channels''Develop apps for your store'.
  3. Click 'Create a new private app' and name it 'Gorgias gift cards' for example.
  4. Click on 'Review disabled Admin API permissions' and select 'Read & Write' in the price rule section, and then also give access to 'Gift Card' and 'Discount'.
  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.
  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:
1Title: Create a new $10 gift card with a custom code
2POST: https://{apikey}:{password}@{hostname}/admin/api/{version}/{resource}.json
3Headers: Authorization Basic
4Body:
5{
6 "gift_card": {
7 "note": "Created by Gorgias for customer {{ticket.customer.email}}",
8 "initial_value": 10,
9 "template_suffix": "gift_cards.birthday.liquid",
10 "code": "{{ticket.customer.integrations.shopify.customer.first_name}}{{ticket.id}}20GC"
11 }
12}


As for how to provide the code to the customer, you have to link the code generated in the code section in the email. For instance, if the code is:

{{ticket.customer.integrations.shopify.customer.first_name}}{{ticket.id}}20GC

then you should put

{{ticket.customer.integrations.shopify.customer.first_name}}{{ticket.id}}20GC

in the body of the email.


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: 

1Title: Award any number of points to a customer
2POST
3URL: https://api.loyaltylion.com/v2/customers/{{ticket.customer.integrations["xxxxx"].customers[0].merchant_id}}/points
4Headers:
5 Authorization Basic {based64 encoded API key}
6 application/json
7Body:
8{
9 "points": 1500
10}
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 Macros, create a macro, click Add action and click HTTP hook
  4. Fill the hook with the info below:
1Title: Add customer to Klaviyo list
2POST: url from step 2
3Body (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:


FAQs

Can we set up macro actions for Magento?

Since everybody's Magento setup is different, it's hard to make "one size fits all" actions for Magento at the moment. Of course, if you do need to set up some of them, our Support Team is here to help! Feel free to message us anytime at [email protected] or via our live chat.


Was this article helpful?
Yes
No