Send a notification on Inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 04:59 PM
I have created an Inbound action on incident table.
Where, its matching the condition on incident, if the incident is found, then do the updates from inbound. This works fine.
Now, I just want to sent an email notification if the incident is not found. I was just wondering the following solution will work or not:
1. I am thinking of registering a new event and then using that in my else condition of the same inbound action,
2. which will then fire the notification. Is that going to work without any errors?
Please suggest if this is the best or do we have any other best option as well.
Thanks in advance!
Cheers!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 11:25 PM
Hi Jyo,
I think the condition should be changed as AND instead of OR when you are using NOT condition. Because one of the condition will always satisfies and hence it is entering inside.
Thanks,
Sunil Safare

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 11:31 PM
Nice Catch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 12:05 AM
Hi Sunil,
Thanks that worked like anything!
But still have issue in :
else {
gs.eventQueue("task.no.snreference.found", targetRec, targetRec.number, email.body_text);
}
The last else, do you think there is any error in this line...
Actually, this will work only if Inbound doesnot find the related incident record and it will fire an email. You can check above code. It's there.
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 12:12 AM
The code executes else part when there are no records present in the incident table. But you are passing targetRec.number parameter where it cant find this. So change this parameter and try.
Thanks,
Sunil Safare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 06:12 PM
Tried changing it, what it should be ideally?