Help with setting up a Business Rule

Feasood
Tera Guru

We have an API that logs Incident tickets when certain threat emails are detected and I need help to setup a Business Rule to be able to differentiate between the two types and then assign the ticket to a Service Offering.

 

There are two Service Offerings called 'Malware' and Phishing and Spam'.

I have a list of the names of the types of Phishing emails and thought to setup a Business Rules that checks if the name contains any of the names, then the action would be to set the Service Offering to 'Phishing and Spam'.  The issue I am facing is how to then say if the name doesn't contain any of the names, to set the Service Offering to 'Malware'.

 

I would assume you could use a script but as I am new to scripting, I'm not 100% sure on how to do this.

 

Is someone able to advise me on how I can go about doing this please.

I have attached a copy of the 'When to run' part of my BR.

 

Many Thanks

Mike

1 ACCEPTED SOLUTION

DanielCordick
Mega Patron
Mega Patron

You don’t need to script this at all. You can create this in flow designer. Flow designer has come along way and can easily replace allot of BRs out there

 

chuck does a great video on inbound emails and flows https://youtu.be/KZpZDqbRKU4?si=eqy50VscYLoeoAp4

 

This should help get you started with flow designer: https://youtu.be/3qohu-Lbusw?si=KNOfeOQvq667LI1i

View solution in original post

In this ServiceNow Tutorial, Jamie Blair gives an introduction to Flow Designer in ServiceNow. Flow Designer is a Now Platform® feature for automating processes in a single design environment. Flow Designer lets process owners use natural language to automate approvals, tasks, notifications, and ...
In this video, you'll learn how to process an inbound email with Flow Designer and update an existing record. Flow Designer: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/concept/flow-designer.html Flow Trigger Types: ...
8 REPLIES 8

Hi Brad,  yes this field was added in as part of the plugin.

We are using the Trend Micro Vision One connector plugin.

Yes there is a choice of 'is one of' and it just has a text box.  I guess you could list them all separated with a comma?  

Feasood_0-1701295634830.png

 

Sandeep Rajput
Tera Patron
Tera Patron

@Feasood You can try using the following script in your business rule.

 

if(current.short_description.toLowerCase().indexOf('malware')){
    current.service_offering = <sys_id_of_malware_service_offering>;
}
else{
        current.service_offering = <sys_id_of_phishing_and_spam_service_offering>;
}

Hope this helps.

Tony Chatfield1
Kilo Patron

Hi, unfortunately a screenshot of your BR conditions does not help the community understand your BR's configuration or your inbound payloads details. I would start by adding some debugging\logging to your BR so that you can see if it is triggered. If the BR is not triggered then also log the content of your field 'Workbench name' via a BR with no conditions, so that you can see exactly what you are receiving.

If you have numerous 'text' conditions to validate, it may be easier to trigger your BR based on some single constant\unique value in your record, and then use javascript to manage\validate\update individual fields as required using methods like switch and indexOf

DanielCordick
Mega Patron
Mega Patron

You don’t need to script this at all. You can create this in flow designer. Flow designer has come along way and can easily replace allot of BRs out there

 

chuck does a great video on inbound emails and flows https://youtu.be/KZpZDqbRKU4?si=eqy50VscYLoeoAp4

 

This should help get you started with flow designer: https://youtu.be/3qohu-Lbusw?si=KNOfeOQvq667LI1i

In this ServiceNow Tutorial, Jamie Blair gives an introduction to Flow Designer in ServiceNow. Flow Designer is a Now Platform® feature for automating processes in a single design environment. Flow Designer lets process owners use natural language to automate approvals, tasks, notifications, and ...
In this video, you'll learn how to process an inbound email with Flow Designer and update an existing record. Flow Designer: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/concept/flow-designer.html Flow Trigger Types: ...