Gorgias logo
Gorgias logo

All articles

Shopify VariablesUpdated 2 months ago

You can auto-populate Shopify data within a Macro by adding variables to it so you don't have to search for customer or order data and copy it manually into your message.



Variables

Customer email{{ticket.customer.integrations.shopify.customer.email}}
Customer name{{ticket.customer.integrations.shopify.customer.first_name}}
{{ticket.customer.integrations.shopify.customer.last_name}}
Customer phone{{ticket.customer.integrations.shopify.customer.phone}}
Customer address{{ticket.customer.integrations.shopify.customer.default_address.address1}}
{{ticket.customer.integrations.shopify.customer.default_address.address2}}

{{ticket.customer.integrations.shopify.customer.default_address.city}}

{{ticket.customer.integrations.shopify.customer.default_address.zip}}

{{ticket.customer.integrations.shopify.customer.default_address.province_code}}
Last order ID{{ticket.customer.integrations.shopify.orders[0].id}}
Product name{{ticket.customer.integrations.shopify.orders[0].line_items[0].name}}
{{ticket.customer.integrations.shopify.orders[0].line_items[1].name}}
{{ticket.customer.integrations.shopify.orders[0].line_items[2].name}}
...
Variant name{{ticket.customer.integrations.shopify.orders[0].line_items[0].variant_title}}
Price of last order{{ticket.customer.integrations.shopify.orders[0].total_price}}
Last 4 digits of credit card{{ticket.customer.integrations.shopify.orders[0].payment_details.credit_card_number}}
Refund process date{{ticket.customer.integrations.shopify.orders[0].refunds[0].processed_at|datetime_format("L")}}


Setup

1. Go to Settings -> Productivity -> Macros

2. Click on Create macro in the top right. 

3. Write your text and choose a variable from the dropdown menu at the bottom of the reply box, labeled Shopify.

If you need to pre-populate data that's not one of our default variables, you can manually add yours as shown in our video at the top of the page.
Was this article helpful?
Yes
No