Use this block to get user input into the bot. When this block is executed, it starts “listening” to user input and saves it to the specified user variable (attribute). By default, $_last_user_input variable is used.

To avoid situations when the user clicks “Send” (or “Enter”) before he/she completes the reply, there’s an option of “polite delay”. When you set this option to anything but zero, the bot keeps “listening” to the user during a specified time in seconds. If the user starts typing again during this delay, his/her next input will be appended to the input variable. Otherwise, the bot will trigger the next block in the flow.

Quick replies

“Quick replies”, or “chips” as Google calls it, are pre-defined answers that users can click to reply to the bot message. These replies can be connected with lines to other blocks, and if the user clicks one of the connected replies (or types exactly the same text), control will be given to the connected block. Otherwise, control will go to the default exit at the bottom of the LISTEN block.

In the example above there are three quick replies – “Morning”, “Afternoon” and “Evening”, each triggering TEXT block with specific text. If the user is typing anything else (for example, “12 pm”), the TEXT block below will be triggered, sending “OK, your choice is 12 pm” back to the user.

You can use variables as quick replies. This will render the actual variable value at run time as a quick reply.

IMPORTANT: LISTEN block should immediately follow TEXT or IMAGE blocks since quick replies have to be preceded by text or images. If you try to connect the LISTEN block to any other block (like SWITCH or DATA), Activechat will not allow you to do so.

For more info on quick replies and their usage, click here.

IMPORTANT: if you do not have any LISTEN block active during a conversation with your user (this can happen if all your skills have finished and the bot is just sitting there, not expecting any specific input from the user), the “default” system event will be triggered every time user is sending a message to the bot. It will start the “default” system skill that is listening to that event, and you'll be able to send it to the natural language processing engine through the NLP block or analyze for specific keywords if you prefer this approach.

Last updated