cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1776
Views
5
Helpful
7
Replies

UCCE/PCCE Script

Ahmed Adeyemi
Level 4
Level 4

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.

1 Accepted Solution

Accepted Solutions

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)

 

View solution in original post

7 Replies 7

Piyush Verma
Level 4
Level 4

Use a IF node and expression like this 

Call.PeripheralVariable1=="Test"

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.

 

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)

 


Actually try this in your IF node

 

find("Busy",Call.PeripheralVariable1)

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.

 

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

 

 

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.