- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2014 10:00 AM
Hello,
Our helpdesk has requested a notification be built to notify them when the customer visible notes field changes. A recent addition to the request is that the notification trigger only when the Caller updates the customer visible notes. The notification worked until I added the advanced condition. The script currently looks like this:
if (current.sys_updated_by == current.caller_id ) {
true;
}
Again, that doesn't appear to be correct because the notification isn't sending. Is something incorrect with the script?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2014 10:05 PM
What version are you running on? The reason I ask is John E. Jasinski has a point about using the "Send when" = "Record inserted or updated" option and the condition fields. Makes it easy, and in this case, you should be able to use it, BUT, depends on the version you are running. The "Send when" option was added in Berlin (I think). Plus, in order to use the field comparison feature that you will need, you need to be running at least Calgary.
So, if you are, there is an existing OOC notification called "Incident commented" you could use as a starting point or modify. There's actually 2 of them, one that goes out to the Assigned to and Watchlist users and the other to the Caller. Choose the right one, and you can modify the Conditions field by adding the highlighted part below:
Now, with all that being said, sometimes you do actually have to use some scripting. And it is considered "existing functionality". Not doing anything wrong - there's a script field there for us to use in these cases. So if you must use a script, this should work for you:
if (current.sys_updated_by == current.caller_id.user_name ) {
answer = true;
}
Like Tony Fugere, William Sun and Subhajit Das mentioned above, you need to return "true" or set "answer = true" in the script. And remember, both the "Conditions" and "Advanced conditions" fields must return "true" for the notification to go out. And, if you are testing yourself with your own tickets, the "Send to event creator" field would have to the selected for the email to go out (on the "Who will receive" tab or section, advanced view of the form).
OK, I'm done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 12:37 AM
You solved me an issue i've got so confused for long time with, Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 10:33 AM
You are welcome. I'm glad my old posts are still useful 🙂