Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Validate 8-digit Date of Birth slot length in Genesys Cloud Voice Bot

    Posted 12 hours ago

    We have a Genesys Cloud voice bot that asks the customer to provide their date of birth as 8 digits (for example, DDMMYYYY).

    Sometimes the customer does not say or enter all 8 digits. Is there a way to validate the slot/entity value so that the bot only accepts it when the length is exactly 8 digits?

    If the value contains fewer or more than 8 digits, we would like the bot to prompt the customer again.

    What is the recommended way to implement this in Genesys Cloud Bot Flow / Architect?

    Regards,

    Adnan


    #Architect

    ------------------------------
    Adnan Hassan
    Senior Solution Consultant
    ------------------------------


  • 2.  RE: Validate 8-digit Date of Birth slot length in Genesys Cloud Voice Bot

    Posted 4 hours ago
    Edited by Marcello Jabur 4 hours ago

    Hi Adnan,

    Sure, there should be at least 2 ways of doing this, probably more.

    For the slot that you are trying to collect, you can create it as a "Regular Expression" Type Slot, and just define a regular expression on it that validates 8 digits (For example: ^\d{8}$ ).

    If the information provided by the customer doesn't match the Regex, then it will be treated as "No Match" (which you can then set the Bot Flow to repeat X times on No Match, etc.)

    Also, another way of doing this, is using the "Custom Validation" property on the "Ask for Slot" component. In there you can set any expression to validate as a boolean (true or false), after the collection is done. So for instance, you could just use the "Length()" expression to check if your slot variable has 8 digits of length.



    ------------------------------
    Marcello Jabur
    ------------------------------