Use variables in macros
Fill names, order numbers, tracking links, carrier and address into macros automatically with variables such as customer.first_name and order.tracking_url.
Last updated 2 min read
Variables turn one macro into a personal reply. Write {{customer.first_name}} once and every customer sees their own name; write {{order.tracking_url}} and each gets their own tracking link.
Before you start
- Who can do this: owners and admins write macros; everyone benefits when using them.
- Plan: all plans.
- What you need: your store name and domain under Settings > Store, and for order variables, an order linked to the ticket.
Step by step
- Open a macro in Workflows > Macros.
- Place the cursor in Message and choose Insert variable…, or type
{{in the reply box. - Pick a variable, such as Customer first name.
- Save the macro.
- In a ticket, link the order before using order variables, then use the macro.
What happens next
When the macro is used, each variable is replaced from the ticket, its customer, its linked order, you and your store.
All variables
| Variable | Shown as | Filled from |
|---|---|---|
{{customer.first_name}} |
Customer first name | The customer |
{{customer.last_name}} |
Customer last name | The customer |
{{customer.email}} |
Customer email | The customer |
{{order.number}} |
Order number | The linked order |
{{order.tracking_url}} |
Tracking link | The linked order |
{{order.tracking_number}} |
Tracking number | The linked order |
{{order.carrier}} |
Carrier | The linked order |
{{order.shipping_address}} |
Shipping address | The linked order |
{{agent.first_name}} |
Your first name | You |
{{brand.name}} |
Brand name | Settings > Store |
{{brand.domain}} |
Website | Settings > Store |
If a value is missing, the placeholder is left visible so you can fill it in.
Example
Hi {{customer.first_name}},
Good news: order {{order.number}} is on its way with {{order.carrier}}.
You can follow it here: {{order.tracking_url}}
Best wishes,
{{agent.first_name}}
{{brand.name}}
Variables in AI drafts
Draft with AI uses your macros as house wording and fills in real values instead of placeholders. If an AI draft still contains {{, it is flagged as "A {{placeholder}} was left in", so you can fix it before sending.
Tips
- Always end with
{{agent.first_name}}and{{brand.name}}, so replies are signed correctly whoever sends them. - Read the reply before sending if it contains
{{; something was missing. - Order variables need an order in Hushdesk, which comes from your connected Shopify store. Link the order to the ticket first, so the right one is used. See Connect your Shopify store.
Troubleshooting
A variable shows in curly brackets after sending
The value was missing when the reply was sent. Link the order or fill the customer's details before using the macro next time.
The wrong tracking link appeared
The wrong order was linked to the ticket. Link the right one on the order card and use the macro again.
Frequently asked questions
Which variables can I use in a Hushdesk macro?
Eleven. Customer first name, last name and email, the order number, tracking link, tracking number, carrier and shipping address, your first name, the brand name and the website. Insert them with Insert variable in the macro editor, or type two curly brackets in the reply box.
Which order do the order variables use?
The order linked to the ticket, never simply the customer's newest order. That avoids sending the tracking link for the wrong parcel when a customer writes about an older order. Link the right order on the ticket's order card before using a tracking macro.
What happens if a variable has no value?
The placeholder stays in the reply, such as the curly-bracket tracking link, so you can see exactly what is missing instead of sending a blank. Link an order or fill the detail in by hand before sending. AI drafts are also flagged if a placeholder is left in.
Where do brand name and website come from?
From Settings, Store. The brand name is your Store name and the website is your Website domain. Fill both in so macros that use them read correctly, and update them there if your store name or domain changes.
Can I use variables when starting a new ticket?
Partly. When you start a new ticket from a macro, the customer's first name from the Name field, your first name and the brand name are filled in. Order variables stay as placeholders, because a new ticket has no linked order yet.
Was this helpful?
Related articles
- Create and manage macrosWrite saved replies your team sends most, add actions such as tags or status, use variables for names and order details, and keep the list tidy.
- Use macros in the reply boxPick a saved reply from the macro panel, see suggested macros for this ticket, preview its actions and let variables fill in names and order details.
- Read the Shopify order card in a ticketWhat the order card beside a ticket shows, including status chips, items, fulfilments with tracking, address, totals, order tags and linking.
- Set up your store name, domain and support emailFill in your store name, website domain and support email under Settings, Store. Macros use them, and customers reply to that address.
Still stuck?
Chat with the Hushdesk team. A person answers on every plan.
