SLA is getting attached multiple times

anandcristyro5
Tera Contributor

Hi Team,

 

I am configuring an SLA for Problem Tasks based on priority and company differentiation. Here’s the intended setup:

• If the company is A and B a specific SLA should be attached.

• If the company is, C,E,F so on a another SLA should be applied.

 

Current SLA Configuration:

 

SLA 1:

• Start Condition:

• Active = true

• Type = Initial RCA

• problem.Company = A

• OR problem.Company = B

• Priority = 3

• Cancel Condition:

• Start condition not met

 

SLA 2:

• Start Condition:

• Active = true

• Type = Initial RCA

• problem.Company is NOT A OR problem.company is NOT B

• Priority = 3

• Cancel Condition:

• Start condition not met

 

Issue:

 

When I trigger a Problem Task with Priority 3, both SLAs are getting attached—even when the company is A or B. Ideally, SLA 2 should not be attached because it is explicitly set to exclude Company A and B.

 

I have tried giving the cancel condition manually, still this is not working. Earlier the priority was done dot waking fro problem table (same like company).. after changing the problem SLA then PTASK sla is getting changed. I thought this could be also an issue reason as sla getting attached before the priority changes.

 

SO without DOTWAKING I directly used PTASK priority, as given in the above conditions… but still the issue not able to resolve.

could someone assist here the trouble shooting steps?

 

Thanks.

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @anandcristyro5 

 

Technically, the condition looks okay. The only difference is the company. Could you please change the SLA2 company filter?

Option 1: Company is one of C/D/E
Option 2: Company is C, D, or E instead of "not operator."

Also, try to repair the SLA once again and see if there are any changes.

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Nishant8
Giga Sage

Hello @anandcristyro5, you seem to have problem with company condition in SLA2 ( problem.Company is NOT A OR problem.company is NOT B ).

Imagine if PRB record has Company=A, then its not B and second part of OR condition will make the whole condition true. 

AS Atul mentioned, you can mention each company's name, but if company list is lengthy, then can you change OR to AND and then try:

problem.Company is NOT A AND problem.company is NOT B

 

Regards,

Nishant

You're right—I’ve seen that this setup can be quite tricky for developers, especially when dealing with multiple values of the same field in a negative condition. A simple rule to follow is that anything requiring an "OR" in the Start Condition should be written as an "AND" in Pause/Stop/Cancel conditions when using negative clauses.

To build on your point, I’d recommend avoiding negative clauses like Company is not A and Company is not B. Instead, it's better to explicitly define the allowed values—Company is C or Company is D or Company is E. The only exception would be if there are a fixed, limited number of companies (e.g., five total), and that number will never change in your data.