cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1916
Views
0
Helpful
7
Replies

ICM If node

candese.perez
Level 1
Level 1

Hello,

I am atteempting to write an ICM script that will route calls based on the incoming DN.

I have an If node using a formula to check the right most 3 digits of the string, if the 3 digits match a particular set then route the call to a particular skill group.

My issue is I am receiving an Undefined symbol error on the script editor. My formula is right (00200311, 3)

My intention is to route calls where the last 3 of the string equal 311 to a specific skill group. Have i misused the right formula?

Thanks!

7 Replies 7

Arpit Arora
Level 1
Level 1

Hi,

Try setting the peripheral variable using formula :

Set Varibale

Call.PeripheralVariable1=substr(Call.DialedNumberString,5,3)

and then use the IF node to match a particular set to route to a skillgroup.

Hope this will help you.

Regards,

Arpit

You're receiving the "Undefined symbol" error because 00200311 is not a string. The right(s, n) formula expects a string (s) and a number (n). You're giving it a number and a number. If you enclose the 00200311 in quotes, or reference a variable instead, it will work. Like so:

right(Call.DialedNumberString,3)

or...

right("00200311",3)

No need to go around setting variables here (unless you need to reuse the data somewhere else).

-Jameson

-Jameson

Thanks Arpit and James. 

Very helpful.

If I set the PV, then how do I call it in the If node to = a particular string?

I was thinking I would say If the CPV1 = 311 route appropriately, but again I am getting Undefined symbol 311.

Message was edited by: Candese Perez

Make sure you enclose the 311 in quotes! Same reason as putting it in quotes in that "right()" formula.

-Jameson

-Jameson

Thanks Jameson, I tried that and am receiving Misplaced symbol error.

right(Call.DialedNumberString,3) = "311"

Remove the spaces around the equals sign. It should read:

right(Call.DialedNumberString,3)="311"

-Jameson

-Jameson

Got it Thank you!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: