"Wait for user Input" with time conditional
# 👀feature-requests
c
My suggestion is to add a "timeout" option to the "Wait for User Input" card, allowing users to set a time limit and execute specific code when that time expires. This would help create more dynamic and flexible conversation flows, especially in integrations with platforms like WhatsApp, where user response times can vary. Currently we have to define a very rigid flow to follow the flow, but with this new card, we could wait X seconds and capture more than one message from the user to then follow the flow... Many times, especially on WhatsApp, the customer does not formulate a response with a single message... And this is currently being a big step in my use case... Here is an example: If I put 5 of these cards with a time conditional of 5 seconds, I could capture up to 5 messages from the user in sequence or wait 25 seconds to follow the flow... Which would be wonderful!
b
Just use the isIncomingQueueEmpty
It will check if there are new messages that need processing in the incoming queue, set a timeout of 15 min after the first response, and it will respond to all messages in the 15 minutes after the first is received.
just add the messages to an array
c
Maybe I did it wrong, but when I tested something like this, it didn't work... For example, using an 'after incoming message' hook to add the user's message to an array and then I put the 'wait for user input' card and then a delay with 'execute code', the problem is that when the user sends more than one message within this delay, it triggers X 'wait for user input' later on, for example, he sent 3 messages within a 15 second delay, when the delay ends, the flow is triggered 3x the next 'wait for user input', and then it goes through several messages at once, which is even worse for my case...
Unless there is some other method to execute delay other than 'execute code' and that actually captures all messages from a user within that time with the 'after incoming message' hook
b
It is the way to do it, take a look at this, it even has a video: https://github.com/botpress/v12/issues/741
the pull request is merged, so the method is added to the api
this should exactly be what you are looking for
f
Hi everyone! Im a little lost here @bored-train-93689 . Is there a way to use the incomingqueue on botpress cloud? The rapid messages is a pain and confuses customers and bots... really looking forward to solve it
4 Views