Add If-Empty Tags

Often times you don't have data for everyone in your list. In this case, you should make use of If-Empty tags. Here we will walk through a common use of it, the opening salutation.

Dear %%if(%%firstname%% is empty,"Customer",%%firstname%%)%%,

This works by checking the first tag indicated (above we are checking %%firstname%%) to see if it is empty. If it is empty, then the value in quotes after “is empty,” is shown (in the example above that would be “Customer”). If your first tag is not empty, then the second value is shown (%%firstname%%).

In this case, the function would display “Dear Customer,” when the tag firstname is blank and “Dear %%firstname%%, ”when it's not.

Note: If-Empty tags represent a legacy feature, and while we will continue to support their functionality, we recommend that you switch to using dynamic content to handle instances of empty tags.