On Call Workflow should assign the ticket....but it doesn't

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 04:33 AM
Hi,
I've spent the last few weeks configuring the Notify/Twilio On-Call modules. The requirement is to be able to create a rota of on-call engineers so that the person on call can be automatically identified when a certain type of incident is logged and they will receive a phone call and an SMS.
I had some issues with the Trigger Rules which were being caused by the fact that we pre-populated the Assignment Group field and had it as a Mandatory field. Apparently, the trigger rules don't like that. Anyway, it all works.
I log a ticket that meets the rules, the person who is on call according to the rota, receives a phone call which asks them to press 1 to accept the ticket (i.e. to assign it to them) or 2 to reject the ticket. In the event that the on-call engineer doesn't answer, after 15 minutes it will call the "catch all". Perfect.
The only problem is that when the engineers presses 1, the ticket remains unassigned. The workflow activity is running (confirmed by the workflow context):
I added some gs.info statements to that script to ensure all of the values were correct:
var recordGr = new GlideRecord(workflow.scratchpad.recordClass);
gs.info('XXAssigned to: ' + workflow.scratchpad.participant);
gs.info('XXRecord Class: ' + workflow.scratchpad.recordClass);
gs.info('XXSys ID: ' + workflow.scratchpad.recordSysId);
if (recordGr.get(workflow.scratchpad.recordSysId) && JSUtil.nil(recordGr.getValue('assigned_to'))) {
recordGr.assigned_to = workflow.scratchpad.participant;
recordGr.update();
}
And they are.
If I put the log statements into the IF statements, I get nothing. So, something about that IF statement isn't working but I don't know what.
I believe it says "if there is a recordSysId and, the assigned_to field is empty then run this code". Well, there is a sys_id and the assigned_to field is empty. Furthermore, the user who it should be assigned to is in the group that the ticket is assigned to (i.e. needs to be because they are dependent).
Does anyone have any idea why this wouldn't populate the assigned_to field or have anything I can try that I might not have though of?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 11:07 AM - edited ‎01-15-2025 11:09 AM
Hi @Andrew Bettcher @Luiz Martins1
Did anyone got solution to this? We are facing the same problem, but strangely it works if the Case is created from Native view. If the Case is submitted from the Portal, Assigned to is not updated.
Thanks