Macros

Note

This documentation is deprecated, please refer to http://docs.gorgias.io/ instead

Macros are canned responses that you can use to respond faster to your customers.

Macros can perform actions on the ticket:

  • Insert response text: this text will be inserted in the reply area. You can include variables, like the first name of the customer
  • Set subject: change the subject of the ticket
  • Add tags
  • Set status
  • Set assignee
  • HTTP actions: you can trigger web-hooks in other applications, and refund a customer on Stripe with a macro for instance

Macros variables

Below are is a list of variables that you can insert in macros to populate them with customer data from 3rd party apps.

To use variables from another app, make sure you’ve added it in the Integrations first.

Gorgias variables

  • Ticket channel: {ticket.channel}
  • Ticket subject: {ticket.subject}
  • Receiver email: {ticket.receiver.email}
  • Ticket id: {ticket.id}
  • Ticket requester id: {ticket.requester.id}
  • Ticket url: https://{account.name}.gorgias.io/app/ticket/{ticket.id}
  • Ticket sender’s email: {ticket.sender.email}
  • Ticket asignee’s email: {ticket.assignee_user.email}
  • Last message datetime: {ticket.last_message_datetime}
  • Text of the first message: {ticket.first_message.body_text}
  • Ticket created datetime: {ticket.created_datetime}
  • Ticket opened datetime: {ticket.opened_datetime}
  • Ticket updated datetime: {ticket.updated_datetime}

Shopify variables

  • Customer id: {ticket.requester.customer._shopify.customer.id}
  • Last order id: {ticket.requester.customer._shopify.orders[0].id}
  • Tracking url of the last order: {ticket.requester.customer._shopify.orders[0].fulfillments[0].tracking_url}

Shipstation variables

  • Order number: {ticket.requester.customer.shipstation[0].orderNumber}
  • Order status: {ticket.requester.customer.shipstation[0].orderStatus}
  • Items in order: {ticket.requester.customer.shipstation[0].items[0].name}

Recharge variables

  • Customer id: {ticket.requester.customer.recharge_customer[0].id}

HTTP actions

Here are some examples of actions you can do with macros. Adding HTTP actions can be a bit technical. If you need any help here, ping us at support@gorgias.io.

Shopify actions

You can use the HTTP actions to trigger specific actions in Shopify that are not included by default in Gorgias.

Send an account invite for the customer

Title: Send an account invite for the customer
POST: https://your-store.myshopify.com/admin/customers/{ticket.requester.customer._shopify.customer.id}/send_invite.json
Headers: X-Shopify-Access-Token {your-access-token}

Create a new $10 gift card with a custom code

Title: Create a new $10 gift card with a custom code
POST: https://your-store.myshopify.com/admin/gift_cards.json
Headers: X-Shopify-Access-Token {your-access-token}
Body:
    {
        "gift_card": {
            "template_suffix": "gift_cards.birthday.liquid",
            "initial_value": 10,
            "code": "{ticket.requester.customer._shopify.customer.first_name}{ticket.id}10GC",
            "note": "Created by Gorgias for customer {ticket.requester.email}"
        }
    }

Loyalty Lion actions

Add an HTTP actions to trigger specific actions in Loyalty Lion.

Award any number of points to a customer

Title: Award any number of points to a customer
POST: https://api.loyaltylion.com/v2/customers/{ticket.requester.customer.loyalty_lion[0].merchant_id}/points
Headers:
    Authorization Basic {based64 encoded API key}
    Content-Type application/x-www-form-urlencoded
Body: points 20