Send messages according to conditions

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Defining notifications > User configured notifications >

Send messages according to conditions

You can configure sending several messages in a single E-mail with different content depending on a set of conditions. That is, in a single E-mail you can include several templates with a condition attached to each one. Bizagi evaluates each condition and sends the templates that meet the conditions.


To include several E-mail templates check the Multiple Messages box. This will create a new tab above the Subject field where you can add each template.

You can add as many messages as desired by clicking the last tab (the one marked with a star).




Each message has its own subject as well as its own template.


The conditions associated with each message are set in the Set Conditions option (in the upper right corner). When clicked, a new window will be displayed to define the different conditions. These must return a Boolean value, true or false, so Bizagi can identify which E-mails to send.





Imagine you work in an electronic shop. When a customer buys a product his information will be stored in the shop's database. The Marketing Department will send him/her an E-mail some time later to offer promotions and discounts. The Marketing Department understands that there can be different inventory sales by country. According to the client's country a message will be sent offering selected products that the store has on sale.


1. Go to the Activity Actions option in the fourth step of the Process Wizard. Select the Activity in which the E-mail must be sent, click Add and select the e-Mail option.




2. Select the addressee.

Click To and include the E-mail address. In this case we select the customer E-mail address from the Process data.




3. Type a Subject and body for the first template.




4. Check the Multiple Messages box and click the last tab (the one with a star) in order to create another template.




5.  Include an addressee, subject and body for the second template. Then click Set Conditions.




6. Click the Condition link for the first E-mail template. A new window will be displayed to create the condition. The condition in the first template will evaluate if the customer is a Male.




7. Repeat the procedure shown in the previous step for the second E-mail template.




8. If you want to delete any of the previously created conditions you can double click the trash icon in the third column Delete and then Yes.




9. Click Ok and then Save.


Multiple Messages in Production

When a project has been deployed, some elements like Notifications will remain editable in the Development environment. However, to avoid possible problems with subsequent deployments, Bizagi restricts changes on some of these elements. For this reason, when a Notification with multiple messages is already in Production it will not be possible to delete or change the conditions. The template and the To field will remain editable.