Skip to content

12.3 create or change triggers

12.3 Create or change triggers

To edit an already created trigger, simply call up the entry in the overview under Trigger management. When editing the fields and steps, you have the same options as when creating a new trigger. For this reason, the following description refers to both creating and editing a new trigger.

To create a new trigger, click on the New button in the top right-hand corner of the overview. Then the input dialog for triggers opens. By default, all new triggers are already marked with the status active. However, if you do not want to mark the trigger as active until it is completed, deactivate the slider in the meantime. Deactivated triggers are not displayed in selection menus for forms or links, nor are they executed if they are already stored somewhere.

  1. First assign a unique Name for the trigger. This name appears at various places in the E-Marketing Manager and the clearer the name, the easier it is to assign. There is no restriction in the naming. You can use any characters and upper and lower case letters.

  2. Directly after this you will see the selection field Usage. Here you can choose between Only for links, Only for forms, Links and forms. This setting only affects the selection menus in which the new trigger is offered to you, and is only used for clarity. The setting has no effect on the functionality.

  3. In the Description field, it is best to enter a detailed explanation of the task(s) the trigger will perform and where it will be used. Especially if several people work with the E-Marketing Manager, it makes sense to be as precise as possible here.

  4. The Advertising slider allows you to mark triggers that must not be executed in case of a tracking objection. This only affects triggers that are used for links.

Note: In case of a double opt-in confirmation, the slider must remain deactivated to be able to save this information at the recipient profile.

  1. Next, in the Steps section, you define what the trigger should do. To do this, you must add at least one step, but you can also combine any number of steps. Select a step in the Type dropdown menu and confirm with the Plus. You will find an overview of all types and an explanation directly below.

  2. The individual steps are numbered and are processed in the appropriate order. If, for example, it is necessary to load certain data first before any further trigger is taken, this must also be selected first for the steps. On the right side you will find a delete button for each step, which you can use to remove it.

Please note: The E-Marketing Manager deletes the step without confirmation, so you should be careful with the button.

  1. Once you have finished defining the trigger, click Save in the upper right corner.

  2. After saving, the tab Used in will be added to the detail view of the trigger. Here you will be able to view the forms and links associated with this trigger. Clicking the icon at the end of the row will take you directly to the detailed view of the connected object.

Fig. 11.2: In the detail view you can see and edit all trigger settings.

The Type drop-down menu in the Steps area offers you various options, some of which are self-explanatory and do not require any further settings, some of which need to be further specified with parameters or, in the case of script triggers, can become extremely extensive and flexible:

<table>
<colgroup>
<col style="width: 30%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Type</strong></th>
<th><blockquote>
<p><strong>Description</strong></p>
</blockquote></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>Unsubscribe</strong></td>
<td><blockquote>
<p>Unsubscribes a recipient from a mailing list.</p>
<p><strong>Usage</strong>: You can unsubscribe either by clicking a link in the mailing (one-click unsubscription) or by using an unsubscription form - see chapter <u>Example form:</u></p>
<p><u>Unsubscribe</u>.</p>
<p><strong>Parameters</strong>: none</p>
<p>With the <strong>Additionally unsubscribe from the following mailing lists</strong> button you can select several individual mailing lists from which the recipient will be unsubscribed.</p>
<p>Alternatively, you can select the <strong>All mailing lists</strong> option.</p>
</blockquote></td>
</tr>
</tbody>
</table>

