On-call trigger rules and assignment group issue

chedley
Tera Contributor

I like many others are testing the On-call scheduling functionality (Helsinki). By the documentation, trigger rules will not work if the assignment_group or assigned_to are not blank, and are dependent on executing the rule by basically any other conditions.

Our use case is the opposite. Our Service Desk always knows the group that needs to be assigned, but doesn't know the assignee and we want to use on-call to handle this.

What is the work-around for allowing trigger rules to work when I've set the assignment_group in my Incident?

There are far too many permutations of categories and subcategories and priorities to hardcode 100s of trigger rules

UC:

I open a new Incident, categorize it appropriately, and set the assignment_group. I want the rota to then be checked, and the assigned_to set based on primary. Using On-call: Escalations by email workflow, if they don't respond, I want to then escalate to the Secondary.

None of this is possible via the OOB trigger rules by nature of them not executing if the assignment group is filled.

Any thoughts?

I've referenced https://hi.service-now.com/kb_view.do?sysparm_article=KB0547296 and many other community articles with no success. I also looked at making a specific business rule like in this link (thanks dvp for your response there) but then I'm just setting the assigned_to and not actually getting to use the workflow with escalations.

14 REPLIES 14

Ajinkya Ladkhed
ServiceNow Employee
ServiceNow Employee
Trigger rules fire only if the assigned_to and assignment_group fields are not populated on a record.
Ref. Docs: https://docs.servicenow.com/bundle/orlando-it-service-management/page/administer/on-call-scheduling/task/t_CreateATriggerRule.html

However, you can create a custom business rule to fire the on-call workflow. Below is a sample script:
//----
vars = {};
vars.assignment_group = current.assignment_group;
var wf = new Workflow();
var wfc = wf.startFlow("<sys_id of on-call [wf_workflow] WF record>", current, current.operation(), vars);
//----
Ref. Docs: https://developer.servicenow.com/dev.do#!/reference/api/quebec/server_legacy/c_WorkflowAPI#r_WF-startFlow_String_GR_S_A?navFilter=startflow
 
Please note this is a custom code and should be used as reference only. Please modify it as per your business requirements and perform all testing in subprod instances only. 

This is the suggested way... but I didn't want to create a business rule per assignment group...

Hey Ajinkya, I was trying to create this BR for my scenario, but it did not triggered BR

the Oncall workflows are controlled by trigger rules. we have a trigger rule for when an assignment group is null. When the incident is assigned it no longer meets this criteria and is looking for a rule that matches the assignment group. This is working as expected and trigger paging (we are using twilio for paging)

However, If we create a rule for when assignment group is not equal to null or we add assignment group in the trigger rule it does not trigger paging if incident created with assignment group

Daniel Peel
Mega Sage

ShreeyaSatam

You'll get more traction on your questions, if you post new questions, but link to those items you viewed/tried.  Replies don't get the eyes of everyone looking like new posts do.

The way the system worked back then... you had to leave assignment group empty for the trigger rules to apply.  Trigger rules apply before business rules.  I built a custom process that checks for a matching trigger rule when an incident is created/updated and I manually start the On-call process based on those.  It looks like in Zurich, they are adding some new functions that should allow us to go back when OOB processes

https://www.servicenow.com/docs/bundle/zurich-xanadu-df3/page/release-notes/rn-combined/zurich-xanad...

https://www.servicenow.com/docs/bundle/zurich-it-service-management/page/administer/on-call-scheduli...

They have an new Run Trigger option that says when it should run, once or every time the trigger fields changes and matches.  

When to activate
Run TriggerFrequency at which the trigger rule is run. Available values:
  • Run once: Trigger rule is run only once.
  • Every time trigger field changes: Trigger rule is run every time the value of the Trigger fields field is changed.

Thank you Daniel for advice, I will create new post for this to track. 

I thought i will get quicker response, if I reply on same tread.