- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2021 11:16 AM
Hello Guys,
I have a requirement to send a notification to the Agent every time a case[sn_customerservice_case] has a new received email.
My first tentative was building a Inbound Action calling an event and sending an email notification triggered by event. - It didn't work cause the [sn_customerservice_case] has already an "inbound e-mail flow" to get updates and replies and attach to the case record. So this flow was making my inbound Action to be bypassed.
Then I tried putting the code to call the event inside this flow as you can see:
Well, the idea sounded good but it seems like it's not working because the flow it's in a scoped application "Customer Service", I came into this conclusion because the code actually works fine when I run it in the background script.
I couldn't even use the OOTB Flow Action "Create Record" to create a new record in the [sysevent] table because the scoped flow is not allowed to access this core table.
Any Good Ideas on how to solve it? Any guidance?
Solved! Go to Solution.
- Labels:
-
Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 11:25 AM
You do not need Ajax call as it is serverside script
You will have to call something like
var objCaseUtils = new global.CaseUtils();
objCaseUtils.NewActivityEventCall(caseSysID);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2021 12:36 PM
As a workaround:
Can you move lines 5 thru 9 to a new script include function in global scope accessible to all scopes.
Call the script include function from the action script step.
May not be the best practice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 10:35 AM
Hey,
Thanks for commenting, as you can see on line 11 on, I did try it.
There's another error "Error MessageAbstractAjaxProcessor undefined, maybe missing global qualifier" appearing in this case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 11:25 AM
You do not need Ajax call as it is serverside script
You will have to call something like
var objCaseUtils = new global.CaseUtils();
objCaseUtils.NewActivityEventCall(caseSysID);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 12:05 PM
Oh, I see.
Thanks a lot man, it worked good.