When you create email templates, you usually want the template merged with dynamic values, such as the first name of the recipient. Groove follows the notation for merge fields that Salesforce templates are using.

Hi {!firstname},

Thanks for you interest in...

Groove will replace the merge field with the first name of the recipient. Recipients can be leads or contacts. You could also use a more explicit notation like

Hi {!Contact.firstname},


Hi {!lead.firstname},

However, that's actually not necessary since Groove will always merge it with the field firstname regardless whether the recipient is a lead or contact. Also, notice how it doesn't matter whether you use lower case or upper case spelling.

You can use any field on the lead or contact object as long as you know the "API name" which is the technical name of a field in Salesforce. Groove's template editor helps you find that field using the merge field picker.

Custom fields are also fully supported. You can recognize those by the tailing "__c". Here for example, the lead object has a custom field where you track in which of your products the lead expressed interest.

Hi {!firstname},

Thanks for your interest in {!product_of_interest__c}.

If you were to merge that template with a contact as the recipient, the field would remain unmerged since the contact object doesn't have that field.

Account Fields

Besides fields on the lead or contact, you might also want to merge fields that aren't directly on the lead or contact but rather on an object that is directly related. The best example is the Account object: a contact usually has a parent account. Thus you could use:

Hi {!firstname},

You work for {!}, specialized in {!Account.Industry}.

This template would merge the value of the contact's account name and account industry. Notice how that can only refer to a parent object (account is the parent object of contact).

By the way, if you use the merge field {!} and merge the template with a lead, Groove would be smart enough and treat it as {!company} which is where the lead object stores the name of the company the person is working for - the equivalent of "Account Name". That rule also applies vice versa - so {!} and {!company} are synonyms and always work for leads and contacts.

Opportunity Fields

You are also able to pull in information from the opportunities that your contacts are related to, in order to personalize each email based on the deal that you are working on:

Hi {!firstname},

I'd love to pick up our discussion around {!Opportunity.Description}, and explore whether our teams can work together!

However, since contacts can be related to multiple opportunities, Groove needs you to specify which opportunity you'd like to merge information from. The way to specify the opportunity comes from the way that you import the contact to the flow. There are 3 ways to do this:

  1. Advanced Search on Opportunities + Contacts
  2. Salesforce List View with an Opportunities + Contacts view
  3. Salesforce Report of Opportunities and Contacts

The example above is using an Advanced Search for Opportunities + Contacts. Sammy is selected from "Ralph's Opp" specifically, so even though Sammy might be in multiple opportunities, we have specified that Sammy, for the purposes of this flow, is connected to "Ralph's Opp". Therefore, all opportunity merge fields will now pull information from Ralph's Opp.

The above directions will also work to connect contacts to opportunities when you are auto-importing to flows, both via a Saved Search and a Salesforce Report.

Custom Lookup Fields

While there is a standard relationship between Account and Contact, you could also have custom relationships and custom objects in Salesforce. For example, imagine you have this data model:

  1. One Account can have many Contacts (that's standard)
  2. You have a custom object "Office Building" (API name is "Office_Building__c"). You use the standard field "Name" for the building's name and a custom field City" for where the building is located (API name is "city__c").
  3. One Office Building has many Contacts (which is where the contacts work). Therefore there is a lookup field on the contact "Main Office" which points to one of your Office Building records (API name "Main_Office__c").

Now you can create a template like this

Hi {!firstname},

You work at {!Main_Office__r.Name} in {!Main_Office__r.city__c}, right?

When merged with a contact that has the field "Main Office" populated, it would merge the template with the name of the contact's office building and city. Two things are worthwhile knowing:

  1. It doesn't say {!Main_Office__c.Name} - so instead of the "__c" it says "__r". This is a Salesforce standard for indicating relationships (rather than field names).
  2. It doesn't say {!Office_Building__c.Name} or {!Office_Building__r.Name} since there is no such field (or relationship) on the contact object. One must not confuse the field name of a lookup field with the name of the object the lookup field is referring to.

User Merge Fields

There are other special merge fields that you might find useful.

Imagine you create a template and share it with other users. If you put your own name or phone number in the signature, other users couldn't really use it. Thus you can do

Hi {!firstname},

This is {!User.firstname}. You can reach me by dialing {!}.

This would merge the template with the user's firstname and phone number according to what they have stored in their Salesforce user record. So it always works for whoever is using the template.

Fallback Merge Fields

Sometimes your Salesforce data may be incomplete and you have to manually edit your merge fields before sending emails out. That is why we created a safety proof feature called "Fallback Merge Fields". This allows you to type in a fallback field that will populate your merge field when Salesforce data is missing. 

For instance you may be have inserted {!firstname} but Salesforce does not have data on your contact's first name. Use "there" so when you send out your email the text shows as "Hey there."

Unsubscribe Links

When you send emails via Groove Flow, you might want to also include a link to Groove's unsubscribe facility. This is a link specific to the recipient. Just do this

{!Unsubscribe.Click here to unsubscribe.}

Groove will replace this with the phrase 

Click here to unsubscribe.

as a hyperlink to the recipient specific unsubscribe link, removing them from the flow and setting the Salesforce field "Email Opt Out" to true. This works for leads and contacts.

See related: How to include Custom Merge fields (based on information that isn't in Salesforce)

Did this answer your question?