07-31-2013 10:12 AM - edited 03-14-2019 12:09 PM
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!
07-31-2013 10:25 AM
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
07-31-2013 11:08 AM
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
07-31-2013 11:11 AM
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
07-31-2013 11:37 AM
Make sure you enclose the 311 in quotes! Same reason as putting it in quotes in that "right()" formula.
-Jameson
07-31-2013 11:40 AM
Thanks Jameson, I tried that and am receiving Misplaced symbol error.
right(Call.DialedNumberString,3) = "311"
07-31-2013 11:42 AM
Remove the spaces around the equals sign. It should read:
right(Call.DialedNumberString,3)="311"
-Jameson
07-31-2013 11:47 AM
Got it Thank you!
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