Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Michael Simonetti
    Is there any way to get user typed data while we are using...
    Topic posted May 28, 2019 by Michael SimonettiGreen Ribbon: 100+ Points, tagged API, Bots, Conversational AI 
    67 Views, 3 Comments
    Title:
    Is there any way to get user typed data while we are using system.list
    Content:

    Hi

    We are trying to get user typed data on system.list 

    If user didn't choose from sytem.list instead They write text in it Can we able to get those data

    Thanks

    Comment

     

    • Rohit Dhamija

      Hi Michael,

      Users aren’t limited to the options displayed in the list. They can resolve the entity by entering a word that the entity recognizes, like a synonym. Please refer doc:

      https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/built-components-properties-transitions-and-usage.html#GUID-DC259F00-B1F8-44D1-BE91-FA963080B8B0

      Thanks,

      Rohit

    • Sharath Chandra Gavini

      Hi Michael,
      While using a list, you however will specify a variable to store the value for the user selection. The same variable stores the text if the user types something unless the variable is an ENTITY type. If the variable you are using is of an entity type, the bot engine tries to resolve the entity with what the user has typed.
      If you want to read the text from a custom component you can use the method conversation.text() to read what the user has typed.
      If this is not what you have asked for, please provide a few more details.

      Thanks,
      Sharath Gavini.

    • Frank Nimphius

      Hi,

       

      build the list as follows

       

       

       variableList:
          component: "System.List"
          properties: 
            prompt: "Choose an option to set variable value"
            options: 
            - label: "Label Value 1"
              value: "value1" 
            - label: "Label Value 2"
              value: "value2" 
            variable: greeting
          transitions:
           next: "next_state"
            actions:
              textReceived: "handleTextReceived"

           
        handleTextReceived:
          component: "System.Output"
          properties:
            text: "Text received ${system.message.messagePayload.text}"
          transitions:
            return: "done"

       

      When you run this and e.g. type "I like my car" then the handleTextReceived is called

       

      Frank