Using variables and application objects in message templates and signatures
Overview
Variables are placeholder text in message templates or signatures that are dynamically filled based on information you've provided. This allows you to easily manage message templates and signatures at the company level.
When you set up a message template or signature with variables and use them in a reply, Front will automatically scan and pull from the saved contact details of your recipient or any custom field data.
Variable options
Default variables
Front has default variables that will populate from the fields of your saved Contacts. To use a variable, simply type two double curly brackets {{ when composing a new message template or signature. The list of variables will appear, and you can select the one you'd like to use.
The current list of default variables are:
account.name: name of the contact currently tied to the account
conversation.id: numeric version of the conversation's ID
conversation.public_id: ID available in app menus (e.g. cnv_123abc)
conversation.ticket_id: ticket ID assigned to the conversation
message.id: numeric version of the message's ID
message.public_id: ID available in app menus (e.g. msg_123abc)
recipient.handle: contact's handle (e.g. email, phone, etc.) dependent on message type
recipient.email: contact's email address
recipient.twitter: contact's X (formerly Twitter) handle
recipient.phone: contact's phone number
recipient.name: contact's full name
recipient.first_name: first part of contact's name, split on the first space
recipient.last_name: remaining portion of contact's name following the first space
recipient.link: contact's link attribute
survey: inserts Front's CSAT feature
user.id: current Front user's numeric ID
user.name: current Front user's full name (first + last)
user.first_name: current Front user's first name
user.last_name: current Front user's last name
user.email: current Front user's email
Custom contact variables
Front's Contact Manager allows you to add your own custom fields for your contacts, such as a Customer ID or a Job Title.
To use custom contact fields in your message templates or signatures, type the two double curly brackets {{ and recipient.custom in the message template/signature composer. You will see any custom contact fields you have created. For example, the custom contact field named Customer ID will appear as recipient.custom.customer_id.
Custom account variables
Front allows you to add your own custom fields to your accounts, such as an Account Manager or an Account Tier.
To use custom account fields in your message templates or signatures, type the two double curly brackets {{ and account.custom in the message template/signature composer. You will see any custom account fields you have created. For example, the custom account field named Account Manager will appear as account.custom.account_manager.
Custom teammate variables
Front allows you to add your own custom fields to your teammates, such as a Manager or Job Title.
To use custom teammate fields in your message templates or signatures, type the two double curly brackets {{ and user.custom in the message template/signature composer. You will see any custom account fields you have created. For example, the custom account field named Job Title will appear as user.custom.job_title.
Application object variables
Composer & message templates only: Front allows you to attach third-party data to a conversation via application objects.
To use application object fields in your message template, type the two double curly brackets {{ and app. in the message template composer. By default, all application objects will be listed, and you can type your application name or the name of your object to filter the variables that match your application object.
FAQ
What if the contact or field doesn't exist?
If the recipient name does not exist in your Contacts Manager, the variable will not populate in your message template, in which case you should define a fallback. When defining a fallback, make sure you surround it with single quotes:
{{recipient.first_name | 'there'}}
How does Front populate custom account variables?
Front will populate the custom account data for the recipient in the To field of your composer. The recipient needs to exist in your Contact Manager and be connected to an account. If there are multiple recipients, Front will populate the account data based on the logic described below.
Do variables work with automatic replies?
If you are using message templates in rules to send automatic replies, the {{user...}} variables, which is the Front teammate sending the message, will be blank because no user is actually tied to the reply, as it is automatic.
Can I use variables from more than one application object?
No. Message templates can only use variables from one application object at a time.
How does Front populate application object variables?
Front will automatically populate the application object variables using the application object attached to the conversation.
If no object is found, Front will display a warning to the user.
If multiple objects are attached to the conversation, Front will pick the first one by default. You will then be able to select which object to use.
Do application object variables work with automatic replies?
Yes. If you are using message templates in rules to send automatic replies, you can specify which application object to use by setting up dynamic variables.
Dynamic variables are available on the Scale plan or above.
Do variables work in the subject line?
When you insert a message template manually in your message, the variable will work in the body, but not in the subject if you have one set up in the subject.
However, when a rule automatically sends a message template with a variable in the subject line, the variable will work in the subject.
Do recipient variables work for multiple recipients?
If you have multiple recipients you're writing to, dynamic variables will only populate the first recipient in the list, rather than separate copies to each recipient with their name populated. If you need to send separate copies with unique variables for each recipient, you should use Sequences.