How to do the flow continue until the end of the intent?

166 views
Skip to first unread message

PEDRO ALBERTO ZEPEDA HERNANDEZ

unread,
May 25, 2022, 11:10:03 AM5/25/22
to Dialogflow CX Edition users
I have the problem that if I send a response and instantly send another one in the same intent, the intent and the next one are fired. How can I fix this and have the first intent kill and then fire the next one?
Captura de pantalla 2022-05-24 120230.png

Ed Elrod

unread,
May 26, 2022, 11:00:26 AM5/26/22
to Dialogflow CX Edition users
Good morning,

I wonder if you're asking for a technical fix when a user-interface change would be simpler, more discoverable, and more reliable?

It looks like you're executing data collection as a series of questions and answers expressed as single digits.  You've illustrated a chat bot, but it's a commonly used technique in touch tone (DTMF) telephone Interactive Voice Response (IVR) applications. By hitting 2 then 3 in quick succession, you've simulated key-ahead where the user / caller anticipates a question and can save time by answering quickly and cutting off the prompt before it's spoken. 

It looks like your chat bot has accepted "3" as the response to question 2.  I'll argue that's the expected and correct behavior in this case, whether it's DTMF or a typed digit.

If your intention is to treat a second (or third? or forth?) response that quickly follows a previous response as a correction rather than as a key-ahead, well, I suppose it can be done, but that will be unusual user behavior and you might want  to consider an alternative approach to confirming user-entered data. But, first, how might we handle the quick response as correction scenario? A few approaches spring to mind:
  • CX offers "Parameter advanced speech settings" that include "Endpointing timeout duration" (in seconds).  In a telephone situation, you could collect digits until the caller stopped for a few seconds and then use the final digit.  But, that (probably?) doesn't apply to chat bots. It would also slow down callers by forcing all of them to wait through the endpoint timeout before they proceeded to the next question.
  • Or for a channel-agnostic approach, I suppose some elaborate scheme to track the timing of each response and disregard the first when a pair (or more) of response fall within a certain timing window, probably involving webhook calls.  I've written something like this as to de-bounce DTMF responses. It was more complicated and less successful than I hoped.  There will be latency issues that affect timing precision and my head hurts just thinking about it.
  • Ask the user to confirm each answer along the way.  This is a time-consuming and tedious.  Please don't.
    • 2
    •      "If you meant to answer 2, press 1. If not, press 2."
    • 2
    • I mean, really, yuck.
Much simpler and more discoverable would be to start with something like.
  • "To help us get to know you, please answer three short questions. Don't worry, you'll have a chance to review and change your answers."
And after the question and answer series:
  • "Thanks. You've answered x, y, and z. To change your answers, enter 1. To continue, 2."
If that helps, enter 1. If not, 2.  :-)
Reply all
Reply to author
Forward
0 new messages