e-idea file



Using Conditional Logic in Variable Data Projects

dear john

As you probably know, personalization has taken both print and email marketing by storm. Most personalization is based on simple substitutions of a placeholder like [-firstname-] with a value in a database of contacts, in this case the first name of the recipient. You may not know, however, that you can add another type of personalization known as conditional logic. Conditional logic analyzes field values for each record of your database to determine a course of action. Here is an example:

If you received an email of this story from us, the letter at the top of the email begins with 'Dear' and your first name. That is, unless for some reason we don't have your first name. In that case, we skip it all together.

This is accomplished using conditional logic to further refine your project's personalization. The conditional logic in the case of our broadcast email's first name personalization is as follows:

[##IF len(firstname)>0 THEN##]Dear [-firstname-][br][##END IF##]

This phrase basically says, "If the length of the firstname field is greater than zero, insert a personalized salutation including an html line return. Otherwise, skip it." OK, so the cat is out of the bag... Our sales reps don't send you a personalized note with every email we deliver as part of our newsletter. Yet even though we use first name personalization, we avoid the 'Dear :' scenario that is personalization at its worst!

You could use conditional logic personalization to evaluate any field or combination of fields in the database. For example, if you sold desktop computer printers, you could do a mailing offering a sale based on the type of cartridge required based on the specific printer purchased by a customer. Similarly, you could use the example of gender marketing to customize the visuals, copy or even color scheme of your marketing based on gender. And of course, you can use it to personalize name fields while avoiding consequences that would be deemed amateurish by the recipient.

The language and options for conditional logic are, unfortunately, specific to the software vendor that builds the personalization engine. Our broadcast email software is based on Microsoft's ASP language, which means the language and options of conditional logic personalization mimic ASP logic statements. We edited the syntax a bit in the example above to ensure that you could see the logic, rather than having the personalization engine actually execute the request. The actual logic requires an asterisk (*) where you see a pound sign (#) in the conditional statement and an equal sign where you see the hyphen in the substitution variable. Of course, the html command also would need to be modified slightly as well (different brackets).

If you'd like to personalize your next project with conditional logic, please give us a call. We would be happy to help. Thanks.



return to e-idea file article list