Variable fallbacks for Engage

When writing an Engage email, you can insert variables in order to personalise the email. For example, we can use the {billing_address_first_name} variable to insert the customer's name:

The variable will automatically be replaced with their name:

But if the first name is missing, it would look like this:

That empty space doesn't look great! Fortunately, you can add a fallback that will be used when there's no value by adding a pipe character | after the variable name. So instead of writing {billing_address_first_name}, you'd write {billing_address_first_name|there}, where there will be used if no billing address first name exists:

For an order with no name, this will show like so:

Custom fields

This also works with custom fields/meta. By adding the fallback after the | in this example:

It will try to get the value of the custom field recipient_name. If none exists, it will use there as a fallback value.

Other fields

This works for most Engage variables, but be sure to test it first in case it's not supported with the variable you're using. Please reach out if you have any issues.

Still need help? Contact Us Contact Us