How to use variables 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 (eg. cnv_123abc)
- message.id: numeric version of the message's id
- message.public_id: id available in app menus (eg. cnv_123abc)
- recipient.handle: contact's handle (ie. email, phone, etc.) dependent on message type
- recipient.email: contact's email address
- recipient.twitter: contact's 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.
FAQ
What if the contact or field doesn't exist?
If the recipient name does not exist in your Contacts, 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 From 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.
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.
50 replies
-
Lemuel Chan I do have State and address in the contact, but is there no way to have dynamic variables in SMS? I can only see it for email...
-
Lemuel Chan you’re right.. that worked. I feel like that’s exactly what I did (because that’s how I would want to use it), and it didn’t work. But I just tried it, and it did. cool!
-
Ben Leon For SMS, dynamic variables only work through canned responses. As for the contact information (state, address,etc.), dynamic variables are limited to the ones listed when you type "{{" (see screenshot from this article). Therefore, you cannot pull information from contact details for your dynamic variable.
-
It seems like there is quite a bit of support for being able to use custom fields in variables in canned responses but the concept doesn't appear to be anywhere in Trello 'ideas and requests' for people to upvote or comment on (if commenting were enabled).
The Trello board encourages people to make suggestions, but many I've seen in this forum or made directly as suggested don't seem to show up there.
-
Hi @john_fabrega we try to keep the board up to date as much as possible. However we are always working on a ton of smaller improvements and tracking all of them on Trello would be impossible to keep up. :) You can however always forward your suggestion to us via the forum here or directly via support@frontapp.com and we will be sure to forward them to the product team for you.
-
customized variables would be an awesome addition to the FRONT solution
-
Todd Ritrievi I agree!
-
Todd Ritrievi Hey Todd, thanks for writing in. I will submit this as a feature request for our product team!
-
Yes, custom variables is the only feature your software lacks. We are considering to migrate with 20 agents and use your software, but without this feature, we can not migrate.
-
Emils Everss I mean, we really need the feature which was mentioned by Seth Dillon
-
And it still hasn't made it to the 'Ideas & Requests' section of the Trello board despite multiple requests via multiple channels.
-
John Fabrega Thank you all for your continued interest regarding this request. We have a large backlog of requests that aren't all on Trello. Please know that our product team is aware of this, and we will definitely let you know as soon as we're able to build this improvement.
-
In the new Front, it seems that the variables in canned responses have taken a step backwards. We've noticed that the indication of the variable positioning (formerly a blue shading) is gone so one has to hunt around to determine if the correct -or any- variable was inserted. Due to the lack of ability to include custom variables as discussed above, we used unused fields to remind us to manually enter information where needed. Now there is nothing to help us find the locations. Furthermore, if one wants to change what was automatically inserted as a variable, one has to individually delete each character rather than the full block.
Really hoping for a high priority fix to this issue.
-
Hi John Fabrega we are looking into fixing this as soon as possible, feel free to reach out to us by using the contact page for updates thanks!
-
Hi, It looks like variables in the subject line is no longer working with canned responses. Seems like it broke when the new version rolled out. Is this known, and being fixed?
-
Joe Hemsing It seems like a number of things broke in the update related to canned responses:
- Variables in Subject lines not working.
- Custom subject lines from canned responses are not automatically displayed.
- Variables within canned responses no longer leave noticeable placeholders when there is no data in the field
- (Never worked) Custom fields aren't available for variables in canned response.
As Kenji suggested above, make sure to also reach out to support to pile on to the requests.
Crossing fingers that it will make it on the roadmap soon.
-
i do really agree that custom variables would be very nice. I see that there has been multiple requests for this in the last 2 years. Is there any timeline on when this could be possible?
-
John Fabrega any update on these bug fixes?
-
is there an option to use custom variables now? What about variables pulled in from a salesforce integration?
-
Hey,
Just joining the convo and bumping this topic.
Urszula - would you have any updates for us?
-
Hello Louis!
Custom variables are available to be used in canned responses, as variables can check now for any custom fields that be created in the contact manager. You should have a look on the part "Custom variables" of the article.
-
Jonathan Pittumbur
Please elaborate and provide an example. I have searched every instance of "Custom variables" in this article and only see where it says it isn't supported.
I just tried with one of our canned responses using a custom field and nothing populated.
-
I found it! The custom contact fields are somewhat renamed but they appear to be there. i.e. Home Address becomes {{recipient.home_address}} there doesn't seem to be anything differentiating them from regular fields.
And, it WORKSThank you!
(Next... Get them to work in Subject =)
-
John Fabrega Glad to hear it!
-
Chris Hutchins I noticed that your request to be able to include the 'Link' field is now available. May have been for a while but I was just reviewing other requests. Looks like the main topic was updated a few weeks ago with lots of improvements requested throughout the thread.