CCX Script to validate Customer id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 12:22 PM
Hi team,
A customer asked me to create a ccx script to contain an ID verification step. He didn't want a database query, just a document validator through a numerical verification algorithm.
Does anybody know something like that? An example how to start maybe.
- Labels:
-
Other Contact Center Topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 01:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 01:30 PM - edited 06-30-2022 02:09 PM
Could you help with this step:
Using regex :
Step1: [0-9]{3}\.?[0-9]{3}\.?[0-9]{3}\-?[0-9]{2}
or
Step2: ^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$
or
Step3: via Javascript:
function validaCPF(cpf) { var Soma = 0 var Resto var strCPF = String(cpf).replace(/[^\d]/g, '') if (strCPF.length !== 11) return false if ([ '00000000000', '11111111111', '22222222222', '33333333333', '44444444444', '55555555555', '66666666666', '77777777777', '88888888888', '99999999999', ].indexOf(strCPF) !== -1) return false for (i=1; i<=9; i++) Soma = Soma + parseInt(strCPF.substring(i-1, i)) * (11 - i); Resto = (Soma * 10) % 11 if ((Resto == 10) || (Resto == 11)) Resto = 0 if (Resto != parseInt(strCPF.substring(9, 10)) ) return false Soma = 0 for (i = 1; i <= 10; i++) Soma = Soma + parseInt(strCPF.substring(i-1, i)) * (12 - i) Resto = (Soma * 10) % 11 if ((Resto == 10) || (Resto == 11)) Resto = 0 if (Resto != parseInt(strCPF.substring(10, 11) ) ) return false return true }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2022 05:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2022 06:38 PM
Hello David,
Can you show how i can do this?
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 01:14 PM
There are a lot of links out there on how to do this, here's one that could help. https://community.cisco.com/t5/contact-center/uccx-12-0-zip-code-xml-file-lookup/td-p/3937509
david
