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:

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

50replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Can you have custom variables? I.E. when I create custom fields in Pipedrive and I have Pipedrive integrated with Front can I pull in the custom fields associated with my contacts when emailing from front?

    Like 3
  • Hi silopakcirb,

    Currently we do not support custom variables. Sorry!

    Like
  • Cori Morris I would also love that feature.

    Like 4
  • Cori Morris Custom variables would be awesome. We have a number email templates that require manually pasting in things, like order confirmation numbers. If our database could be linked to Front, and we could pull in fields from our own records, we could save a ton of time.

    Like 7
  • Cori Morris Is it possible to put text on the left side of the pipe? For example:

    If the recipient is a contact:

    Hi Cori,

    Otherwise:

    Hi,

    Unfortunately, I expect that:

    Hi {{recipient.first_name | ''}},

    would get me:

    Hi ,

    Thank you.

    Like
  • Geoff Ball Hi! Unfortunately this isn't possible right now. Sorry!

    Like
    • Marc Roth
    • Marc_Roth
    • 4 yrs ago
    • Reported - view

    If I understand correctly, this isn't possible yet, but please add my vote to the pool.

    Here is the request as a user story: I'm adding an autoresponder for advanced customer service requests (I.E. you've just asked a question that to properly answer it is going to cost you an hour (or some chunk thereof) of a sales engineer's time and we are not willing to give that to you for free in the hopes that you're going to accept our quote.) We charge $150 per hour for this sales engineering service in increments of 10 minutes. Before I know how many minutes it's going to take I have to read the email and give a low expected range and a high expected range. In a sample case I'm guessing 30-60 minutes. When I open the canned response I want a subset of options and variables. I.E. lowVal = 3 highVal = 6 and a checklist of reasons |Multiple Quotes| Multiple Locations| Risk Factors [x,y,z].

    Output:

    Dear John Doe,

    We charge $150 per hour in 10 minute increments for sales engineering support. At this complexity you can expect it will cost you between $75 and $150 as it will take 30 to 60 minutes to finish turning this conversation into a precise quote. The underlying factors to this being more complex than normal are: You're asking for multiple materials that cut in different kinds of shops. You're asking for variations on your vector art which significantly change the scope of the project and the types of machines which can fabricate this. You're asking for post fabrication finishing work which means this one job has to be done by two different shops which adds both risk and cost to the job. 

    Thanks,

    Your favorite source for Fabrication

    At the very least it would be nice if we could just see highlighted areas where the values could be typed into the email and not allow anyone on our customer service team to hit send without typing in a value or deleting the section. 

    Like
  • Hi Marc,

    That is correct. This is not possible right now. I will share your request with our product team.

    Like
  • Any way to add "Link" as a custom variable? 

    Like
  • Chris Hutchins Hi there, 

    Not right now. Where are you wanting it to come from?

    Like
  • Cori Morris from the link field for a contact.

    Like
  • Chris Hutchins Oh, ok. I see! I will share this with our product team as a feature request. 

    Like
  • Hi there,

     

    Is it possible to use a varible when I'm sending an e-mail to a group of contacts, or a list?

    Example, I like to send an specif offer to a group of contacts but I'd like to use {{ recipiente.first_name}} and for each contact it add his own name.

     

    Best Regards

    Like
  • Guilherme Valdemarin Hi there,

    The best way to accomplish this is with our Sequences feature. That's our version of mail merge.

    Hope that helps!

    Like
    • Joe Force
    • Joe_Force
    • 4 yrs ago
    • Reported - view

    Could you tell me if there is a way to force mixed case on a variable. For example, if a person's email address is regan smith and I use {{recipient.fit_name}} my email shows up as "Hi regan,". Is there a way to force the variable to capitalize the first letter ("Hi Regan,")?

    Thanks, 

    Joe

    Like
  • Joe Force Unfortunately this is not currently possible

    Like
  • can be used in both the body and the subject

    Is this accurate? I was able to add a variable to the body (cool feature), but I'm trying to add a variable in the subject line and the variable list is not popping up when I type {{.  I tried typing the full variable anyway, saved the response, tested it and the variable populated within the body, but the area in the subject where I entered the variable code remained blank (and the variable code that I had typed was gone). 

    Like
    • Ben Leone
    • Ben_Leon
    • 4 yrs ago
    • Reported - view

    Are we able to add other variables like {{city}} or {{streetaddress}}? If so how?

    Like
  • Is it possible to use multiple variables of the same type?  For example: Each recipient's name filled in when there is more than one recipient?  It may also helpful to have the ability to define whether variables get used based on if the information is sourced from the To: line, CC: line, or BCC: line.

    Like
    • Lemuel Chanadmin
    • Customer Support Representative
    • Lemuel_Chan
    • 4 yrs ago
    • Reported - view

    Joe Hemsing Thanks for testing it. You are correct! Variables only work in the body, but not the subject line. We'll be sure to update that in the article.

    Like
    • Lemuel Chanadmin
    • Customer Support Representative
    • Lemuel_Chan
    • 4 yrs ago
    • Reported - view

    Joe Hemsing You can utilize sequences to personalize and send mass emails (using dynamic variables to multiple recipients). You can learn how to do that here. Unfortunately, we do not have the ability to define whether variables get used based on the information it is sourced from.

    Like 1
    • Lemuel Chanadmin
    • Customer Support Representative
    • Lemuel_Chan
    • 4 yrs ago
    • Reported - view

    Ben Leon The only way to do this is by using sequences. The dynamic variables like "city" or "streetaddress" can only be pulled if you have the data for "city" or "streetaddress" in a column name in your csv file of contacts. 

    Like
  • Lemuel Chan thank you.  I may have been unclear in what I meant. I meant if I am sending 1 email to two recipients (Nick and Eric, for example), I would like the ability to have both names inserted:  

    “Dear [Nick] and [Eric],”

    ... or if there are multiple recipients, perhaps replace the variable with something universal, like “Dear [Team],”

    Like
    • Lemuel Chanadmin
    • Customer Support Representative
    • Lemuel_Chan
    • 4 yrs ago
    • Reported - view

    Joe Hemsing Actually, if you would like to use dynamic variables in the subject line, you have to define that in the specific canned response under "Subject". Composing a message and inserting a variable like "{{recipient.name}}" in the subject line will not work. 

    Like
    • Lemuel Chanadmin
    • Customer Support Representative
    • Lemuel_Chan
    • 4 yrs ago
    • Reported - view

    Joe Hemsing Sorry, that is not a capability we have with dynamic variables.

    Like
Like9 Follow
  • 9 Likes
  • 4 mths agoLast active
  • 50Replies
  • 35303Views
  • 29 Following