×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Get Digit - Number Transform

Answered Question
Nov 9th, 2011
User Badges:

I'm using UCCX 7.01 -


We are implementing a Pay By Phone solution.  When we ask the customer for their statement number the number must be sent to our webservice in the format of 3 integers.  So basically if a customer enters in "3" the system must be able to convert it to "003" also if the customer enters in "03" the system must convert it to "003."  If "13" is entered then it gets converted to "013" and so on....


We do have a consultant who is engineering the Pay by Phone solution but before the project kicks off we internally would like to ensure that UCCX can do the above.  Any ideas?


Thanks.

Correct Answer by Gergely Szabo about 5 years 9 months ago

Hi,

yes, you can do that - UCCX scripts can be enhanced with Java code so it's fairly simple to do such formatting as well.

You can do it either the poor man's way: first checking the length of the string entered by user and then pad it with zeros, or just use String.format (but this won't support non-numeric DTMF tones) or you can just import Apache Commons StringUtils and let it do the hard work.

G.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Gergely Szabo Wed, 11/09/2011 - 06:42
User Badges:
  • Green, 3000 points or more
  • Community Spotlight Award,

    Member's Choice, December 2015

Hi,

yes, you can do that - UCCX scripts can be enhanced with Java code so it's fairly simple to do such formatting as well.

You can do it either the poor man's way: first checking the length of the string entered by user and then pad it with zeros, or just use String.format (but this won't support non-numeric DTMF tones) or you can just import Apache Commons StringUtils and let it do the hard work.

G.

Actions

This Discussion