Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Capture Credit Card numbers in Script

    Posted 01-19-2017 06:22
    No replies, thread closed.

    The variable input only allows alphanumeric, alphabetic with spaces, alphabetic with underscores. Is there a variable function that I can use to capture credit card numbers with a hyphen? eg xxxx-xxxx-xxxx-xxxx

    At present we instruct agents to enter with the hyphen or a space between the 4th digit

     



  • 2.  RE: Capture Credit Card numbers in Script

    Posted 01-19-2017 16:15
    No replies, thread closed.

    Hello Darryn,

     

    If I understand your question correctly, you want agents to be able to enter a credit card number without typing the hyphens themselves, and then have the system automatically insert the hyphens. For example, you want the agent to be able to type "1111222233334444" and then have the system transform that to "1111-2222-3333-4444."

     

    To do that, you need to make the original variable for the credit card number a dynamic variable (https://help.mypurecloud.com/articles/dynamic-variables/) and the Scripter.Set Variable action (https://help.mypurecloud.com/articles/available-actions/). 

     

    In the Scripter.Set Variable action, you could use something like 

     

    substr({{Credit Card Number}}, 0, 4) + "-" + substr({{Credit Card Number}}, 4, 4) + "-" + substr({{Credit Card Number}}, 8, 4) + "-" + substr({{Credit Card Number}}, 12, 4) 

     

    to modify the original variable to add hyphens every four digits.

     

    Is that what you were trying to accomplish? Let us know if you're trying to do something different and I can try to clarify.



  • 3.  RE: Capture Credit Card numbers in Script

    Posted 03-04-2017 22:48
    No replies, thread closed.

    Thats perfect, thanks very much