
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 08:43 AM
I've been wrestling with the implementation of Twilio/Notify/OnCall for a while now.
I've got the basics set up but, for some reason, my workflow isn't being triggered by the on-call trigger rule. I found two KB articles that appeared to explain why this might be (this and this). These say that the trigger rules won't work if our Assignment Group field is mandatory and if it is auto-populated. Ours is both.
So, I tried the suggested business rule and it still doesn't fire the workflow.
The suggested script is:
(function executeRule(current, previous /*null when async*/) {
var workflowSysId = '78d9b342ff010200f6d6ffffffffff9d';//sys_id of Workflow (EX: On-Call: Assign by Acknowledgement)
vars = {};
vars.assignment_group = current.assignment_group; //populate input variables based on the workflow
var wf = new Workflow();
var wfc = wf.startFlow(workflowSysId, current, current.operation(), vars);
})(current, previous);
But I noticed that the input variable on the workflow I want to run is called "groupId" rather than "assignment_group" and so I changed it to this:
(function executeRule(current, previous /*null when async*/) {
var workflowSysId = 'fca458701b828510cbb7dce7b04bcbf9';//sys_id of Workflow (MTI On Call: Assign By Rota)
vars = {};
//vars.assignment_group = current.assignment_group; //populate input variables based on the workflow
vars.groupId = '5fc0417a1bfd0d50ee13edb2b24bcbe6';
var wf = new Workflow();
var wfc = wf.startFlow(workflowSysId, current, current.operation(), vars);
})(current, previous);
And hard coded a particular group into the script for testing purposes (i.e. that group is set up with an on-call rota and they all have E.164 mobile numbers on their profiles).
I'm not sure what my actual question is except, what else can I do or check? I feel like I'm going around in circles and the only posts on this forum that pertain this are all 5 years old.
Here are some points that might be relevant:
1. Service Desk is the default assignment group for all new incidents (hence the above change to the script)
2. I haven't amended the workflow in anyway. I saw some posts say that they added a number to an activity on their workflows but I don't know where to add this. Either way, I believe that the workflow should run and then fail at this point if there is no number given.
3. The business rule that I created does run (confirmed via BR debug). It just doesn't appear to do anything.
4. The instructions provided on "docs" are not very good.
I have a case open with HI but their advice was to install the Twilio Spoke. I think this means they recommend using Flow designer. I don't want to do that because I don't know how to use Flow Designer (and I don't think I should have to).
Any help will earn you my eternal gratitude.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 07:59 AM
I get the impression that not many people use Notify with On-call. Anyway, it turns out that these KB articles (KB0784518 and KB0547296) really mean what they say. Our Assignment Group field was being auto-populated on load by a dictionary override on the default value AND it was mandatory).
I removed the mandatory from a UI policy and tested it. Didn't work.
I removed the dictionary override and tested it. Beep Beep. SMS received and confirmed that it was from right the workflow context.
If you have any issues with the triggering mechanism then it's worth looking at this. Now to talk to the Service Desk manager about how we need to change the way the form behaves....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 07:59 AM
I get the impression that not many people use Notify with On-call. Anyway, it turns out that these KB articles (KB0784518 and KB0547296) really mean what they say. Our Assignment Group field was being auto-populated on load by a dictionary override on the default value AND it was mandatory).
I removed the mandatory from a UI policy and tested it. Didn't work.
I removed the dictionary override and tested it. Beep Beep. SMS received and confirmed that it was from right the workflow context.
If you have any issues with the triggering mechanism then it's worth looking at this. Now to talk to the Service Desk manager about how we need to change the way the form behaves....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 09:10 AM - edited 06-26-2024 09:10 AM
This worked for me! KB0784518