Merge Fields
  • 27 Feb 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Merge Fields

  • Dark
    Light

Article Summary

Merge Fields

Watch this 60-second Mogli Minute on Merge Fields

Contact & Lead Merge Fields

Contact and Lead merge fields may be utilized in 1:1 conversations, SMS Templates, and bulk sends.

  1. Go to the Application Settings tab and select Default
  2. Populate your chosen standard or custom Contact and Lead merge fields in the fields labeled Contact Merge Fields and Lead Merge Fields. Use the API format. Custom fields must include __c at the end. Separate each merge field with a comma and space
  3. Save. Your merge fields are now ready for use.


Using Merge Fields in SMS Templates and 1:1 Conversations

Enter merge fields in double curly brackets like this: {{Favorite_Color__c}} or {{FirstName}}. 

Example:  Hi, {{FirstName}}. Don’t forget about your appointment tomorrow at 1:00PM!


Using Merge Fields in Bulk Messages

From the Bulk SMS or Bulk SMS Lightning tab, locate the Merge Fields dropdown menu:

Note: Merge Fields configured on objects besides Contact and Lead will also appear in the dropdown menu in Bulk SMS and Bulk SMS Lightning.

Merge Field FAQs

How do I populate the Contact Owner merge field in a text message?

Add the API name of Owner.Name to Contact Merge Fields and/or Lead Merge fields in Application Settings, then test.

Where do I find the API-formatted names of the Contact and Lead fields?

  1. In Lightning, from Setup, click Object Manager.
  2. Find the Contact or Lead object and select Fields and Relationships.
  3. In the Field Name column, you’ll find the API names.


What about merge fields on Person Accounts?

As long as the field you want to reference in your merge field also lives on the Contact Object, populate the merge fields you want to use for Person Accounts within the Contact Merge Fields field in Application Settings.

You may add Formula fields to your Person Account records and pull values from fields on the Contact level.

Merge Fields for Additional Objects

For objects besides Contact or Lead, configure merge fields by following these steps:

  1. From Setup, click Object Manager
  2. Select the object on which Mogli is configured
  3. Select Fields & Relationships
  4. Make note of the API names of the fields you wish to reference as merge fields.
  5. Within Setup, enter Custom Metadata into the Quickfind bar and select Custom Metadata Types.
  6. Next to Mogli Integrated Object, click Manage Records
  7. Click Edit next to the Mogli-configured object of your choice
  8. Locate the Merge Fields section, and enter the API names of your fields in this format: FirstName,LastName,Email,Favorite_Color__c,Favorite_Food__c
  9. Merge fields will now be accessible in the Bulk SMS Lightning dropdown menu.

Alternatively, place your field name within double curly brackets in conversation view, such as {{Favorite_Color__c}}


ADMIN TIP: 

Merge fields can be used from more than one object related to the SMS record so long as the lookup field for the object is populated (on the SMS record) AND the merge field includes an object prefix.

While a message sent from a Contact record might look like this:
“Hi {{firstname}}, We have received your case, and will reach out shortly for more information.”

A message sent via automation related to both a Contact record AND a Case record and with BOTH object lookups populated could look like this: “Hi {{Contact.FirstName}}! We have received your Case: {{Case.CaseNumber}}. We will review your request and reach out shortly for more information!

Helpful Merge Field Formulas

DATE to TEXT(DATE) Reformat

TEXT(MONTH(DATEVALUE(Account.Appointment_DateTime__c))) & "/" & TEXT(DAY(DATEVALUE(Account.Appointment_DateTime__c))) & "/" & TEXT(YEAR(DATEVALUE(Account.Appointment_DateTime__c)))

DATE/TIME to TEXT(TIME) Reformat (!no daylight savings adjustment!)

IF(

OR(

VALUE( MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 12, 2 ) ) = 0,


VALUE( MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 12, 2 ) ) = 12

    • ),

"12",

TEXT( VALUE( MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 12, 2 ) ) -

IF(

VALUE( MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 12, 2 ) ) < 12,

0,

12

)

)

)

&

":" & MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 15, 2 ) & " "

&

IF(

VALUE( MID( TEXT( Account.Appointment_DateTime__c - (#/24) ), 12, 2 ) ) < 12,

"AM",

"PM"

)

# represents the number of hours between your time zone and GMT.

For example, mountain time’s value would be 7/24. This may change by 1 hour during daylight savings.

See the following chart for the standard time zone UTC offset…


STANDARD TIME

Atlantic Standard Time

AST

GMT -4

Eastern Standard Time

EST

GMT -5

Central Standard Time

CST

GMT -6

Mountain Standard Time

MST

GMT -7

Pacific Standard Time

PST

GMT -8

Alaskan Standard Time

AST

GMT -9

Hawaiian Standard Time

HST

GMT -10




DAYLIGHT SAVINGS TIME

Atlantic Daylight Time

ADT

GMT -3

Eastern Daylight Time

EDT

GMT -4

Central Daylight Time

CDT

GMT -5

Mountain Daylight Time

MDT

GMT -6

Pacific Daylight Time

PDT

GMT -7

Alaskan Daylight Time

ADT

GMT -8


TIME to TEXT(TIME) Reformat

Use this formula to convert a time field in HH:MM:SS.MSZ format (and other variations) to text:

IF(

HOUR(timefield__c) < 12,

TEXT(HOUR(timefield__c)) & ":" & TEXT(MINUTE(timefield__c)) & " AM",

IF(

HOUR(timefield__c) = 12,

TEXT(HOUR(timefield__c)) & ":" & TEXT(MINUTE(timefield__c)) & " PM",

TEXT(HOUR(timefield__c) - 12)) & ":" & TEXT(MINUTE(timefield__c)) & " PM"

)

)


Was this article helpful?