Add conditions (if/elseif/else)

Step by step

Open the Add condition dialog box as follows:

  1. Open the mailing in the Editing workflow step.
  2. Click the position in your mailing where you would like to insert the conditional text.
  3. Click the Insert commands button and select the Add condition (if/else) entry.

    Step 1/3: Select element for setting up the condition of the Add condition dialog is displayed.

  4. In the dialog box, select the First condition (if) option.

    Note: If you have already added a condition, you can also select the Further condition (elseif) or Closing condition (else) option.

  5. Click Next.

    You will be directed to Step 2/3: Select type of condition.

  6. In the dialog box, select the section to which the new condition is to apply from the Condition for drop-down list:

    Entry

    Description

    Column value

    Used to display text only for recipients with a particular entry in a column in the recipients table (for example, if the text in the salutation should be dependent on the value entered in the Gender column of the recipients table)

    Recipient reaction

    Used to only display text to recipients which have (prior to dispatch of this mailing) carried out a particular action (such as clicking a link).

    Note: To use this type of condition, you require the consent of your recipients. This means you can only use this type of condition if the appropriate property rights have been activated in your system (that is, in the Inxmail Professional administration section).

    Sending mailings

    Used to only display text to recipients who have previously received a particular mailing or a certain number of mailings.

    Dispatch interruption

    Used to only display text to recipients who have not received one or several mailings as a result of a dispatch interruption.

    Particular target group

    Used to only display text to recipients assigned to a particular target group (Creating target groups).

    Free condition expression

    Used to create a personalised conditional expression through which text is assigned to recipients.

  7. Click Next.
  8. If you selected the Condition on column value option, specify the following additional information in the dialog box:
    • In the recipient table, select the column to which the condition is to apply (for example, the Gender column) and click Next to confirm.
    • In Step 3/3: Specify comparison value for the condition, specify the relational operator and the comparison value (e.g., specify the ‘equal to’ operator and the value ‘m’ for male to only display the text for male recipients).
  9. If you selected the Condition on recipient reaction option, specify the following additional information in the dialog box:
    • Select the recipient reaction to which the condition is to apply (for example, the Has clicked a particular link (HasClicked, HasClickedContent) option) and click Next to confirm.
    • In Step 3/3: Specify reference mailing for the condition, specify the mailing list and the mailing to which the recipient reaction applies.
  10. If you selected the Condition on mailing sent option, specify the following additional information in the dialog box:
    • Select the mailing dispatch to which the condition is to apply (for example, the Was a particular mailing successfully received option) and click Next to confirm.
    • In Step 3/3: Specify reference mailing for the condition, specify the mailing list and the mailing to which the mailing dispatch applies.
  11. If you selected the Dispatch interruption option, specify the following additional information in the dialog box:
    • Select the dispatch interruption to which the condition is to apply (for example, the The recipient did not receive a specific mailing due to a dispatch interruption option) and click Next to confirm.
    • In Step 3/3: Specify reference mailing for the condition, specify the mailing list and the mailing to which the dispatch interruption applies.
  12. If you selected the Existing target group option, specify the following additional information in the dialog box:
    • Move the target groups to which the condition is to apply to the Selected target groups section.
    • In the Recipients: drop-down list, specify whether the recipients (for whom the text is to be displayed) must belong to each, to at least one or to none of these target groups.
  13. If you selected the Free condition expression option, specify the relevant condition expression in the dialog box under Free condition expression.
  14. Confirm your settings in the dialog box by clicking Finish.
  15. Click the mouse pointer between the [%if] and [%endif] commands.
  16. Then specify what should happen if the condition applies (for example, add the text ‘Dear Ms’, if this text should be displayed in this case).
  17. To add further conditions, click at the end of the last condition (for example, behind the text ‘Dear Ms’), and then repeat steps 1 to 7 (above).

    To specify a condition that applies if all other conditions do not apply, for example, select the Further condition (elseif) option in step 2.

  18. Save your entries.
  • You have successfully added a condition. The quick preview ( (Show/hide quick preview) button) shows the conditional text for the recipient currently selected in the Check workflow step using the Check content button.

Related topics