Sure, you could use RegEx to match email.body
if it finds that word, take action appropriately.
Personally, I like to do this in 2 steps. First, I attempt to extract the word/words. Then, I check to see if that extraction is empty. This lets me setup a faux-boolean I can act on.
For example, here I’m looking at the body and extracting the email and organization. While I put it in a global variable, you could use custom if in the same rule. For me, I’m extracting words after a pattern, whereas you would just be extracting the word “softphone” itself. Go crazy and look for multiple patterns such as ‘softphone’ ‘soft phone’ ‘mobile phone’ whatever.
Next, I look at that extraction I just made, and by checking if global.AlertDetails.email != null
I know whether or not I actually found something.
I “fake” the boolean by storing a string value of TRUE
, but I could put any value there as all i care about is is it empty or not, later on.
With those two steps, completed, I can now check global.HaveEmail != null
anytime I needed to know if I had email… In your case, you would check global.IsSoftPhone != null
or something similar.
You either put this at the top of your entire ‘create ticket’ workflow which creates the ticket and assigns the queue, or more appropriately, you would decouple the ticket creation from the queue assignment. The decoupling also works as just a secondary step to change whatever queue you assigned in the ticket creation.
First, you make the ticket. Then your next step is to Update the Ticket. Check to make sure you have a ticket and it’s a softphone with this rule in the *Only Perform this action if condition * custom.Ticket.id != null && global.IsSoftPhone != null
in that step, you retrieve the ticket from the last step and set the queue equal to the UC queue.