SLA based on State
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2020 09:57 PM
I am working on SLAs based on State in the incident table. Please help me out with this.
Note: Am completely new to SLAs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 08:06 PM
Any updates on this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 09:24 PM
Hey Deepika,
Sorry for taking so long. Actually i was trying to read about the SLA Breakdown application. But yes you can add fields in SLA Breakdown definitions by navigating to:
sys_db_object>SLA Breakdown by Assignment. Here you can add columns to table and then you will be able to see the your Custom fields in SLA Breakdown definitions. But you need to inactivate the OOB SLA in SLA definition which is (Incident SLA by Assignment) Now you need to create a new SLA Breakdown definition and add your custom fields in SLA Breakdown Fields.
The only problem with this approach is that it may not function well because we are changing some OOB functionalities and for that we need to Configure the whole SLA breakdown definition Application. Which you can find in Applications. There is a whole SLA Breakdown application there. So actually i don't think modifying an application is a good practice.
But if i was able to help you in anyway then please mark my comment Helpful or i was able to solve your query then mark Correct.
Thanks:
Utpal Dutta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 08:36 PM
Thank you Utpal. I found a way to do it. I added another field i.e State in sla_breakdown_by_assignment table with data type as Choice.
Next, inorder to get the fields of the table, I removed the attributes of breakdown_field_name and source_field_name in the Breakdown definitions->SLA breakdown definition field. This showed me all the fields available in the sla_breakdown_by_assignment table.
Next, after adding State in the breakdown definition field, I was able to see the breakdowns based on state + assigned to + assignment group. But the only drawback was, the state field in task sla was taking the value of the state instead of the names.
Is there a way to get the names of the states?
Note: u_state in sla_breakdown_by_assignment table has data type choice, with no choices.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 01:28 PM
Thank you for posting your findings Deepika!
To attempt to answer your question:
The task table's State field is an integer field with 160 choices defined.
Those 160 choices have a table (ex: incident) and value (ex: 1) defined for them, which in-turn dictates which display value to show when you view the field. That's why we see "New", "In Progress", etc. The field value is actually an integer that has been given a display value via the matching defined choice.
Some Suggestions
1. I made the new State field an integer instead, and skipped defining choices as:
a. the condition builder doesn't allow you to choose a value when building a condition on a choice field that has no choices defined, and
b. I don't think we can imitate the table-specific choices since we'd be viewing all values from the same table. (sla_breakdown_by_assignment)
2. Instead of altering the existing field's attributes, you could run a script like this to conform an existing SLA Breakdown Definition to capture the given state field into our new State field. This way we don't edit any OOTB fields, we just create a new one and convince ServiceNow to honor it via the script. 😉
var myBd = new GlideRecord('sla_breakdown_definition_field');
myBd.addQuery('sla_breakdown_definition', '=', [yourSysID]); //Update accordingly
myBd.query();
while (myBd.next()) {
if (myBd.breakdown_field_name == [currentValue]) { // //Update accordingly
myBd.setValue('breakdown_field_name', 'u_state');
myBd.setValue('source_field_name', 'state');
myBd.update();
}
}
I used this to change an assigned_to field definition over to our new State field. 😉
Kind Regards,
Joseph