01-25-2017 06:14 PM - edited 03-15-2019 06:26 AM
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
01-26-2017 07:42 AM
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
01-26-2017 05:55 PM
Thank you bill for your response. Let me check with the script..
Regards
Shaheen P H
01-26-2017 10:49 AM
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
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