<table>
<colgroup>
<col style="width: 30%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Send trigger-based mailing</strong></th>
<th><blockquote>
<p>Sends an activated, trigger-based mailing - see chapter <u>Example trigger: Triggering an trigger-based double opt-in mailing</u></p>
<p><strong>Usage:</strong> Can be triggered by clicking on a link or initiated by a form.</p>
<p><strong>Parameters:</strong></p>
<p><strong>Mailing</strong>: Defines the mailing to be sent; only activated mailings appear in the selection menu</p>
<p><strong>Delay</strong>: delay of the dispatch after triggering the trigger, selection menu offers different possibilities - from <em>no delay</em> over hours to <em>7 days</em></p>
<p><strong>BCC recipient</strong>: Here you can specify an e-mail box to which</p>
<p>all mailings are sent in blind copy, e.g. for verification</p>
<p>purposes for double opt-in mails</p>
<p><strong>Send to</strong>: You can specify who should receive the mailing.</p>
<p>The choices are <strong>Active recipients</strong>, <strong>Recipients with status 'Waiting for double opt-in confirmation'</strong>, as well as <strong>Active recipients</strong> and <strong>Recipients with status 'Waiting for double opt-in confirmation'</strong>.</p>
</blockquote></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>Add / update recipient data</strong></td>
<td><blockquote>
<p>Subscribes a recipient to a mailing list - optionally with double opt-in confirmation. For this, at least the information about the mailing list, gender, e-mail and mail type must be transferred from the form. See chapter <u>Example form: Subscribing with double opt-in</u>.</p>
<p><strong>Usage:</strong> This trigger only makes sense in connection with a form, since the data is entered there.</p>
<p><strong>Parameters:</strong></p>
<p><strong>Check for duplicate records:</strong> The slider defines whether a duplicate check should be performed. If the duplicate check is activated, a selection field appears for the key column. <strong>Key column for duplicate-check and updates</strong>: All existing profile fields appear in the selection menu. E-Marketing Manager compares this column with the database and updates the existing data for an existing recipient or adds a new recipient. By default <em>email</em> should be selected here to avoid double deliveries.</p>
<p><strong>Use double opt-in</strong>: The slider defines the type of login procedure. If the selection is activated, the recipient is transferred to the database with the status <em>Waiting for confirmation</em>.</p>
</blockquote></td>
</tr>
</tbody>
</table>

<table>
<colgroup>
<col style="width: 30%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Show archived mailing</strong></th>
<th><blockquote>
<p>Generates a personalized fullview (also webview) of the received mailing for the recipient, e.g. to avoid display problems in the e-mail client by loading the mailing in the browser. To do this, a form is called up from the mailing, which uses the <strong>Show archived mailing</strong> as the introductory trigger. See chapter <u>Example form: Fullview</u></p>
<p><strong>Usage:</strong> This trigger is only suitable for forms, because it requires a form to display the mailing in the browser. That means the form is linked in the mailing.</p>
<p><strong>Parameters:</strong></p>
<p><strong>Expire date (optional)</strong>: After this date the fullview is no longer accessible and an error page is displayed. This setting is optional and recommended for single triggers only.</p>
</blockquote></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>Double-opt-in confirmation</strong></td>
<td><blockquote>
<p>Sets the status of a new recipient from <em>Waiting for confirmation</em> to Active. See chapter <u>Example form:</u></p>
<p><u>Subscribing with double opt-in</u>.</p>
<p><strong>Usage:</strong> Usually the setting <strong>Only for links</strong> makes most sense, because the recipient confirms the registration by clicking on a link in a previously sent double opt-in mailing, but you can of course also link a form where the double opt-in is executed as an introductory trigger.</p>
<p><strong>Parameters:</strong></p>
<p><strong>Confirm on all mailing lists</strong>: If this option is activated, the recipient can confirm the subscription for several mailing lists with just one click. The status is only set to <em>Active</em> for the mailing lists that the recipient selected when subscribing. <strong>Confirm DOI for media type</strong>: The default setting is the media type <em>E-mail</em>. If you have enabled other media types, you can also select <em>SMS</em> and <em>Post</em>.</p>
</blockquote></td>
</tr>
<tr class="even">
<td><strong>Recipient-login</strong></td>
<td><blockquote>
<p>Allows access to a protected area that is called up via a form. The trigger requires verification via profile fields for user name and optional password. See chapter <u>trigger: Recipient login</u>.</p>
<p><strong>Usage</strong>: The verification of access data always takes place via a form.</p>
<p><strong>Parameters:</strong></p>
<p><strong>Username column</strong>: Select the profile field containing the user name from the drop-down list.</p>
<p><strong>Password column</strong>: In the second dropdown you can optionally select the profile field that contains the password.</p>
<p>The default setting is <em>Don't use a password</em>.</p>
</blockquote></td>
</tr>
</tbody>
</table>

<table>
<colgroup>
<col style="width: 30%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Load recipient-data</strong></th>
<th><blockquote>
<p>The recipient data of a recipient is loaded into a form, e.g. the profile change page. The agnUID must be transferred. See chapter <u>Example form: Amend a profile</u>.</p>
<p><strong>Usage</strong>: This trigger only makes sense for forms or in connection with script triggers and sending service e-mails, because the loaded data can only be processed there.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>Load even if customer is not an active subscriber</strong>: The recipient data will still be displayed even for subscribers who have unsubscribed, if they call up a corresponding form after unsubscribing.</p>
</blockquote></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>Archive overview</strong></td>
<td><blockquote>
<p>Generates a personalized archive for the recipient with an overview of all mailings already received. These mailings must be marked with <em>Show in online archive</em> under <em>Settings</em> and assigned to the selected archive. The displayed mailings can be accessed via fullview links.</p>
<p><strong>Usage</strong>: This trigger is only suitable for forms, because it requires a form to display the archive in the browser.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>Archive</strong>: Selection of the archive from which the mailings may be displayed.</p>
<p><strong>Limit view</strong>: Set a limit on the retention of mailings by quantity or time.</p>
</blockquote></td>
</tr>
<tr class="even">
<td><strong>Modify profile</strong></td>
<td><blockquote>
<p>Modifies a profile field of a recipient. It can specify a specific value or, in the case of numeric fields, change an existing value by addition or subtrtrigger. See chapter <u>trigger:</u></p>
<p><u>Changing recipient profile</u>.</p>
<p><strong>Usage</strong>: Can be used for both link clicks and forms.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>Use tracking point</strong>: The used values for profile modification are delivered by a measuring point to be selected.</p>
<p><strong>Column name</strong>: Selection of the profile field, trigger and value to be changed.</p>
<p><strong>Note</strong>: Fields that have been marked as invisible are not displayed. Fields that cannot be edited (e.g. system fields such as customer_id) are also not offered, but old records can still be changed.</p>
</blockquote></td>
</tr>
<tr class="odd">
<td><strong>Send service e-mail</strong></td>
<td><blockquote>
<p>Sends an e-mail notification to a selected recipient with the contents defined in the trigger. The recipient of the service email does not have to be included in the newsletter distribution list. This trigger can, for example, inform customer service if someone has previously downloaded a file. If you want to transfer data from a recipient profile in the content of the service e-mail, you must use the trigger <strong>Load recipientdata</strong> in the first step. In addition, a valid agnUID must be transmitted to prevent misuse.</p>
<p><strong>Usage</strong>: Can be used for both link clicks and forms.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>To</strong>: E-mail address of the recipient.</p>
<p><strong>From</strong>: Input field for sender e-mail address</p>
<p><strong>Reply-to e-mail</strong>: Input field for a different recipient address for replies</p>
<p><strong>Subject</strong>: Subject of the e-mail</p>
<p><strong>Format</strong>: Defines the format in which the service e-mail is sent. You can choose between <em>Text</em> and <em>Text and HTML</em>. <strong>Text version</strong>: Enter the content of the service e-mail in Text format.</p>
<p><strong>HTML version</strong>: Enter the content of the service e-mail in HTML format here.</p>
</blockquote></td>
</tr>
<tr class="even">
<td><strong>Send last newsletter</strong></td>
<td><blockquote>
<p>This trigger is intended as the last step of a subscription form. The new recipient will receive the latest newsletter from the mailing list to which they have subscribed as long as they fall within the target group of this newsletter.</p>
<p><strong>Usage</strong>: The trigger can be used for forms and for links.</p>
</blockquote></td>
</tr>
<tr class="odd">
<td><strong>Script-trigger</strong></td>
<td><blockquote>
<p>With the help of numerous velocity script methods you can define and execute your own triggers. See chapter <u>Example trigger: Integrating your own scripts</u>.</p>
<p><strong>Usage</strong>: Can be used for both link clicks and forms.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>Script</strong>: The script to be executed is defined here.</p>
</blockquote></td>
</tr>
<tr class="even">
<td><strong>Show specific content block</strong></td>
<td><blockquote>
<p>Displays the contents of a text module of a mailing (only available for the standard method). Works like the <strong>Show archived mailing</strong> trigger and loads the personalized module from the currently opened mailing for the recipient in the browser. To do this, a form is called from the mailing, which uses the introductory trigger Display specific content module. <strong>Usage</strong>: This trigger is only suitable for forms, since it requires a form to display the module in the browser. This means that the form is linked in the mailing.</p>
<p><strong>Parameters</strong>:</p>
<p><strong>Name of the content block</strong>: Name of the module in the mailing</p>
</blockquote></td>
</tr>
</tbody>
</table>

