Hi,
I need a bit of guidance on a issue I try to solve.
The situation is as follows.
We have intregrated our NMS with the Alert module of Freshservice. If a device raises an alert, a webhook is triggered to FS and a alert is created, followed by a ticket. The subject of the ticket contains the device name and type of alert.For example “ABC-NL-Amsterdam01 - Link down”. The first part of the device name includes a three letter company reference. The company refenrence can differ as we support multiple companies. Because we use a single web hook in our NMS, we cannot set the company in the Alert rule.
I now try to solve this in the workflow with an event of "Ticket created" and the condition type "alert" but I'm a bit stuck how to build this workflow in the most effective way.
How can I use the information from the ticket subject to set the company.
The easiest solution but most ineffective way is to created multiple conditions in a row
- CONDITION ticket.subject contains ABC - ACTION set company Alphabet and send email to company with alert information ( If no match go to 2)
- CONDITION ticket.subject contains DAF - ACTION set company Car and send email to company with alert information ( If no match go to 3)
- CONDITION ticket.subject contains KLM - ACTION set company Airport and send email to company with alert information ( If no match go to 4)
This solution is not really scalable as with 10 companies, I have to create 10 conditions and 10 actions and maintain 10 email templates.
Is there a way to leverage the conditional expressions to have only 1 CONDITION and 1 ACTION module. The logic I have in mind for the condition is
if regexmatch {{subject}} contains ABC, true = Alphabet
if regexmatch {{subject}} contains DAF, true = Car
if regexmatch {{subject}} contains KLM, true = Airport
Not sure if this is even possible or that there are other options to get to the same solution.
Hope someone can help me with this.
Best answer by RichardR
View original