Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

collecting 2 required fields when the user can send one, both, or invalid data (state machine approach)

  • 1.  collecting 2 required fields when the user can send one, both, or invalid data (state machine approach)

    Posted yesterday

    Hi everyone,
    In a Digital Bot Flow, I need to collect two required pieces of information from the customer (e.g., CPF and Date of Birth), but the customer may send:

    • Only the CPF

    • Only the date

    • Both in the same message

    • Or invalid data first and then correct it

    How would you implement a state-machine style logic to:

    1. Detect what has already been collected,

    2. Validate formats (CPF = 11 digits, DOB = dd/mm/yyyy),

    3. Ask only for what's missing,

    4. And once both are valid, call a Data Action?

    Any suggestions or examples of how you model this in the flow (variables/participant data, retries, etc.) would be appreciated.


    #Architect

    ------------------------------
    Alex Sander Felicio
    ------------------------------


  • 2.  RE: collecting 2 required fields when the user can send one, both, or invalid data (state machine approach)

    Posted yesterday

    Olá @Alex Sander Felicio!

    Várias maneiras...



    ------------------------------
    Fernando Sotto dos Santos
    Consultor Grupo Casas Bahia
    ------------------------------