Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  How to store user input from "Wait for Input" action in Architect?

    Posted 10 hours ago

    Hi everyone,

    I have a question regarding the "Wait for Input" action in Architect.

    I would like to store the exact user input provided during the "Wait for Input" block into a variable, so I can use it later in the flow or send it to an external integration/API.

    What is the best way to capture and persist the user response from this action?
    Is there a built-in variable for the input text/value, or do I need to configure something specific?

    Thanks in advance!


    #Architect

    ------------------------------
    Giovanna Rebizzi
    Desenvolvedora
    ------------------------------


  • 2.  RE: How to store user input from "Wait for Input" action in Architect?

    Posted 9 hours ago

    Hi Giovanna,

    You are right to question it. The Wait for Input action does not expose a generic "raw input variable" in the same way many people expect.

    In Digital Bot Flows, the most reliable/native way to capture and persist user input is usually through:

    • Ask for Intent
    • Ask for Slot
    • or custom slot configuration

    Those actions were designed to store customer responses into variables/entities that can later be reused in:

    • Data Actions
    • participant data
    • API calls
    • flow logic

    Wait for Input is more focused on waiting for a customer interaction/event and routing the flow behavior, especially in custom knowledge handling scenarios.

    One important detail from the documentation:
    when using custom knowledge handling, Wait for Input can store matched knowledge search results into a variable like:

    Flow.searchResults

    But this is the knowledge match collection, not necessarily the literal raw text the customer typed.

    So if your goal is:
    "capture exactly what the customer entered and reuse it later"

    then using an Ask for Slot or Ask for Intent approach is usually the better design pattern instead of relying only on Wait for Input.



    ------------------------------
    Gabriel Garcia
    NA
    ------------------------------



  • 3.  RE: How to store user input from "Wait for Input" action in Architect?

    Posted 9 hours ago

    Perfeito, entendi o ponto.

    O meu cenário é um pouco diferente porque eu realmente preciso utilizar o bloco "Wait for Input" no fluxo.

    A ideia é:

    • o cliente envia a primeira mensagem;

    • o "Wait for Input" captura essa interação inicial;

    • dependendo do conteúdo enviado, eu direciono o fluxo.

    Se a intenção encontrada estiver relacionada à base de conhecimento, então eu aciono a Knowledge Base dentro do próprio fluxo.
    Caso contrário, sigo outro caminho no fluxo com base exatamente no input inicial enviado pelo cliente.

    Por isso minha dúvida era justamente sobre conseguir persistir/reutilizar o texto digitado no "Wait for Input", já que preciso utilizar esse mesmo input posteriormente na lógica do fluxo.

    No meu caso, eu não consigo substituir totalmente por "Ask for Intent" ou "Ask for Slot", porque o "Wait for Input" faz parte da estratégia de roteamento inicial do atendimento.



    ------------------------------
    Giovanna Rebizzi
    Desenvolvedora
    ------------------------------



  • 4.  RE: How to store user input from "Wait for Input" action in Architect?

    Posted 8 hours ago
    Edited by Elisson Fernandes 8 hours ago

    Oi @Giovanna Rebizzi,
    Acho que o que você pode está procurando é a variável Session.LastCollectionUtterance. Depois que o fluxo seguir a intenção, você poderia utilizar ela para recuperar o valor digitado pelo cliente.



    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 5.  RE: How to store user input from "Wait for Input" action in Architect?

    Posted 7 hours ago

    Good catch @Elisson Fernandes - I think Session.LastCollectionUtterance is probably the closest thing to what Giovanna is trying to achieve here.

    Giovanna, based on your routing strategy, I would test something like this flow behavior:

    • customer sends the first message
    • Wait for Input handles the initial interaction/routing decision
    • after the routing decision, use Session.LastCollectionUtterance
    • persist the value into a flow variable/participant data
    • then continue the orchestration logic

    This is likely a cleaner approach than trying to force Flow.searchResults to act as the customer raw input source, because as Phaneendra mentioned, that variable is really focused on knowledge match results rather than the original utterance itself.

    One important point though:
    Session.LastCollectionUtterance may not always behave exactly as a true immutable "raw payload" depending on the collection/context behavior, so I would still validate carefully in scenarios like:

    • multiple retries
    • no-match flows
    • knowledge disambiguation
    • intent switching
    • multilingual normalization

    But for your use case, this is probably the most native/reliable approach currently available inside Architect without needing external APIs or middleware.



    ------------------------------
    Gabriel Garcia
    NA
    ------------------------------



  • 6.  RE: How to store user input from "Wait for Input" action in Architect?

    Posted 8 hours ago

    Hi Giovanna,

    That aligns with what I've seen as well.

    I'm currently working on a custom knowledge bot, where we use Flow.searchResults to retrieve matching articles based on the customer query and then loop through them to present results.

    In that context, it's clear that Flow.searchResults represents the knowledge matches, rather than the exact raw input from the user.

    So using Ask for Slot/Intent for capturing and persisting user input makes more sense depending on the use case.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------