Using Custom Fields to add dynamic content to your messages

FrontlineSMS allows users to personalize their Contacts' information using both default and custom contact fields. The default fields we have are: Name, Mobile Number, Email and Notes. To personalize messages using these default fields use the Magic Wand tool found on the Send SMS action .

Any additional fields on your Contacts are referred to as custom fields. For example, location, age, gender and other information can be added as custom fields for each or every contact. Read this article for more information on how to add custom fields to contacts.

To personalize messages using custom fields, you will use the expression in the SMS template and replace 'xyz' with the custom field name.

${recipient.getCustomField("xyz")}

For example, if you want add the recipient's location, replace 'xyz' with 'location'. This returns the value of that particular custom field for the specific recipient of the text message.

${recipient.getCustomField("location")}

For a client whose name is Mary, location is Maryland and email address mary@example.com, this message:

"Hi ${recipient.NameorMobile}, thank you for visiting us at ${recipient.getCustomField("location")} we have sent you an email at ${recipient.Email}"

will appear as below for the recipient:

Hi Mary, it was great connecting with you at Maryland we have sent your membership details to mary@example.com. Please check and complete the registration process.

You can apply this to many other different use cases, for example sending out monthly balances to clients, exam results to parents and/or students and many others.  

Note:

For this to be effective, ensure that none of the custom fields are blank for your recipients. 

Have more questions? Submit a request

0 Comments

Article is closed for comments.