Using Liquid in your Macro Response (Classic)

Last Updated -

Overview

Within your macros, you can use Liquid, a templating language, to create personalized responses to your customers. If you're not familiar with Liquid, see List of Liquid Variables.
 

Liquid variables

You can insert Liquid variables such as {{customer.first_name}} and {{case.id}} into your macros, allowing you to make dynamic replies.

For example, here's a macro created in the Admin that uses those Liquid variables.


The above macro will pull in the appropriate information from the customer. This is what the Agent and Customer will see for the response:


List of Liquid Objects

Case

​A case object represents an issue or problem set. A customer can have 0 or more cases.

Description Type Liquid
Unique integer identifier of customer in the Desk.com database. Integer {{case.id}}
Subject of the case. String {{case.subject}}
Description of the case. String {{case.description}}
Comma-delimited list of labels associated with this case. String {{case.labels}}
Case status (10 - new, 30 - open, 50 - pending, 70 - resolved, 90 - closed) Integer {{case.status}}
Show the status name. String {{case.status.name}}
Communication method of the case (email, phone, chat, Q&A, Twitter, Facebook) String {{case.channel}}
Case priority (1 to 10 with 1 being low and 10 being critical) Integer {{case.priority}}
User currently editing the case (can be nil and does not have to be assigned to be active). User Object {{case.active_user.name_public}}
Date Time the case has been opened most recently. Date Time {{case.opened_at}}
Date Time the case has been closed (if closed) Date Time {{case.closed_at}}
Date Time the case was originally created. Date Time {{case.created_at}}
Date Time the case was last updated. Date Time {{case.updated_at}}

Customer

A customer object represents a site's end-user.
Description Type Liquid
Full Name String {{customer.name}}
First Name String {{customer.first_name}}
Last Name String {{customer.last_name}}
Default email address for the customer. String {{customer.email}}
Comma-delimited string of email addresses for this customer. String {{customer.emails}}
Default phone number for the customer. String {{customer.phone}}
Comma-delimited string of phone numbers for this customer. String {{customer.phones}}
Default mailing address for the customer. String {{customer.address}}
Comma-delimited string of mailing addresses for this customer. String {{customer.addresses}}
Title Text String {{customer.title}}
Company Name Text String {{customer.company}}
Customer Custom Field: replace "yourfieldkey" to your custom field key. String {{customer.custom_yourfieldkey}}

Company Object

A Company_Object represents a site's end-user.
 
Description Type Liquid
Unique integer identifier of company in the Desk.com database. Integer {{company_object.id}}
Company Name String {{company_object.name}}
Company Custom Field: replace "yourfieldkey" to your custom field key String {{company_object.custom_yourfieldkey}}