Using EL in Broadcasts

The availability of expressions in broadcasts enables you to send broadcast messages that are customized to each end user.

You can use variables with upload, user and system scopes and all functions within most of the editable fields of the Broadcasts tab.

For example, when sending a broadcast message, the body text can include user variables. In the following, the user.Name variable sends an end user’s name in the message, while user.voucher references a unique voucher code:

Hi ${user.Name}, our special today is 2 for 1! Just use the code ${user.voucher} in store today. Offer ends at midnight 12/01/2016.

Customize messages with uploaded values

Upload variables are available in the Broadcasts tab when uploading end user numbers from a file. You can use the variables in the Message field of broadcasts that include that field.

The file types you can upload are:

  • XLS/XLSX — character encoding can be windows-1252, ASCII and UTF-8
  • CSV — character encoding can be windows-1252 or ASCII, but not UTF-8

To upload the file and create a message that uses upload variables:

  1. Click the Broadcasts tab.
  2. Click Create Broadcast, and then select the type of broadcast you want to send. The Broadcast editor appears.
  3. Upload the file by selecting Upload File. Use the browse button to find your file, and then click Upload.

    An Identify Columns in the File dialog box appears allowing you to configure your upload variables:

    Screenshot of the upload variables pop-up

  4. Check the details on this dialog box. You can change the:
    • Name of your variables
    • Number of rows at the start of the file that do not have end user data (for example, row 1 is normally skipped as it is the header row).
  5. Click Done.

  6. Write your broadcast message (). To make adding variables easier, you can click the symbol by the variable ().

    Screenshot of main SMS broadcast page with upload variables highlighted
    When you add your first variable, you will be asked to confirm whether you want a message sent if it is longer than one SMS, and what should happen if the variable contains non-GSM characters (such as a Chinese character). MEP evaluates the expressions in a message (such as the expression's length or character set) only when it is about to send the message. Note that you can preview messages before saving the broadcast, which will show how each message would look, if sent.
    Screenshot of the character set and multipart message radio icons

  7. Make any additional changes required for the broadcast, such as the SMS account used, and time it will be sent.

  8. Select the Preview the broadcast... check box on the bottom right of the page.

  9. Click Preview and Send (or Preview and Schedule). The broadcast preview pop-up appears. Here you can check that variables in your message text are as you want them.

    You see a warning message instead of the message text when an individual message will not be sent — for example, if the message extends past one SMS part and you have chosen not to send multipart messages.

    Screenshot showing the Broadcast Preview