Note: You can mark forms and triggers that you no longer need, but do not want to delete, as inactive. In both the overview and the object, you can see whether it is currently being used or not. In this way, you can keep track of your active forms and triggers. On the other hand, you can keep the contents for verification purposes or for quick reactivation.

12.3.1 Example trigger: Changing recipient profile

In the following example, you would like to make a change in the recipient profile for recipients who click on articles from the Travel section in the newsletter. A previously created profile field Interest Travel is used to record who reacts particularly frequently to content from the travel category.

Proceed as follows for the new action:

  1. Click the New button under Trigger management. The input dialog for the action appears in the content area.

  2. Select meaningful texts for Name and Description so that you can always understand what the trigger is used for.

  3. Since this trigger is to capture retriggers to newsletter content, select the setting Only for links in the Usage field.

Fig. 11.3: Give the new trigger a meaningful name and description.

  1. Next, select Modify profile in the Type selection field and confirm your selection with Add. Read more about the other options in chapter Create or change triggers.

  2. Once the step has been added, you will be offered further input options: In the first selection field for Column name you will be offered your individual profile fields, the system fields like First and Last name are not available for this trigger. Now select the field Interest Travel. In the middle selection field, use the operator to define how the field is changed. You can choose between + sign (adds the entered value to the existing value), - sign (subtracts the entered value from the existing value) and = sign (transfers the entered value to the profile field). In our example the + sign is required. And in the last field you enter the value to be used by the profile modification. In the described example, each click should increase the value in the profile field by 1.

Note: The plus and minus signs only work in conjunction with numeric fields. With the equal sign (=) you set the field content to a specific value, no matter what was previously stored. You can use this operator for all field types, i.e. numeric, date and alphanumeric. Of course, the content of the last input field must match. You may enter any Unicode characters in an alphanumeric field, but only numbers in numeric fields. The system expects a date in the format YYYYMMDD, so about 20221224 for Christmas 2022.

Fig. 11.4: In the selection list you choose which field should be changed and how.

  1. If you are finished with the entries, transfer the changes to the system by clicking the Save button.

  2. You can now define any additional steps in the Add tile area. It is no problem to combine profile modifications, e-mail sending and other types in one trigger. You may make changes to already existing steps at any time. To do so, simply enter the new values and confirm with the Save button.

  3. To remove a step, click on the Delete button at the end of the line.

Please note: The E-Marketing Manager deletes the step without confirmation, so you should be careful with the button.

12.3.2 Example trigger: Triggering an action-based double opt-in mailing

A typical use case for action-based mailings is the sending of a double opt-in email immediately after registration. The trigger in this case is the registration of the new recipient. Before we can create a corresponding trigger, we first need a suitable actionbased mailing. The following steps are necessary:

1. In the input dialog for the new mailing, enter a unique Name and a meaningful

