This blog will take you through the Outbound Triggers – triggers that are sent from Campaign to other applications.
An outbound trigger is the execution of a command, batch file, or script (that is stored on the Campaign Application Server) that takes place after a flowchart or process is run. You can define triggers to perform virtually any action, such as opening an application, sending an email, or running a program.
Campaign can execute an outbound trigger when a Schedule, Call List, or Mail List process executes. For example, when a Call List process completes, an outbound trigger can send an automatic email informing a manager that a list of contacts is ready.
Triggers execute on completion of test runs as well as of production runs. Campaign can also automatically execute an outbound trigger when a flowchart runs. You can configure different triggers for when the flowchart completes successfully, or fails.
a) A trigger that transfers a file to the mainframe. A script is written to FTP the file. A trigger is created that calls this script. The trigger is called from a Mail List process after the vendor file is successfully created.
b) A trigger that sends an email to user after a flowchart completes successfully. A script is written that has the commands to communicate with a mail server to send an email to the appropriate user. A trigger is created that calls this script. The trigger is called from the Admin menu, on the Advanced Settings tab.
1. Synchronous outbound triggers
When Campaign runs an outbound trigger synchronously, the process that called it waits for the executed command to complete and return with a success or failure status. In other words, the flowchart does not continue running until the results of the trigger are returned. If the trigger fails, as indicated by a non-zero return value, the process box does not continue processing and indicates an error (with a red X) and an appropriate error message.
Synchronous execution is useful when the flowchart is waiting for an external process to complete its work before continuing. For example, a synchronous outbound trigger could run third-party predictive model scores in real-time, and the flowchart would wait until it completed before selecting from the updated model scores.
To make an outbound trigger synchronous, you terminate the command in the trigger definition with a question mark (?). For example:
2. Asynchronous outbound triggers
When an asynchronous outbound trigger executes, the flowchart processing continues immediately; the process that called the trigger does not wait for it to succeed or fail. To make an outbound trigger asynchronous, you do not have to add a termination character.
However, to ensure that it is explicitly understood that the trigger is asynchronous, you can terminate the command with an ampersand (&). For example:
3. Creating an Outbound Trigger
1) From within a flowchart go to Tools > Stored Triggers
1) Click New Item and Name the trigger
2) Add a description of the file to the Note section
3) Click Browse to select the batch file or script – this will capture the name and location of the file and Save
Note List of token can also be passed to the script.
5) Clicking on “Run Trigger” button can test the trigger.
6) The trigger may be edited by clicking on Edit\Move.
Available Tokens to Pass to a Script
The trigger can pass tokens into the script. The following tokens are supported for triggers:
4. How to call an Outbound Trigger
A trigger can be called from a number of locations within a flowchart. These include:
1) Admin Menu -> Advanced Settings
A trigger may be called from the Send Trigger(s) on Flowchart Run Error and Success dropdowns.
2) Schedule Process
A trigger can be called after the Schedule process has completed its’ run.
3) Mail List and Call List process
A trigger can be called after the file or table has been created on the Contact List tab.
Marketing Platform, Campaign, Interact, Marketing Operations, Contact Optimization, and Opportunity Detect are trademarks of IBM Corporation, in at least one jurisdiction, and are used under license.
HCL Products and Platforms