send email notification using previous value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:28 PM
Does anyone know there is a way to trigger email notification/action programmatically via business rule?
The reason I'm asking is that when setting email notification in Notification, the state changes I would like to trigger the who to send in the notification may have cleared the column of the destination, but in business rule, the value I would like to retrieve value is coming from eg. previous.my_column.
Alternatively, is there a way to access previous.my_column in email script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:46 PM
Hi @Ni Li ,
You can create event and generate the event in business rule and send the previous value as an event parameter.
Create an email notification on the event trigger and you can fetch the event parameters in the mail script and use.
Please, mark answer correct or helpful based on the impact.
Thanks,
Sudhir G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:18 AM
Do you have the sample code of pushing previous values in the event queue? also, how do I ingest parameter for script in the email script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 12:14 AM
Hi @Ni Li
You can use eventQueue method to trigger notification using Business rule
gs.eventQueue('<eventRegisteryName>',current ,'parm1','parm2');
Example
gs.eventQueue('send.event.br', current, prevoius.myColumn, '');
You can use either options below to send list of users from event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:14 AM
can we use previous to get the previous value in the eventQueue? the screenshot at the bottom won't work because as I said the value in this column will be wiped out while this notification happens. that's why I have to find a way to pull out the value in the column right before the notification triggers.