If something in your data source has a peculiar value, or when a certain item is processed, you might want to send a conditional success email.
To set this up, we will need to have a calculation that checks every line of data for a certain value. If that certain value is found, we can update a global variable, which we can then pass into an Email Task. This will be the basic premise of how to set this up.
If you would rather watch a video tutorial, click here.
In this example, I have an integration that has 5 records with various names, and I want to add a field to the email when the name Ashley or Chris is processed – in addition to my normal Post Integration Success Email.
- To set this up, we need to go into the tasks on the integration and add a Run Script task under “Tasks that run if the document succeeds”.
- In the Script Window, you can set up the Logic to compare a Source Column to whatever value you need to. Once that condition is met, you can set a Global Variable to a string value of whatever you like to show up in the email later. Here is how I set it up for my example.
- Create a Send Email task under “Tasks that run if the document succeeds” that uses that Global Variable. I have a simple example here:
The results look like this - Finally, you will want to set up a task that clears the Global Variable before you use it in the integration. Create a Run Script task under “Tasks that run before the Integration”. Set the Global Variable to an empty string.
With all of this setup, you can now send conditional Messages with email tasks.
Have questions about using Conditional Messages in email tasks or other solutions? Feel free to send us an email at support@eonesolutions.com