conscious-sapphire
conscious-sapphire17mo ago

Answering multiple text blocks instead of just one

I am trying to make the chatbot wait for the user to enter multiple blocks of text as answer all of it as one information, instead of just capturing the first text the user send it. - Example of normal voice flow: - 1.Chatbot question: "What do you want to know?" - 2. user has to give an answer in a block of text: "I would like to know where the company is located?" - 3. chatbot answer: "The company is located in New York." - Example of the current state: - 1. chatbot question: "What would you like to know?" - 2. User response in separate blocks of text: "I would like to know", "Where is the company located?" - The chatbot response only considers the first text block "I would like to know" and resets the chat when the user sends the second half "where is the company located?" --- - Example of what I am trying to achieve: - 1.Chatbot question: "What would you like to know?" - 2. user response in separate blocks of text: "I would like to know", "Where is the company located?" - 3. chatbot waits for user to finish answering and considers both separeted blocks of text as one user answer, and them give the it's answer: "The company is located in New York." Have anyone achive doing that with tools inside/outside of Voiceflow or with a custom code? I upload images (from whatsapp) just for you to visualize what I mean by one text block and multiple text blocks.
No description
No description
9 Replies
Tico | Voiceflow Assistant
To achieve the desired functionality where the chatbot waits for the user to finish answering in multiple blocks of text and considers them as one user answer, you can use the Capture step in Voiceflow. The Capture step is used to record user input that does not directly influence the conversational flow or map to a user’s intention. They record information that is relevant to the conversation and store it in an entity that can be later used for data processing. Here's how you can set it up: 1. Add a Capture step after your chatbot's question. This will allow the chatbot to capture the user's first response. 2. Create a variable (for example, userResponse) to store the user's input. 3. Add another Capture step to capture the second block of text from the user. 4. Append the second response to the userResponse variable. This will combine both responses into one variable. 5. Now, you can use the userResponse variable in your chatbot's response. The chatbot will consider both blocks of text as one user answer. Please note that this method assumes that the user will always provide their answer in two blocks of text. If the user's response can vary in the number of text blocks, you might need to implement additional logic to handle those scenarios. Remember, the Capture step is a powerful tool in Voiceflow that allows you to capture and manipulate user input to create dynamic and interactive conversations.
compatible-crimson
compatible-crimson17mo ago
As of right now, how Voiceflow works is once a message comes in, it will end an HTTP request to the interact endpoint, process it, and continue in the flow to the next part. So there is no way directly to have it accept 2 messages. Though since your using WhatsApp there might be a way to do it, but there is a trade off.. You can accept the message, wait 10sec to see if another message comes in, then put them together in to 1 string and query the Dialog API using both of those messages as 1 string
provincial-silver
provincial-silver16mo ago
@MikeG So basically there is no easy way to do it for WebChat? I noticed that sometimes most of our clients answer with "ok" and then type the answer. This confuses the bot a little bit. Sometimes they type multiple pieces of the answer in different text blocks. It is not possible to have the bot waiting and understanding the whole response then?
compatible-crimson
compatible-crimson16mo ago
Though possible, it's technically challenging and will require coding knowledge. Also, it will slow down the responses from your chatbot for every user because it will now need to wait and listen for more messages
flat-fuchsia
flat-fuchsia16mo ago
@MikeG You got me thinking... :thinkingemoji: I guess the only missing question on my mind is how to run an intent inference based on a variable, and not in an user-input. I see the API but only for NLU... @NiKo | Voiceflow, ideas?
compatible-crimson
compatible-crimson16mo ago
What do you mean?
provincial-silver
provincial-silver16mo ago
@MikeG We created a component that can identify multiple text blocks and save them in a variable. The question is how can we then use an intent inference with that variable? We couldn't find any pre-defined blocks that can run the variable connected to the intents (similar to the capture user reply)
compatible-crimson
compatible-crimson16mo ago
What do you mean exactly?
W. Williams (SFT)
So, you need to understand how VF works. When a user submits a question, that message is sent and processed immediately. Now, you could create some kind of listen on your end before you send the message to VF. This would be the only way to do this.

Did you find this page helpful?