How to add exclude condition on Business Rule

JC S_
Mega Guru

We are trying to implement a business rule on incident tickets but would like to add exclusions.

Example:

Set 1:

  • Caller VIP field is checked
  • Impact is Low
  • Urgency is Low

Set 2:

  • Caller VIP field is checked
  • Category is XYZ
  • Subcategory is ABCD

So the business rule should go like this:

  • Apply rule ONLY IF it does not match Set 1 or Set 2

We need help on how to achieve this on the Advanced tab.

UPDATE: We are receiving a lot of help on setting this up using the declarative setup on When to run tab (thanks for the effort to help but we already did this approach). Our action was to set the Urgency and Impact to both 2. Now, when we set on incident that Impact and Urgency is both 4 while the category/subcategory is not what was defined on the second set of conditions, the business rule is applied - this is because it satisfied the Category/Subcategory is not condition on the second set.

This is why we need to implement this via scripting and that is where we need help.

11 REPLIES 11

Hello Jimboy,



As per my understanding, you can add the condition in when to Run like 1)   Caller VIP field is checked and click on Add filter condition at the top and add the remaining four condition.Something as below



find_real_file.png


Hi Vinoth,



That set of conditions will not achieve what we are trying to do here, it will actually be quite the opposite since the rule will only run when ALL of those conditions you shown are satisfied. What we want is just like below:



Set 1:


  • Caller VIP field is checked
  • Impact is Low
  • Urgency is Low

Set 2:


  • Caller VIP field is checked
  • Category is XYZ
  • Subcategory is ABCD

So the business rule should go like this:


  • Apply rule ONLY IF it does not match Set 1 or Set 2

Hello Jimboy,



That is quite simple if my understanding is correct, simply give the condition in the reverse like if the caller VIP is false and category , subcategory, etc is not equals to the value mentioned above.


Hi Vinoth,



We understand what you are proposing, but the tricky part of our requirement is we need to satisfy all the conditions of a set not just all of them. This is not achievable using the parameters on the When to run tab. To give you an idea, we already tried the following setup on When to run tab:



Set 1:


  • Caller.VIP is false
  • Impact is not Low
  • Urgency is not Low


OR



Set 2:


  • Caller.VIP is false
  • Category is not XYZ
  • Subcategory is not ABCD


RESULT:


  • On incident form, Caller.VIP is false, then we set Impact and Urgency to both Low then save, the business rule will still apply because the category/subcategory is not XYZ/ABCD respectively.
  • On incident form, Caller.VIP is false, then we set Category to XYZ and Subcategory to ABCD, the business rule will still apply because Impact/Urgency is not both Low.


That's why we need to develop a script that will check each set and if it matches any of the set, then the business rule should not be applied, else it will apply.


You can use the BIG OR mate



find_real_file.png


-Anurag