Siebel Marketing User Guide > Creating and Using Offers and Treatments > About Creating Conditional Content in Treatments >

About the If-Then Personalization Element


Table 11 shows a list of If-Then personalization element components.

Table 11. If-Then Personalization Element Components
Personalization Element
Description

$(endif)

The End-If component closes the current If-Then-Else personalization element.

$(if [Field: FieldName])

The If component is required to start an If-Then-Else personalization element. The If component determines if the merge field named [FieldName] has a value. If there is a value for [FieldName], then the text between this If-Then-Else component and the next If-Then-Else component is not removed from the email.

The following is a simple example of the use of an If-Then personalization element. If the first name is defined, then the contact's or prospect's first and last name appears. If the first name is not defined, then only the last name appears:

$(if [Field: First Name])
Dear [Field: First Name] [Field: Last Name],
$(else)
Dear Mr. or Mrs. [Field: Last Name],
$(endif)

Nesting If-Then personalization elements (placing one within another) is an acceptable practice. The following is an example of nesting these elements:

$(if [Field: First Name])
   $(if [Field: Last Name])
Dear [Field: First Name] [Field: Last Name],
   $(else)
Dear [Field: First Name],
   $(endif)

$(elseif [Field: Last Name])
Dear Mr. or Mrs. [Field: Last Name],
$(else)
To Whom It May Concern:
$(endif)

Use of indentation indicates the nesting of one If-Then personalization element within another. Indentation is not necessary, but makes it easier to read. Also, in this example, each component is on its own line. This use of separate lines is also not necessary, but it makes reading the treatment easier.

After the Email Marketing Server makes the decision about what text or HTML to remove, the If-Then-Else personalization element components are also removed (including their trailing line breaks).

Siebel Marketing User Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.