The team at PUggs is excited to simplify the development
of their conversational experience using Dialogflow CX.
Stick around to see it all in action.
♪ [music] ♪
Hi, I'm Priyanka Vergadia,
and in this episode of
we will help our friends at PUggs
create a conversational experience
for their customer support using Dialogflow CX.
Before we dive into the console, though,
let's lay out our use case requirements first.
We know that most of their user requests are to order dog shoes,
so it makes sense to start with the order flow first.
In this flow, we want to collect order information from the user,
including the size and the color of the shoes,
and then present a confirmation.
If the user confirms, we end the flow,
and if they want to edit the order,
then we gather the new size and color from them,
and then place the order.
Now that we know what we are building,
let's head to Dialogflow CX console.
The easiest way is to get there from the documentation.
Create a new project, make sure you enable
and the Dialogflow API.
Then we go back into the Dialogflow CX console
and click on the project we just created.
It prompts us to create an agent.
That's exactly what we want to do.
We name it, select the location where we want to deploy it,
and the timezone, and the language,
and we're good to create.
Now, notice that within a project,
we can create multiple agents.
We have our
which comes with the
So let's go ahead and test it.
At this point, all it does is greet the user.
We want to create a
that leads to the
Create new
Let's name it and add some training phrases.
Let's add some basic ones such as,
"I would like to place an order."
But we also need to add some specific phrases with
Let's add "I want to buy green shoes for my pup."
As soon as we add that, notice that the color parameter
automatically gets created with
And this color parameter will be stored in the session for us
to access in other pages.
Also, since the user has already provided the color,
our agent will not ask for that information,
providing a more natural experience.
Now, let's add another example with the size.
"Wanna get large shoes for my husky."
Now, we see that the
is not automatically identified as a parameter
because size is unique to PUggs use case.
So let's fix that.
But before we do that, add a
where we will collect information and save it.
Let's go into
Name it "size," and add
with some synonyms.
Now, while we are on the
let's go into the
to see if we can add our "size" parameter now.
Add one or two more examples with both
to add some variety.
Let's head over to our
and add the
to let the user know
that we will create some more information now.
Then add the
Size
and if the user does not provide it,
we want to prompt them with the
We repeat the same for
With that, we are ready to define
our
And in this case, we don't need to trigger an
All we need is to make sure our
So we look for the condition to match:
Once all the
which means both
that's when the
This is also where we can match other conditions,
such as if the
then send to a "sorry" page
because that color is not available in the inventory.
Once the
We would route the user to the new
In the
let's first add the
to share what they have selected to buy.
We can access the
We don't have any
For the
we want to have a "yes" and a "no" route.
For "yes" path, let's create a new
and call it "confirmation.yes,"
and provide a few
Save
Do the same thing for "no" route.
Success
All we need to do is add a nice
For the
to force and select
Now, the
We want to see if the user wants to change their selection,
or they just don't want to buy today.
For that, we add the
And then add a
If they say "no,"
we just want to add a
But if they say "yes,"
then we send them back to the start of the
to make their
Now, let's test it.
That doesn't quite work.
And that's because the
We need to clear out the
before the state changes to the
And we do that in the
in the
Let's test it again, and we see that the
Alright, so that was a lot.
We created the entire
by creating a bunch of pages.
We also learned how
in conjunction with the
I am very excited for the next episode
where we will extend the PUggs conversation experience further
by adding multiple
Until then, I look forward to seeing your thoughts
on this episode in the comments below.
♪ [music] ♪