02-22-2019 01:56 PM
Working to write a script and i am trying to use the IF node to check content of a variable but not sure how to use the expression contains. So for example i am trying to check "If Call.PeripheralVariable1 contains busy".
Any assistance is greatly appreciated.
Solved! Go to Solution.
02-22-2019 02:23 PM - edited 02-22-2019 02:39 PM
you can use ICM built in function called "find". Lets say you got this string in PV1 - "ICMCanDoIt"
If you need to find whether "Do" is present in the string or not - use IF node with below expression
find("Do",Call.PeripheralVariable1)
02-22-2019 02:08 PM
Use a IF node and expression like this
Call.PeripheralVariable1=="Test"
02-22-2019 02:13 PM
Thanks for the response Piyush. I'm unable to use == because the content contains like a full sentence but only want to check to see if "Busy" is amongst the word so i can use that to determine what is being sent.
My case is not necessarily for a call flow, its more for Email flow because based on the content, i would be setting the skills and routing it out from there.
02-22-2019 02:23 PM - edited 02-22-2019 02:39 PM
you can use ICM built in function called "find". Lets say you got this string in PV1 - "ICMCanDoIt"
If you need to find whether "Do" is present in the string or not - use IF node with below expression
find("Do",Call.PeripheralVariable1)
02-22-2019 02:32 PM
Actually try this in your IF node
find("Busy",Call.PeripheralVariable1)
02-22-2019 02:39 PM
Thanks Piyush. I tried using both methods you provided and the one that worked was the first
find(Call.PeripheralVariable2,0)=="Busy" in my case. I tried to use the other one but it didnt seem to match the Busy.
02-22-2019 02:54 PM
If "Busy" is present in your string (its case sensitive remember that) - the below expression will return true for sure
find("Busy",Call.PeripheralVariable1)
You can also use this find function to determine the position of that string and then you can use that position in the IF logic as well (such as below). So if my string is "IamBusyToday"
find("Busy",Call.PeripheralVariable1)==4
this will return true
02-22-2019 03:48 PM
Do you know anyone of them that are not case sensitive? the position of the function could vary depending on the Agents hence i dont want to leave that to the agent to determine how i route the activity.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide