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

UCCE/PCCE Script

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
Enthusiast

Re: UCCE/PCCE Script

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)

 

7 REPLIES 7
Enthusiast

Re: UCCE/PCCE Script

Use a IF node and expression like this 

Call.PeripheralVariable1=="Test"

Participant

Re: UCCE/PCCE Script

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.

 

Enthusiast

Re: UCCE/PCCE Script

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)

 

Enthusiast

Re: UCCE/PCCE Script


Actually try this in your IF node

 

find("Busy",Call.PeripheralVariable1)

Participant

Re: UCCE/PCCE Script

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.

 

Highlighted
Enthusiast

Re: UCCE/PCCE Script

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

 

 

Participant

Re: UCCE/PCCE Script

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.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards