Send a notification on Inbound email action

Jyoti36
Mega Expert

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!

23 REPLIES 23

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


Nice Catch.


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!


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


Jyoti36
Mega Expert

Tried changing it, what it should be ideally?