1

Currently I'm creating an Action for the Google Assistant. In this Action, I ask the user to provide its phone number. After this, another intent will repeat the phone number given, and asks if it's correct. If the user responds with 'no', I would like to redirect the user back to the first intent, so it can provide its phone number again. It should be a kind of loop.

(I'm working in a local environment, so only the intents are created within Dialogflow.)

I tried to apply contexts for this case, but in someway it won't succeed.

Thank you guys!

DylanM
  • 55
  • 3

1 Answers1

0

Remember that Intents represent what the user has said, and not what you are doing with that data. So saying that "another intent will repeat the phone number" suggests that you're making some things more complicated.

A better design is likely to have the Intent that collected the data to several things:

  • Repeat the phone number back
  • Prompt if this is correct
  • Set a content indicating you have prompted for confirmation

You can then have another Intent handle the "yes" or "no" statements responding to this prompt. The user may say other things, remember, including giving a correction to the phone number.

See also these articles (based on a StackOverflow question and answer) on designing a conversation and the Dialogflow Intents based on that conversation:

Prisoner
  • 49,922
  • 7
  • 53
  • 105