Email sent based on Catalog Task variable changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 06:58 AM
Hello all,
I have created a variable specific to one catalog item with a drop down of selections. When a specific selection is chosen and the form is saved I want it to trigger an email to the user in the variable "Requester". The emails will be specific to which option they chose and they can continue to chose new options and save the form sending different emails.
What would be the best approach to achieving this?
Thank you!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 07:11 AM
you have achieve this by writing a 'update', 'insert' business rule on SC_TASK table. By calling mail script you can send appropriate email to requester.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 07:26 AM
I'd be interested in a higher level view to see if this is the best mechanical fit for the business need.
From a purely mechanical standpoint, you have a challenge in that the notification record can't use variables in conditions. And probably cant target them in the send-to fields either. This means you'll need a business rule to evaluate updates, then fire a custom event. You fire over the requester as a parameter of the event. Then you build your notification as being event driven, rather than condition driven.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2023 06:32 AM
This can be achieved by adding a business rule on sc_task table.
Table: sc_task
Before update and add a filter for the catalogitem this functionality to run on
Script:
And make sure the event and emails are on sc_task table to trigger the notification.
This works for me in Tokyo release.
If this answers your question, please mark the answer as helpful