Setting Default Values

We highly recommend that you use set default fallback values for any personalization attribute that you use in your messages. Default values can be added by specifying a Liquid Filter with the name “default.” If a default value is not provided and the field is missing or not set on the user, the field will be blank in the message.

The example below shows the correct syntax for adding a default value. In this case, the words “Valued User” will replace the attribute {{ ${first_name} }} if a user’s first_name field is blank or unavailable.

Hi {{ ${first_name} | default: 'Valued User' }}, thanks for using the App!

As a convenience, you may insert preformatted variables with defaults through the “Insert Personalization Attribute” modal located on the top-right of a templatable text field.

Modal buttons

The modal will insert Liquid with your specified default value at the point that your cursor was. The insertion point is also specified via the preview box, which has the before and after text. If a block of text is highlighted, the highlighted text will be replaced.