Skip to main content
Skip table of contents

Customize e-mail templates with IF & EACH

IF Conditions

IF Conditions are used to add conditions to email templates in order to further customize the individual templates. The IF conditions can be used in all email templates, regardless of whether it is a system template or your own template. Do you have texts, placeholders or images that should be displayed in the confirmation email, for example, but only for certain participants? The IF Conditions make this possible.

Structure of IF Conditions

Example: IF Condition

{IF?VAR = VAL} Example text {ENDIF}

A condition always starts with {IF? then follows a variable (VAR) with the corresponding value (VAL) {IF?VAR = VAL}. According to the value VAL must be closed again with the curly bracket before the text, placeholder or image is inserted. The following operators are available for comparing variables and values:

  • = In a moment

  • > Larger than

  • < Smaller than

  • >= Greater than or equal to

  • <= Less than or equal to

  • != Unequal

  • IN List,
    Example: {IF?OfferName IN Kayak course 1, Kayak course 2, Kayak course 3} it is separated by a comma.

  • {IF?UseZ = } Empty

In the IF → THEN condition, would you like to add an ANSONSTEN {ELSE} install? Do not close the condition yet with {ENDIF}but add after the desired output{ELSE} then the alternative text and only then {ENDIF}.

Example: IF Condition with ELSE

{IF?VAR = VAL} Example text {ELSE} Alternative text {ENDIF}

Application examples for IF conditions

Below you will find application examples showing where and how IF Conditions could be used.

IF Conditions with tags

Do you have a text that you only want to send for online events, for example? Enter the tag "online" in all online events in advance. This tag is then used for the IF condition.

Example of what the IF condition could look like:

{IF?OfferTags IN online} This text is only displayed if the offer has the tag "Online" {ENDIF}

In addition to a text, you also have the option of outputting an image; instead of the text, simply insert the desired image via the edoobox file manager:

{IF?OfferTags IN online}<img src="https://wwwdata.edoobox.com/filemanager/Bild.jpg" alt="" width="200" height="300"/>{ENDIF}

Tip: different backgrounds for certificate

Do you have different images that you would like to use as a background in a certificate, for example? You can also use the IF conditions for this.

Use the example above, where the image is output based on the tag that is stored in an offer. If you would now like to output a different image as the background in another offer, you can insert exactly the same IF condition again in the certificate template. Adjust the corresponding tag from the offer and insert the next image.

{IF?OfferTags IN präsenz}<img src="https://wwwdata.edoobox.com/filemanager/Bild2.jpg" alt="" width="200" height="300"/>{ENDIF}

IF Conditions with placeholder

Do you have specific information for participants from another country? Add the placeholder ##UserCountry## (without ## ) and enter the corresponding value for the placeholder.

Example of what the IF condition could look like:

{IF?UserCountry = Switzerland} This is specific information for participants from Switzerland {ENDIF}

Supplement the IF condition with a {ELSE}Instruction:

{IF?UserCountry = Switzerland} This is specific information for participants from Switzerland {ELSE} This is the information for all other participants {ENDIF}

IF Conditions with own data fields

Do you have your own data fields that you would like to use in an IF condition, for example to distinguish information for participants of a certain age group? Basically, this application example works in the same way as the placeholder example, the only difference is that you create your own placeholder for the custom data field and do not use an existing one. How this works is described in the linked documentation on custom data fields .

Example of what the IF condition could look like:

{IF?UserAge >= 18} This is specific information for participants older than or equal to 18 years {ENDIF}

{IF?UserAlter < 18} Dies sind spezifische Informationen für Teilnehmende jünger als 18 Jahre {ENDIF}

IF Conditions with additional text blocks

Do you have an additional text block with information in an offer that should only be sent to some of the participants? Again, as in the example with the placeholders, first use a placeholder and add the corresponding value to it.

Example of what the IF condition could look like:

{IF?UserCountry = Switzerland} ##OfferConfirmationText1## {ENDIF}

IF Conditions with true and false Values for the Inquiry list

The placeholder ##OfferlistSecondMailExists## can be used in an IF condition to check whether a second e-mail address is stored for a booking. If so, the request is also sent to a second person. The prerequisite for this is that the corresponding participant data field has been selected in the global e-mail settings, via which the second e-mail address is recorded.

Example:

{IF?OfferlistSecondMailExists = true}Here is text for the second e-mail address{ENDIF}

image-20250214-132655.png

Global Settings | E-mail | Settings: Participant Select data field for second e-mail address

EACH loop

The EACH loop is used, for example, to list all participants in a collective registration in the registration info mail.

With {EACH?BookingUsers} the loop is started, with {ENDEACH} closed. These placeholders are also available within the loop:

  1. ##Id##

  2. ##Salutation##

  3. ##firstname##

  4. ##lastname##

  5. ##Email##

  6. ##Pricecategory##

Only active participants in the booking are displayed in the loop; contact persons are not listed.

Insert the following code directly into the e-mail template:

{EACH?BookingUsers} ##Firstname## ##Lastname## {ENDEACH}

The names of the collective participants are displayed next to each other. After the placeholder ##lastname## add a comma if you want the names to be clearly separated.

Example: Listing the names one below the other

If you want the names of the group participants to be listed one below the other in the e-mail to you rather than next to each other, add the following to the EACH loop in the source text <br/> after the last placeholder:

Source text

<p>{EACH?BookingUsers} ##Firstname## ##Lastname##, ##UserEmail##<br/>{ENDEACH}</p>

Registration Info Mail: Extension with an EACH loop for a quick overview

Related instructions

Keywords for these instructions

Email templates ¦ IF Conditions ¦ Tags ¦ Placeholders ¦ Additional text blocks ¦ Data fields ¦ EACH loop ¦ Conditions

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.