Description. Leave the setting for the Advertising slider deactivated, since you have a legitimate interest in tracking because of the obligation to provide proof of a legally valid opt-in. The other basic information is optional. In the Sender settings you can enter a Subject, Sender e-mail as well as Sender full name and, if desired, different answer information. Under Targeting settings, select the Mailing list for which the double optin applies and choose Action-based mailing as the Mailing type in the General Settings. Then save the new mailing with the Save and generate mailing button and continue with the content creation. (For more information, see chapter Mailings Sending out newsletters).

Please note: In the content there must be a prominent button to confirm the registration in any case.

Also important: The double opt-in mailing must not have an advertising character, so you should limit the content to the pure confirmation function.

Fig. 11.5: To send an action-based double opt-in mailing, create a new mailing with the type Action-based mailing.

  1. The confirmation link is now linked to the trigger Double-Opt-In: Confirmation (more in chapter triggers for double opt-in process). To do this, simply call up the Links tab and select the previously created trigger in the trigger selection field. Note: In the selection menu, only triggers with the status active and the usage Only for links or Links and forms appear. A welcome page on your website can be used as a link target. Alternatively, you can also create a welcome form using the E-Marketing Manager.

  2. When you have completed the mailing content and linked the link to the trigger, switch to the Send Mailing tab. Since an trigger-based mailing is sent repeatedly over a longer period of time, you cannot set a sending date here, but you release the mailing for sending by clicking Activate. Now activate the finished double opt-in mailing. Note: Since action-based mailings are always triggered by a trigger or a campaign, you can activate the mailing without hesitation. No dispatch will take place for the time being.

Fig. 11.6: With the Activate button you release the action-based mailing for dispatch.

  1. In the next step we create the trigger that triggers the sending of the double opt-in mailing. Call up the input dialog for a new trigger and enter the Name and Description. In the Usage selection field, select Only for forms, since the trigger will be used for the subscription form. In the Steps section, select the option Send action-based mailing in the Type selection field and confirm with Plus.

Fig. 11.7: Add the step Send action-based mailing.

  1. Further input fields now appear under the step Confirm DOI for media type. The Media Type selection list shows all possible media. In the Send to selection field, select one of the two options that take into account recipients with the status 'Waiting for double opt-in confirmation'. You can decide whether active recipients should also be delivered again.

Fig. 11.8: Select the Double Opt-in Mail in the mailing selection box.

  1. After you are finished with the settings for the step, create the new trigger with the Save button.

The trigger for sending the double opt-in mailing is now complete and can be linked in the feedback form of your registration process. Read more about the creation of the entire double-opt-in registration process here Example form: Subscribing with double opt-in.

12.3.3 Example trigger: Access restriction with recipient login

Another, somewhat more unusual area of application for actions is to protect special contents by a login barrier. The following examples explain how to implement access restriction with recipient login. This is an action in E-Marketing Manager that can only be used in conjunction with a form.

Examples of use:

  • Login to a password protected download area

  • Personalized landing page with exclusive voucher code for newsletter subscribers

(access and individualization based on email address)

  • Access to a personalized online newsletter archive

Example 1: Login to a download area with username and password

Prerequisite: You need two profile fields at the recipient, which contain the user name and password.

How it works: In a first form the user has to fill in username and password. By clicking on

Submit, the first form transfers the data to another EMM form with the introductory trigger Check login data. If the entries match the data in the EMM database for user name and password, the success form is output with the download documents, which can also be personalized with data of the recipient from the database. If the login data do not match, the error form is displayed.

  1. For the implementation, create a new trigger with the Name Check login data. In the Usage field, select Only for forms. Under Description you explain where this trigger is used. In the Steps section, select the trigger Recipient login in the Type selection field and confirm with Add.

  2. Now two input fields appear under Recipient-login. In the Username column, select the profile field in which the corresponding entry can be found - the e-mail address could also be used here. Proceed in the same way for the selection field Password column. When the assignment is complete, confirm your entry with Save.

