How to use variables in message templates


Variables are placeholder text in message templates or signatures that are dynamically filled based on the context. They can also appear in URLs in these message templates or in signatures. When you set up a message template with variables and use the message templates in a reply, Front will automatically scan and pull from the saved contact details of your recipient. 

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:

  • numeric version of the conversation's id
  • conversation.public_id: id available in app menus (eg. cnv_123abc)
  • 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
  • contact's email address
  • recipient.twitter: contact's Twitter handle
  • contact's phone number
  • 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
  • contact's link attribute
  • current Front user's numeric id
  • 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
  • current Front user's email

Custom 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, and you can use these fields in custom variables for your message templates. If you do have custom contact fields, then typing the two double curly brackets {{ in the message templates composer will also pull up any custom options you have created in your Contacts. 


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'}}

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.

50replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • 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!

    Like 1
  • 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 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

    Like 1
  • Todd Ritrievi I agree!

    Like 1
  • Todd Ritrievi Hey Todd, thanks for writing in. I will submit this as a feature request for our product team!

    Like 1
  • 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.

    Like 3
  • Emils Everss I mean, we really need the feature which was mentioned by  Seth Dillon 

    Like 2
  • 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.

    Like 1
  • 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!

    Like 1
  • 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?

    Like 1
  • Joe Hemsing It seems like a number of things broke in the update related to canned responses:

    1. Variables in Subject lines not working.
    2. Custom subject lines from canned responses are not automatically displayed.
    3. Variables within canned responses no longer leave noticeable placeholders when there is no data in the field
    4. (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.

    Like 3
  • 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? 

    Like 2
  • 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? 

    Like 2
  • Hey,

    Just joining the convo and bumping this topic.

    Urszula - would you have any updates for us?

    Like 1
  • 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.

    Like 1
  • 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 WORKS

    Thank you!

    (Next... Get them to work in Subject =)

    Like 1
  • John Fabrega Glad to hear it!

    Like 1
  • 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.

Like8 Follow
  • 5 mths agoLast active
  • 50Replies
  • 29396Views
  • 29 Following