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

If-Then-Else Personalization Element


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

Table 25. If-Then-Else Personalization Element Components
Personalization Element
Description

$(else)

The Else component is used after a $(if) or $(elseif) component. When an analysis of a preceding $(if) or $(elseif) component results in the preceding block of text or HTML being removed from the outgoing email, the $(else) component's block of text or HTML is not removed from the outgoing email. If the preceding $(if) or $(elseif) component does not remove its block of text or HTML, the $(else) component removes its block of text or HTML.

$(elseif [Field: FieldName])

The Else-If component is the same as the If component, except that it is used after the start of the If-Then-Else personalization element.

$(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. It determines if the merge field named [FieldName] has a value. If there is a value for [FieldName], 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-Else personalization element. If the first name is defined, the contact's or prospect's first and last name appears. If the first name is not defined, 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-Else 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-Else 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 offer 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).

To insert if-then statements

  1. Navigate to the Offers screen.
  2. In the Offers List, click an email offer.
  3. Select a template to edit.
  4. If the If-Then-Else toolbar is not displayed, right-click in the toolbar area and select it.
  5. In the primary menu, choose If.
  6. In the secondary menu, choose a merge field to be personalized.
  7. In the tertiary menu, choose a conditional operator.
  8. Enter the value of the merge field to be personalized.
  9. Select a location in the template to insert the personalized If statement.
  10. Click Insert Rule.
  11. Place the conditional content between $(if) and $(endif) tags.
  12. (Optional) Add $(elseif) conditions if more than one iteration of the content should appear.
  13. Place default content after the $(endif) tag.
Siebel Marketing User Guide Copyright © 2006, Oracle. All rights reserved.