Skip to main content

I am looking to build an expression on the description to get a value in a particular place for the ticket if you look at screenshot below we are looking to get country value form the description and route the ticket based out of it 

 

 

 

 

and here is the description

 

I divided a similar use case into three expressions as this was hard to put together in one expression. 

  1.  Search for the place where “country” is within the description: E1, e.g. returning 10
    indexOf('{{ticket.description | sanitize_html | strip_html | escape }}','Country:', 0)
  2. Search for the place where “https” is (E2), e.g. returning 25
    indexOf('{{ticket.description | sanitize_html | strip_html | escape }}','https:', 0)
  3. Add or substract a few numbers to exactly get the start or end of this string. e.g. “Switzerland” is between position 10 and 25 ± a small amount.
    trim(substring('{{ticket.description | sanitize_html | strip_html | escape }}', {{E1.result}}+8, {{E2.result}}))

    Not sure about the exact numbers you have to add or substract as we had this with another use case/strings.


Looks like a alarm, do you have pro or higher ? 

You could use the alert module and e-mail into that. 


Reply