Fig. 11.9: The trigger Recipient-login allows access restriction for special content.

Example 2: Personalized landing page with exclusive voucher code for newsletter subscribers (access and individualization based on email address)

Prerequisite: For this trigger, only the e-mail address must be available in the database.

How it works: You advertise on your website that newsletter subscribers receive special discounts to make subscribing to the newsletter more attractive. To do this, you place a link Redeem newsletter bonus in your purchase process. This link opens a popup asking the buyer to enter his email address to verify that he is a newsletter subscriber. This popup is a first EMM form. By clicking on Verify, the email address is forwarded to a second form with an introductory trigger Check email. If the trigger finds a matching entry in the database, the success form is displayed with the special advantage code for newsletter subscribers. A script can be used to load additional user data from the database and personalize the landing page for the recipient. If there is no matching entry for the e-mail address, the error form appears, which in this case is a registration form for the newsletter.

You can also access the advantage code directly from the newsletter by clicking on the form with the transfer of the e-mail address, e.g:

https://rdir.de/form.de? agnCTOKEN=xxxxxx&agnFN=newsletterbonus&EMAIL=max.mustermann@agnitas. de

  1. For the implementation, create a new trigger with the Name Check email. In the Usage field, select Forms only. Under Description you explain where this trigger is used. In the Steps section, select the trigger Recipient-login in the Type selection field and confirm with Add.

  2. Now two input fields appear under Recipient-login. In the Username column select the profile field email. For the selection field Password column, leave the setting on Don't use a password. Confirm your entry with Save.

Fig. 11.10: The trigger recipient login also works without password for less sensitive content.

You could realize the access to a personal newsletter archive in the same way. However, you need one more step Archive Overview in your trigger.

12.3.4 Example trigger: Integrating your own scripts

The \<%PRODUCTNAME%> allows you to execute your own scripts and thus integrate individual functions. The E-Marketing Manager offers a variety of valid velocity script methods for this purpose, which you can work with. These are summarized in a separate documentation, as this would go beyond the scope of this chapter. The velocity script documentation can be downloaded in the E-Marketing Manager via the Help icon placed at the bottom of the menu bar on the left in the Documents section.

Examples of use:

  • Activating the newsletter subscription for selected mailing lists with only one double opt-in link

  • Validate a Google reCaptcha token

  • Exclusion of certain domains, e.g. freemailer, for newsletter registration

  • Sending the last newsletter to a new newsletter recipient

  • Create a SHA-512 hash from text

Example: Sending the last newsletter immediately after registration

How it works: Usually, clicking on the activation link of a double opt-in e-mail leads to a welcome page. In this case, insert a EMM form in between, which as an introductory trigger confirms the registration and triggers the sending of the last mailing.

  1. To set up this function it is only necessary to extend your existing trigger for subscription. So select your subscription trigger in the Trigger management. It makes sense to adapt the Description of the trigger, e.g. subscription with newsletter resend, so that you don't lose track of what is happening.

  2. In the Steps section, first select the type Load recipient data, because the customer ID of the recipient is needed in the next step, and then select the type Script-action. Then insert the following commands:

#set(\$companyID = \<cid>)

#set(\$mailingListID = \<ml_id>)

#set(\$lastSentMailingID=\$ScriptHelper.getLastSentWorldMailingIDByCompanyAnd Mailinglist(\$companyID, \$mailingListID))

#set(\$mailing=\$MailingDao.getMailing(\$lastSentMailingID, \$companyID)) \$ScriptHelper.sendEventMailing(\$mailing, \$customerID, 0, "1", null)

#set(\$scriptResult="1")

Please note: You have to replace the placeholder \<cid> with your assigned company ID. You can find this under your user name in the left-hand navigation. Instead of \<ml_id> you must insert the desired mailing list ID.

  1. Finally, click on Save. The trigger is now active. You should subscribe to the newsletter once to test the new trigger.

Fig. 11.11: With own script triggers various use cases are realizable.