I would like to create a step in my script that collects the ANI, keeps the last 4 digits (everything else stripped), and adds a 3 at the start of the new string. I'm stuck on a part of this, however, wondering if someone has any idea.
1) My script has the Get Call Contact Info step and is programmed to insert the caller's ANI into a string called ANI.
2) How can I strip the digits in the second step to keep only the last 4 digits?
3) With this newly edited number, is adding a "3" at the start of the string as simple as creating a string value of 3""?
You could do it in a 'set' step:
In the first box, set the variable name : DNIS
In the second, : "3" + DNIS.substring(DNIS.length() - 4)
Place it where you need it to be converted. For example, right after the Get Call Contact Info step.
Yes, you are correct, substituting the variable name was the right move.