replaceMessageTokens

Used for formatting emails, this function parses through the string, replacing tokens with variable values.

Version

1.6

Parameters

Parameter Type Description
m string String to do the token replacement.

Notes

The function replaces values inside pipes (e.g. |capIdString|) by their script values.

The function replaces values inside curly brackets (e.g. {ASIVal}) by ASI values.

Example

EmailContent = “Thank you for submitting |capIDString| on |fileDate|. The balance due is |balanceDue|. The ASI field is {ASI Field}” 
EmailSend = replaceMessageTokens(EmailContent); 

This function can access any variable that the script uses.