cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
783
Views
0
Helpful
3
Replies

How to create UCCX script for calling number and space between them

Hi,

Good Day!

I've added a step to the script "Test_Contact_Centre.aef" which sets a variable Customer_Phone_Number to the Calling Number. I'd like to modify the script so that it removes the leading 0 and adds spaces to this Customer_Phone_Number. e.g. change 00448448504 to 0448 448 504 e.g. change 00297013249 to 02 9701 3249 This new format will then be sent to our CRM system via a HTTP Action to popup the customers details. Are you able to assist with modifying the phone number variable?

Regards

Shaheen P H

3 Replies 3

Bill Mungaven
Level 1
Level 1

You have 2 different number formats: 4 digits space 3 digits space 3 digits and 2 digits space 4 digits space 4 digits both numbers being 10 digits after stripping the leading 0.

What determines in which format the final numbers need to be? Is it the beginning digits that determines the format, i.e. 0448 uses 4 space 3 space 3 and 02 uses 2 space 4 space 4?

Bill

Thank you bill for your response. Let me check with the script..

Regards

Shaheen P H

Bill Mungaven
Level 1
Level 1

I answered a similar question in this post:

https://supportforums.cisco.com/discussion/13205741/modifying-calling-number-send-cad-be-http-action

You can use the .substring() method to parse your digit string and insert the spaces where you want similar to what Robert needed to do in the above link. It looks like Robert needed his numbers in a similar 4 digits space 3 digits space 3 digits format. The line won't work for your numbers beginning 02 since it looks like you need those numbers in a different format but the concept is the same.

Bill