Limit selection to webhook-returned values

202 views
Skip to first unread message

Sam Rastin

unread,
Apr 12, 2021, 3:59:14 PM4/12/21
to Dialogflow CX Edition users
I'm designing a proof of concept using the Dialogflow CX UI. In one of my fulfillments, a webhook call fetches a list of names. The user is given the option to pick one of those names however since the list is dynamic I'm not sure how to limit the user to pick one of the returned names.

I can't create an entity type ahead of time and train the model to restrict the user's choice. What options do I have in making sure the user can only pick one of the names returned by the webhook call?

Jessica Carolina Rodriguez

unread,
Apr 15, 2021, 10:48:33 AM4/15/21
to Dialogflow CX Edition users

You might consider using a custom payload depending on the Integration you’re using. For text input, you can use a suggestion chips response type with the list of “names” of clickable suggestion chips. 

Note that if you are using a custom integration, you would have to implement it on your own.

Here’s a sample I have tested using the available text-based integration which is Dialogflow CX Messenger.

In your webhook response, you can return a custom payload and follow the format of the custom payload in the suggestion chip response type for Dialogflow CX Messenger.

See screenshot below of the test I made in Dialogflow CX Messenger:

Options.png


When you select “Jess” from the option, it will give the following response:

Output.png

Note that the suggestion chips or any rich responses will not show in the Dialogflow Console’s Simulator, instead you can only see the JSON response when you expand the custom payload tag in the Agent’s response. See below for reference:

Dialogflow CX Simulator.png

Allen Firstenberg

unread,
Apr 15, 2021, 11:50:13 AM4/15/21
to Sam Rastin, Dialogflow CX Edition users
It sounds like you want Session Entities. This lets you create an Entity Type that you use in your model, but in your webhook you can update the possible values for this just for this user session.

So in this case you might have a "Names" type which your webhook would add the appropriate names to.

On Mon, Apr 12, 2021 at 3:59 PM Sam Rastin <sra...@gmail.com> wrote:
I'm designing a proof of concept using the Dialogflow CX UI. In one of my fulfillments, a webhook call fetches a list of names. The user is given the option to pick one of those names however since the list is dynamic I'm not sure how to limit the user to pick one of the returned names.

I can't create an entity type ahead of time and train the model to restrict the user's choice. What options do I have in making sure the user can only pick one of the names returned by the webhook call?

--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Dialogflow CX Edition Discussion Google Group (dialogflow-cx...@googlegroups.com) to participate in discussions with other members of the Dialogflow community and the Dialogflow Team.
---
You received this message because you are subscribed to the Google Groups "Dialogflow CX Edition users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dialogflow-cx-editi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dialogflow-cx-edition-users/cf1cadf2-52e3-4596-91f0-66ed263160bcn%40googlegroups.com.

Sam Rastin

unread,
Apr 15, 2021, 3:40:18 PM4/15/21
to Dialogflow CX Edition users
Greatly appreciate both recommendations. Thank you.
Reply all
Reply to author
Forward
0 new messages