WEBVTT

00:01.360 --> 00:02.160
Header.

00:02.160 --> 00:08.920
In the last tutorial, I showed you how to build an AI voice agent in retail AI that gets triggered

00:08.960 --> 00:17.080
when someone submits a form like for example, on your website, it replies using a single prompt.

00:19.720 --> 00:29.680
So that setup works fine, but it does have its limitations, like hallucinations or doing the wrong

00:29.720 --> 00:34.360
thing, especially as your use cases gets more complex.

00:35.520 --> 00:39.440
So basically, we created a single prompt voice agent.

00:40.080 --> 00:48.000
We added a prompt that tells the agent what to say, the tone, the style, and how to behave, and

00:48.000 --> 00:49.640
to make it a bit more dynamic.

00:49.640 --> 00:58.600
We passed in a few variables, but everything still runs through that one single prompt, and that's

00:58.920 --> 01:01.380
what we call a single prompt.

01:01.420 --> 01:02.540
A voice agent.

01:05.860 --> 01:15.860
So even if you use the best large language models like GPT four or cloud 3.5 or 3.7, and single prompt

01:15.860 --> 01:24.020
agents can still run into issues like hallucinations so they can hallucinate or doing the wrong thing,

01:24.060 --> 01:28.940
especially especially as your use case gets more complex.

01:29.820 --> 01:37.500
So single prompt voice agents are great, but as your logic grows, they can become less accurate and

01:38.300 --> 01:43.780
which can often lead to hallucinations or issues when handling multiple function calls.

01:45.260 --> 01:53.100
At this time, we are going to build a more advanced AI voice agent using something called a conversational

01:53.100 --> 01:53.580
flow.

01:53.980 --> 01:57.140
So it's a relatively new method of building a voice agents.

01:57.740 --> 02:00.810
So you have control of every step.

02:01.490 --> 02:04.010
So what does that actually mean?

02:04.090 --> 02:09.330
So think of it like designing a conversation using a flowchart.

02:09.850 --> 02:10.330
So.

02:12.770 --> 02:21.250
Instead of including everything into one big prompt, we break it down into smaller parts.

02:22.650 --> 02:27.090
So each step handles a single task.

02:28.050 --> 02:35.330
So this approach is way more powerful when you are building something for a reward because it keeps

02:35.330 --> 02:36.450
the AI focused.

02:36.770 --> 02:44.970
So each part of the flow does one thing, and you can create a separate path for things like checking

02:44.970 --> 02:49.610
calendar availability, sending an email, booking a meeting.

02:50.770 --> 02:54.090
So it only makes your agent way easier to manage and scale.

02:54.130 --> 02:57.370
And you can add logic at every step.

02:57.430 --> 03:03.070
So trigger automations in n810 and control how the conversation flows.

03:05.590 --> 03:12.190
So in this video I will show you a quick demo and then we will build it together step by step.

03:13.070 --> 03:17.630
And by the end of this tutorial you will have a very powerful voice agent.

03:18.390 --> 03:18.790
All right.

03:18.830 --> 03:22.470
Now I'm going to play a demo video I recorded earlier.

03:22.750 --> 03:24.790
So it includes a walkthrough.

03:24.790 --> 03:28.150
So you will get a clear idea of how the system works.

03:28.910 --> 03:29.630
Hi everyone.

03:29.910 --> 03:37.150
Today I'm going to show you a very powerful AI voice agent I built using retail AI and N810 that can

03:37.150 --> 03:44.070
completely replace receptionist appointment setters, virtual assistants, and you can use it for many

03:44.070 --> 03:47.030
more use cases and tweak to any industry.

03:47.630 --> 03:49.190
And this is not just a prototype.

03:49.190 --> 03:54.790
This system is production ready so you can implement it into your business or sell it to your clients.

03:54.830 --> 03:55.910
Now let's do a quick demo.

03:55.910 --> 03:58.380
So I'm going to call this physical therapy clinic.

03:59.900 --> 04:00.860
Just bear with me.

04:02.660 --> 04:03.140
Hello.

04:04.620 --> 04:04.940
Hello.

04:04.980 --> 04:05.940
This is Sophia.

04:06.100 --> 04:07.220
How can I assist you today?

04:07.540 --> 04:07.700
Hi.

04:07.700 --> 04:09.460
I'm looking for a chiropractor, please.

04:11.060 --> 04:15.500
Would you like me to book an appointment for you with Kate, our chiropractic specialist?

04:15.540 --> 04:16.340
Yes, please.

04:18.260 --> 04:19.500
Can I have your name, please?

04:20.460 --> 04:21.100
I'm Damien.

04:23.500 --> 04:24.740
What's your email address?

04:25.500 --> 04:31.100
It's n I n d e m o at gmail.com.

04:33.060 --> 04:34.860
I also need your mobile number, please.

04:35.260 --> 04:40.020
It's 07 5648 2602.

04:43.780 --> 04:48.020
Can I ask what symptoms you have and if there is anything else you would like me to pass to Kate?

04:48.820 --> 04:53.260
So my knee is very painful and it's a sport injury.

04:55.400 --> 04:56.720
Thank you for the details.

04:56.720 --> 04:58.360
What day and time worked best for you?

04:58.920 --> 05:02.120
Can we do on Monday at 2 p.m., please?

05:03.560 --> 05:05.040
I'm checking the availability for you.

05:05.080 --> 05:06.160
Give me a moment, please.

05:30.960 --> 05:31.480
Hello.

05:33.520 --> 05:35.320
Thank you for your patience, Damon.

05:35.520 --> 05:39.920
It looks like the time slot on Monday at two in the afternoon is not available.

05:39.960 --> 05:45.120
Would you like to try for a morning slot at 11 in the morning, or an afternoon slot at three in the

05:45.160 --> 05:46.600
afternoon on the same day?

05:47.080 --> 05:49.080
Yeah, I can do at 11 a.m., please.

05:50.760 --> 05:51.360
Great.

05:51.800 --> 05:56.790
So just to confirm, I have you scheduled for an appointment with Kate, our chiropractor, on Monday,

05:56.790 --> 05:57.870
at 11 in the morning.

05:57.910 --> 06:02.990
Your details are name, daemon, email, end date and demos at gmail.com.

06:02.990 --> 06:06.390
Mobile 07 5648 2602.

06:06.430 --> 06:09.030
Appointment Monday at 11 in the morning.

06:09.030 --> 06:10.150
Is everything correct?

06:10.510 --> 06:10.830
Yes.

06:10.830 --> 06:11.750
Everything correct.

06:11.750 --> 06:12.270
Thank you.

06:13.950 --> 06:15.310
Your appointment is confirmed.

06:15.310 --> 06:17.350
You will receive a confirmation shortly.

06:17.390 --> 06:18.190
Have a nice day.

06:18.350 --> 06:18.830
Thank you.

06:18.870 --> 06:19.390
Bye bye.

06:22.790 --> 06:27.990
Now, as you can see, the meeting has been successfully booked and we got an email.

06:28.670 --> 06:32.070
So I'm using my test email for a specialist.

06:32.070 --> 06:37.910
So a chiropractor, um, and we got a summary email with all the details.

06:39.030 --> 06:46.110
So we've got a client name, contact details and the reason for the appointment.

06:46.470 --> 06:51.510
I designed this invoice agent specifically for a physical therapy clinic.

06:51.870 --> 07:00.330
It handles all appointment bookings for three specialists chiropractor, massage therapist and physiotherapy

07:00.570 --> 07:01.730
rehab specialist.

07:02.210 --> 07:09.530
Each of these specialists has a separate calendar in Qualcomm AI voice agent has human in the loop functionality

07:09.970 --> 07:16.610
so it detects when a caller is frustrated or requests a real person, and seamlessly transfers the call

07:16.810 --> 07:20.330
to a human agent or directly to the specialist.

07:20.850 --> 07:27.330
Also, it provides a summary of the conversation before the transfer, ensuring that the human agent

07:27.330 --> 07:28.610
has full context.

07:30.490 --> 07:38.730
Because this system is built using the conversation flow method, it cuts down AI hallucinations by

07:38.730 --> 07:42.730
90%, so it stays on track and doesn't make things up.

07:43.210 --> 07:49.490
You have full control over what the agent says, but if you want, you can also give it more flexibility

07:49.490 --> 07:56.160
to handle open ended conversations, which isn't possible to achieve with other tools without coding.

07:57.960 --> 08:04.560
The agent is also trained on the company's knowledge base, so it can instantly answer frequently asked

08:04.560 --> 08:10.920
questions and provide accurate information without needing an intervention.

08:11.200 --> 08:16.640
So here's what happens when someone calls the clinic looking to book an appointment.

08:17.120 --> 08:22.480
The AI voice agent picks up the call and guides them through booking an appointment.

08:23.080 --> 08:26.320
Then it checks the specialist's availability in real time.

08:26.680 --> 08:31.120
Once they pick a date and time, the system locks in the appointment.

08:31.160 --> 08:39.040
Automatically, the client receives an email confirmation and the specialist gets an email summary of

08:39.040 --> 08:45.440
the conversation, including the client's contact details, their symptoms, and any extra notes or

08:45.440 --> 08:46.600
comments, they added.

08:46.920 --> 08:56.020
Each specialist has a dedicated AI Agent built in N8N that processes and analyses all the information

08:56.260 --> 08:58.820
before sending a detailed email summary to them.

08:59.620 --> 09:02.540
This system is designed to be super adaptable.

09:02.660 --> 09:05.020
You can tweak it for different industries.

09:05.300 --> 09:11.540
For example, instead of a clinic, you could use it for routing calls to different departments in a

09:11.540 --> 09:12.100
business.

09:12.500 --> 09:15.500
Automating scheduling for beauty salons and spas.

09:15.860 --> 09:19.980
Handling customer inquiries before escalating to a human.

09:20.460 --> 09:23.700
Processing appointments for any service based business.

09:23.900 --> 09:26.940
Handling inbound support for real estate agencies.

09:27.260 --> 09:30.660
Automating customer service for e-commerce stores.

09:30.740 --> 09:31.460
And much more.

09:33.780 --> 09:36.260
Honestly, this tech is a game changer.

09:36.780 --> 09:43.420
Whether you're a clinic, an agency, or any business that handles a lot of calls, an AI voice agent

09:43.420 --> 09:47.460
like this can save time, money, and frustration.

09:48.720 --> 09:56.360
All right, so now let's, um, get our hands dirty and start building this voice agent from scratch

09:56.400 --> 09:57.160
in little AI.

09:57.840 --> 10:05.840
And in the meantime, we'll jump will jump into an A-10, uh, to build a agents, to integrate the

10:06.120 --> 10:16.200
score analysis function and also to send a confirmation email with the notes the AI captures during

10:16.200 --> 10:17.280
the conversation.

10:17.280 --> 10:19.200
And let's create an agent from scratch.

10:19.320 --> 10:23.560
This time we are going to build a conversation flow agent.

10:23.560 --> 10:28.880
So this step, this type of AI voice agent is best for tasks with complex transitions.

10:28.880 --> 10:30.280
So let's start from blank.

10:30.840 --> 10:38.560
But you can also use pre-built templates such as for patient screening, real estate qualification,

10:39.040 --> 10:39.920
and others.

10:41.440 --> 10:42.560
So start from blank.

10:50.270 --> 10:55.710
Alright, so the first thing is to configure our welcome node.

10:56.030 --> 11:00.750
So this is so basically this is the conversation node.

11:01.270 --> 11:06.910
So we'll use this node most of the time just by clicking on conversation right here.

11:08.470 --> 11:10.550
But for now let's delete this one.

11:15.950 --> 11:23.190
So in this welcome node we need to type what we want our voice agent to say as a welcome message.

11:24.110 --> 11:27.470
So by default we have hello this is customer support department.

11:27.510 --> 11:28.750
How can I help you today.

11:29.710 --> 11:31.030
But we can change it.

11:31.030 --> 11:34.110
And I'm going just to copy and paste.

11:35.030 --> 11:36.030
Hello, this is Sophia.

11:36.030 --> 11:37.430
How can I assist you today.

11:42.030 --> 11:42.790
All right.

11:42.830 --> 11:45.310
And here we can add transitions.

11:45.790 --> 11:50.730
So it's basically like a path we want a AI voice agent to follow.

11:50.930 --> 11:58.410
So by default we have user needs to return the package, or user needs to check the order status.

11:58.690 --> 12:06.610
And because we are building a voice agent for a physical therapy clinic with with three specialists,

12:07.450 --> 12:13.930
for chiropractic care specialists, for therapy specialists, and for physiotherapy and rehabilitation

12:13.930 --> 12:14.730
specialists.

12:15.530 --> 12:17.850
So we need to add three transitions.

12:18.170 --> 12:21.090
So the first will be for chiropractor specialists.

12:21.130 --> 12:23.250
So I'm going to copy and paste it.

12:23.970 --> 12:25.050
The user needs to talk.

12:25.090 --> 12:28.330
Chiropractic care specialists and change it.

12:28.370 --> 12:29.370
Change this one.

12:33.810 --> 12:40.250
The second transition would be to massage therapy specialist.

12:41.330 --> 12:43.330
I'm just going to copy and paste it.

12:45.720 --> 12:50.520
And the transition I'm going to add by just clicking on this plus button.

12:53.200 --> 12:57.520
And using it to talk to physiotherapy rehabilitation specialists.

12:58.200 --> 13:06.720
So after our voice agent says this line, it analyzes the customers response.

13:06.720 --> 13:15.040
And based on that it transitions the flow so it moves the flow to the appropriate next node.

13:15.280 --> 13:22.600
So in that case it would move the conversation just following this path to the next node.

13:22.600 --> 13:24.120
So to the appointment handler.

13:24.760 --> 13:31.160
And then it will say would you like me to book an appointment for you with Rob our physiotherapist and

13:31.160 --> 13:33.920
rehab specialists and so on.

13:34.520 --> 13:42.320
So we are going to as a third transition add user needs to talk to physiotherapy and rehabilitation.

13:42.680 --> 13:44.900
So this time I'm going to type it manually.

13:45.380 --> 13:52.140
During the talk, the user needs to talk to.

13:56.060 --> 13:56.780
Ezio.

13:57.460 --> 13:58.180
Therapy.

14:02.180 --> 14:04.580
And rehabilitation specialist.

14:11.340 --> 14:12.140
All right.

14:16.100 --> 14:16.780
Great.

14:16.940 --> 14:21.740
So the first one is is for chiropractic care specialists.

14:23.020 --> 14:25.820
So we are going to add the same type of node.

14:25.820 --> 14:27.380
So conversation node.

14:30.100 --> 14:31.820
Let's move it up.

14:32.820 --> 14:38.580
And then we are going to connect them together.

14:41.060 --> 14:44.730
And then let's Ask another question.

14:45.650 --> 14:46.130
So?

14:46.810 --> 14:48.330
So, would you like to book?

14:53.770 --> 14:54.730
An appointment.

14:57.930 --> 14:58.330
With.

15:00.970 --> 15:02.410
Our chiro.

15:02.930 --> 15:03.650
Practic.

15:06.370 --> 15:07.130
Specialist.

15:07.250 --> 15:10.970
You have two options to choose from in the conversation node.

15:11.290 --> 15:17.490
The first one is prompt, but 90% of the use cases will use static sentences.

15:17.490 --> 15:23.010
This is the exact sentence we want our voice agent to say.

15:23.610 --> 15:29.770
The prompt gives an LLM more flexibility, but is less accurate.

15:30.410 --> 15:41.050
So again, because if you want to use a prompt, really allow for more randomness and consequently this

15:41.050 --> 15:43.870
can cause more hallucinations.

15:43.910 --> 15:47.070
Going to stick with static sentence option.

15:48.950 --> 15:53.910
All right, so now we are gonna add transitions to this node.

15:54.110 --> 15:58.350
So in other words instructions to our voice agent.

15:59.670 --> 16:00.190
So.

16:02.270 --> 16:11.470
If the user wants to book an appointment you can say something like if the user wants to book an appointment.

16:11.990 --> 16:16.190
So this is the first branch and the second transition.

16:16.710 --> 16:25.550
If the user the customer is not interested in booking an appointment but has some questions, we can

16:25.550 --> 16:31.270
ask something like we can add something like if the user have questions answered shortly based on the

16:31.310 --> 16:32.110
knowledge base.

16:32.630 --> 16:41.140
So for the AI voice agent built using conversation flow method, we can also add knowledge base.

16:41.660 --> 16:50.300
So the agent can go through the knowledge base and find the relevant answer for the user questions.

16:50.980 --> 16:55.580
Let's rename this node to Appointment Handling.

17:02.020 --> 17:11.140
And now we need to add another conversation node if the user want to book an appointment.

17:12.980 --> 17:16.340
We want to ask them about the details.

17:17.180 --> 17:18.660
So our agent can.

17:21.540 --> 17:24.660
Capture capture of of all this information.

17:25.940 --> 17:29.940
And then and then use it to to book an appointment.

17:36.140 --> 17:43.520
And this time we want to ask About their name and as a transition.

17:45.640 --> 17:52.520
If the user answered the question, we want a reverse agent to move to the next node.

17:53.600 --> 18:00.520
So let's add another conversation node and connect it right here.

18:10.680 --> 18:12.320
And let's rename this node to.

18:15.280 --> 18:17.680
Collect details.

18:19.840 --> 18:22.240
And let's say we want to ask about their email.

18:24.120 --> 18:26.160
So we can always follow up.

18:27.400 --> 18:28.720
So what's your email address.

18:30.360 --> 18:33.680
And as a transition let's add the same condition.

18:33.680 --> 18:36.880
So once the user.

18:40.540 --> 18:42.620
Answer the question, move to the next node.

18:45.820 --> 18:51.380
Then we need another conversation node to ask about their phone number.

18:52.340 --> 18:54.020
So we're going to do the same thing.

18:55.460 --> 19:03.740
So switch to the static sentence and ask about the mobile phone.

19:03.740 --> 19:05.900
So I also need your mobile number please.

19:08.140 --> 19:10.020
And let's rename this node to.

19:12.100 --> 19:14.180
Collect email address.

19:16.420 --> 19:18.060
This one to collect.

19:20.700 --> 19:21.460
Number.

19:26.660 --> 19:27.380
All right.

19:27.420 --> 19:34.740
Now while you are building your conversational flow, retail actually gives you a really handy way to

19:34.780 --> 19:36.500
test your agent in real time.

19:37.290 --> 19:40.650
So over here you've got the test.

19:42.930 --> 19:44.290
So let's just click on that.

19:50.490 --> 19:51.930
And here you have two options.

19:51.930 --> 19:52.650
Test audio.

19:52.650 --> 19:57.770
So you can actually you can literally talk to your agent like you are on a call.

19:58.090 --> 20:01.250
That's great if you want to hear how it responds with voice.

20:01.410 --> 20:02.370
So let's test it.

20:04.890 --> 20:05.450
Hi there.

20:05.610 --> 20:06.890
Hello, this is Sophia.

20:06.890 --> 20:07.890
How can I assist?

20:08.370 --> 20:09.930
Hi, I'm looking for a chiropractor.

20:10.450 --> 20:14.330
Would you like me to book an appointment for you with Kate, our chiropractic specialist?

20:15.970 --> 20:16.170
Yeah.

20:16.170 --> 20:18.450
So as you can see, it simulates the conversation.

20:18.450 --> 20:23.970
But honestly, what I use most of the time is the test feature, so it's just quicker and more.

20:24.010 --> 20:28.010
So when you click on this manual chart, you can manually chat with the agent.

20:31.130 --> 20:34.410
And you can start the conversation from any note in the workflow.

20:35.130 --> 20:37.550
So let's start from the welcome node.

20:42.870 --> 20:47.710
Now let's move on to the calendar availability node.

20:56.030 --> 21:01.590
As you can see, it's actually tries to call the function to check availability.

21:02.550 --> 21:08.190
This is how you can test your agent while you are building your conversational flow.

21:08.430 --> 21:14.310
So it's super useful way to debug and make sure everything works as expected before you actually go

21:14.350 --> 21:14.870
live.

21:15.830 --> 21:22.830
So now at this step, once our voice agent has captured all the key details like the name, email address,

21:22.990 --> 21:30.550
mobile number, you can use that to ask the customer about their symptoms and record that information

21:30.550 --> 21:30.910
too.

21:31.710 --> 21:37.380
So that way when the agent sends a confirmation email with the full summary of the conversation to the

21:37.380 --> 21:38.180
specialist.

21:38.500 --> 21:40.420
It can include the symptoms as well.

21:40.940 --> 21:44.700
So this helps the specialist prepare properly before the appointment.

21:45.340 --> 21:48.700
So let's add the conversation note again.

21:52.620 --> 21:53.780
And this time.

21:55.820 --> 22:00.460
We are going to add this as a static sentence.

22:00.740 --> 22:02.980
So can I ask what symptoms you have.

22:03.060 --> 22:07.660
And if there is anything else you would like me to pass to Kate.

22:08.340 --> 22:15.100
And as a transition of the previous note, we want to use the same condition.

22:15.300 --> 22:17.220
So I'm just going to copy and paste it.

22:20.020 --> 22:20.220
Okay.

22:20.220 --> 22:20.780
Great.

22:21.820 --> 22:22.580
Just to.

22:26.580 --> 22:27.340
Fix it.

22:27.340 --> 22:29.260
And it's called a number.

22:33.800 --> 22:35.240
Now let's connect these nodes.

22:40.640 --> 22:44.600
So the transition will be exactly the same as in the previous nodes.

22:46.080 --> 22:52.520
So once you answer the question move to the next node going to place it here.

22:55.120 --> 22:57.920
And then I'm going to add another conversation node.

22:59.360 --> 23:01.280
And this time I'm going to.

23:04.160 --> 23:07.680
Say something like thank you for the details.

23:07.680 --> 23:09.720
What day and time works best for you.

23:11.280 --> 23:13.360
And also let's say.

23:16.080 --> 23:16.600
Here.

23:18.640 --> 23:19.560
Ask for.

23:22.680 --> 23:23.960
Additional information.

23:28.720 --> 23:31.720
So then it will be easier to reference to this node.

23:34.830 --> 23:35.630
And here.

23:35.630 --> 23:40.030
Don't forget to switch over to this static sentence mode.

23:40.790 --> 23:43.630
And as a transition, we want to say something like.

23:46.710 --> 23:51.430
If user provides a valid date and time, move to the next step.

23:52.510 --> 24:01.390
So only if the user provides the valid date and time, move to the to the next step where we will check

24:02.710 --> 24:03.590
availability.

24:04.150 --> 24:12.910
So now if the user wants to book an appointment and provided all the relevant information such as contact

24:12.910 --> 24:19.870
details and the date and time that works best for them.

24:21.070 --> 24:25.990
We want our AI voice agent to check availability.

24:26.470 --> 24:31.890
And in that case, and this time we are going to use different type of node.

24:33.370 --> 24:34.450
The function node.

24:35.290 --> 24:36.410
So let's click on that.

24:38.730 --> 24:41.850
And now we have to add a tool.

24:43.530 --> 24:44.970
So click on add button.

24:46.410 --> 24:53.450
And as you can see retail AI has built in integration with Calcom.

24:54.010 --> 24:55.890
To check the calendar availability.

24:57.290 --> 24:58.490
So let's select this one.

24:59.090 --> 25:03.810
And here we need to provide the API key from Calcom.

25:04.250 --> 25:06.530
And event type ID from Calcom.

25:06.570 --> 25:13.930
So in the previous tutorial I showed exactly how to find the API key and the type ID.

25:14.290 --> 25:18.690
So if you are not sure or you have forgotten, just go back and check that video.

25:19.330 --> 25:20.490
So I've added mine.

25:20.530 --> 25:24.370
Just going to save it and add.

25:27.170 --> 25:27.530
All right.

25:27.530 --> 25:28.970
So this node is configured.

25:28.970 --> 25:34.040
Now let's Connected to the last node in our flow.

25:36.360 --> 25:40.280
So if user provides a valid date and time, move to the next step.

25:41.720 --> 25:42.760
So to this node.

25:44.880 --> 25:52.920
Now once the user provides the date and time and our agent is ready to check the specialist calendar

25:53.280 --> 26:04.440
to see if that slot is available, and we want our agent to sound as natural, to sound as natural and

26:04.440 --> 26:05.880
human like as possible.

26:06.240 --> 26:11.680
So on the right hand side you will see more configuration options for this node.

26:12.520 --> 26:18.760
So let's go ahead and toggle the speak during execution feature.

26:19.280 --> 26:25.000
And in this node again let's change to the static sentence.

26:25.560 --> 26:29.120
And here you have to define what to say when calling the function.

26:30.220 --> 26:35.180
so there will be no silence when our agent will analyze the calendar.

26:35.700 --> 26:36.660
So let's say.

26:38.860 --> 26:40.820
I'm checking the availability for you.

26:40.860 --> 26:42.060
Give me a moment, please.

26:42.900 --> 26:45.620
Now we are gonna add two transitions.

26:46.540 --> 26:53.980
One to check the calendar for a time that matches the user's schedule, and another to handle cases

26:53.980 --> 27:00.580
where the user asks to speak with a real person or sounds frustrated for any reason.

27:01.740 --> 27:04.300
So I'm going to add, um.

27:07.060 --> 27:13.220
Find the time on on a calendar that fits the user schedule as the first transition, and as the second

27:13.220 --> 27:13.580
one.

27:14.340 --> 27:21.340
I'm going to describe it as, uh, if the user requests to speak with a real person or express frustration,

27:22.900 --> 27:24.060
move to this node.

27:25.060 --> 27:27.780
So here we need to add another type of node.

27:27.850 --> 27:35.570
So the transfer call node so that if the user asks to speak with a real person or gets frustrated,

27:35.970 --> 27:39.570
the agent can try to hand off the call to a human.

27:40.650 --> 27:46.170
So let's click on that node and let's connect it to this transition.

27:48.530 --> 27:57.490
Now the configuration settings on the right hand side, just enter the phone number you want the call

27:57.530 --> 27:58.730
to be directed to.

27:59.170 --> 28:07.890
And if the transfer doesn't go through, we will add a fallback conversation to let the caller know

28:07.890 --> 28:10.770
and and end the call politely.

28:11.610 --> 28:14.290
So we are going to add another conversation node.

28:19.610 --> 28:22.930
Move it right here and connect this transition.

28:25.530 --> 28:32.070
And in that case we want our agent to say something like, I'm sorry, the specialist is currently unavailable.

28:32.110 --> 28:34.990
Please call later to talk directly to the specialist.

28:35.350 --> 28:37.510
Thank you for your patience and goodbye.

28:38.390 --> 28:39.990
And we want to end a call.

28:40.150 --> 28:43.270
So we are going to use the.

28:45.430 --> 28:46.910
Ending call function.

28:47.830 --> 28:48.670
So is this one.

28:53.790 --> 28:55.630
And just connect these nodes together.

28:58.550 --> 28:59.990
All right so let's zoom out.

29:01.310 --> 29:06.150
So this is the conversation flow we have built so far.

29:11.030 --> 29:11.270
Okay.

29:11.270 --> 29:12.150
So let's carry on.

29:13.990 --> 29:22.470
Now let's add one more conversation node with the condition I connected.

29:24.830 --> 29:34.290
And the a condition, we want to describe the transition as if you agreed on the day and time with the

29:34.290 --> 29:36.290
user, move to the next node.

29:39.250 --> 29:46.490
So as the user and the agent agree on the date and time, the agent should book an appointment.

29:47.170 --> 29:47.850
So let's go.

29:47.890 --> 29:53.530
Let's go ahead and add another function node.

29:54.770 --> 30:02.450
But this time let's add book on the calendar built in Chalcombe function.

30:03.250 --> 30:10.370
You can also build your own custom function, but it's more complex.

30:11.370 --> 30:12.490
So select this one.

30:13.250 --> 30:14.810
You can leave the description as it is.

30:14.810 --> 30:18.490
So when the users ask to book an appointment, book it on the calendar.

30:19.250 --> 30:24.490
But you have to provide API key from the and event type ID.

30:25.480 --> 30:26.560
so let's do it now.

30:27.120 --> 30:29.000
So I'm in my calendar now.

30:29.760 --> 30:31.160
Let's go to settings.

30:33.840 --> 30:34.920
API keys.

30:36.280 --> 30:36.680
Add.

30:40.960 --> 30:42.160
A name.

30:48.840 --> 30:49.880
Never expires.

30:50.040 --> 30:50.720
Save.

30:52.000 --> 30:52.840
Copy it.

30:56.280 --> 30:59.680
And paste it here to event type ID field.

31:01.000 --> 31:03.000
You have to go to our calendar.

31:06.560 --> 31:10.520
So back event types.

31:13.000 --> 31:15.760
I have 15 minute meeting.

31:17.680 --> 31:19.400
So I'm going to click on this one.

31:20.800 --> 31:22.600
And from the URL bar.

31:23.420 --> 31:24.500
Copy the number.

31:29.300 --> 31:30.340
And paste it here.

31:33.300 --> 31:36.500
Select your time zone and hit save.

31:39.380 --> 31:40.340
And click add.

31:42.460 --> 31:48.900
Alright, so now we have configured book Appointment node to use this function calling.

31:49.860 --> 31:53.060
And when we want our voice agent to book an appointment.

31:54.060 --> 31:55.340
So let's connect it.

31:57.900 --> 31:58.900
Now let's say.

32:02.100 --> 32:07.420
We want our agent to speak during execution and we want it to.

32:07.460 --> 32:12.100
We want it to say something like your appointment is confirmed.

32:12.140 --> 32:13.940
You will receive a confirmation shortly.

32:14.340 --> 32:14.980
Have a nice day.

32:14.980 --> 32:15.620
Goodbye.

32:19.180 --> 32:21.380
So now the appointment is confirmed.

32:22.090 --> 32:28.930
And before we end the call, we want to send the details of this conversation to Natan because we need

32:28.930 --> 32:30.450
to automate what happens.

32:30.490 --> 32:31.650
What happens next?

32:32.130 --> 32:38.970
So that includes things like summarizing the call and notifying the specialist, and sending a confirmation

32:38.970 --> 32:49.330
email to the specialist with a summary and notes from the conversation, or saving the info for for

32:49.330 --> 32:49.810
later.

32:50.290 --> 32:58.810
So we are going to create a custom function and use a webhook to pass all the conversations data from

32:58.810 --> 33:01.850
retail AI directly into our workflow.

33:03.250 --> 33:10.290
So let's create a function, click add button and create custom function.

33:10.850 --> 33:12.330
Now let's jump into Nathan.

33:13.530 --> 33:15.490
So let's create a new workflow.

33:16.450 --> 33:17.530
Let's rename it.

33:19.090 --> 33:21.830
Now we are going to add a webhook node.

33:21.830 --> 33:24.430
So let's search for webhook.

33:26.550 --> 33:29.590
So this webhook will trigger our automation.

33:30.910 --> 33:34.190
So we are going to copy this production URL.

33:36.870 --> 33:43.150
Let's go back to our retail account and paste URL in this field.

33:45.790 --> 33:51.030
Now as a description let's say sense users answer to the questions.

33:51.750 --> 33:55.710
And let's name it ten days 2010.

33:58.830 --> 33:59.870
Now let's save it.

34:01.950 --> 34:02.910
And let's add it.

34:07.230 --> 34:07.630
All right.

34:07.670 --> 34:08.110
Great.

34:08.110 --> 34:11.110
Let's add the transition to this node.

34:11.150 --> 34:14.190
So we want to send all the details if the.

34:20.100 --> 34:22.260
If the appointment is successfully booked.

34:24.060 --> 34:25.420
And let's connect these nodes.

34:31.260 --> 34:32.140
Alright, great.

34:32.620 --> 34:34.620
Now the same transition for this node.

34:35.860 --> 34:37.380
So let's add a transition.

34:39.500 --> 34:41.140
If appointment successfully booked.

34:42.780 --> 34:44.100
Now let's end the call.

34:44.300 --> 34:47.140
So we are going to use ending function.

34:52.340 --> 34:52.700
All right.

34:52.700 --> 34:53.180
Awesome.

34:54.460 --> 34:59.500
Now in the webhook node we want to change the method to post.

35:00.460 --> 35:06.020
And now we want to add a agent to analyze all this data.

35:07.220 --> 35:09.340
So let's add a agent.

35:13.220 --> 35:14.820
And let's rename it to Kate.

35:19.160 --> 35:21.360
So this is the name of our chiropractor.

35:22.280 --> 35:24.120
Now you want to add the prompt.

35:25.280 --> 35:26.800
So let's define below.

35:28.120 --> 35:28.640
Let's switch.

35:28.880 --> 35:33.600
Let's switch to expression and let's expand it.

35:34.480 --> 35:36.280
So this is the prompt I have prepared.

35:37.880 --> 35:43.200
So you are an AI assistant specialized in summarizing call transcripts.

35:43.520 --> 35:48.720
Your task is to extract only the most important and relevant details from the conversation.

35:49.240 --> 35:51.840
Always focus on the client's name and contact info.

35:52.320 --> 35:53.320
Reason for the call.

35:53.360 --> 35:53.880
Symptoms.

35:53.880 --> 35:55.000
Issue or concern.

35:55.320 --> 35:57.120
Additional notes from the client.

35:58.440 --> 36:02.680
So you want our agent to summarize the transcript.

36:03.560 --> 36:09.680
So you will get this JSON when you test your voice agent.

36:11.520 --> 36:20.190
While this workflow is active, the current date and time is now Generate a structured appointment confirmation

36:20.190 --> 36:26.590
email using HTML, ensure clear bullet points and proper formatting for readability, so this prompt

36:26.590 --> 36:28.910
will be available for you in the resources.

36:29.830 --> 36:32.550
So example output A new client has booked an appointment with you.

36:32.950 --> 36:33.790
Client name.

36:34.310 --> 36:40.830
So the extracted name from this transcript, email extracted from the transcript, etc..

36:41.710 --> 36:47.390
So ensure proper line break breaks and HTML formatting for a clean display in emails.

36:48.550 --> 36:50.230
And we have one tool.

36:50.830 --> 36:52.670
So use email tool to send emails.

36:54.150 --> 36:54.950
Alright great.

36:54.950 --> 37:02.270
So you can just you can simply copy and paste this prompt into your agent or you can modify it to fit

37:02.270 --> 37:02.950
your needs.

37:03.790 --> 37:04.710
Let's close it.

37:08.590 --> 37:10.030
Now let's add chat model.

37:12.430 --> 37:13.870
I'm going to use OpenAI.

37:18.450 --> 37:20.090
GPT four should be fine.

37:21.090 --> 37:23.490
Make sure you OpenAI account is connected.

37:25.370 --> 37:29.370
Okay, as a memory, I'm going to add simple memory.

37:32.170 --> 37:32.890
Alright, great.

37:32.890 --> 37:36.610
And as a tool I'm going to add Gmail.

37:37.610 --> 37:38.570
So Gmail tool.

37:41.090 --> 37:47.970
We want to send an email I want to send the email to this email address.

37:49.850 --> 37:58.010
But you would use the specialist's email address so Lehman's gmail.com.

38:00.250 --> 38:03.250
As a subject your appointment booked.

38:05.650 --> 38:09.490
Now for the message field just click on this.

38:09.530 --> 38:13.210
Let the model define this parameter feature.

38:13.210 --> 38:19.070
It will automatically and intelligently write an expression for you.

38:19.070 --> 38:25.230
So GPT four will be able to define this parameter.

38:25.990 --> 38:26.790
All right great.

38:26.790 --> 38:27.910
So let's close it.

38:29.190 --> 38:33.030
And now let's make this workflow active.

38:35.790 --> 38:36.550
Confirm.

38:38.590 --> 38:40.190
Now let's go back to retail AI.

38:40.870 --> 38:45.350
Here in the global settings you can switch to other languages.

38:45.710 --> 38:51.230
You have Spanish, French, Chinese and so on.

38:52.190 --> 38:55.470
You can select your favorite voice.

38:57.030 --> 39:04.390
You can add your custom voice for example from 11 labs you can change the gender, you can change accent,

39:04.950 --> 39:05.790
and so on.

39:06.710 --> 39:07.870
Let's close it for now.

39:13.510 --> 39:19.820
And here you can change the large language model for a global prompt.

39:21.220 --> 39:24.420
GPT four is fine and is very cost effective.

39:26.020 --> 39:27.300
So let's choose this one.

39:28.740 --> 39:32.380
And here we are going to enter our global prompt.

39:33.380 --> 39:41.780
So we are going to guide this AI voice agent and provide more details on the context of the of its role.

39:43.380 --> 39:45.900
So I'm going to paste the prompt here.

39:45.900 --> 39:48.260
And you can also find it in the resources.

39:48.780 --> 39:54.180
So here Sophia, a customer support representative at Physical Therapy Clinic, offers physiotherapy,

39:54.220 --> 39:58.180
chiropractic care, massage therapy and rehabilitation.

39:58.220 --> 40:04.500
Your role is to assist potential clients in scheduling appointments with the appropriate specialist,

40:04.700 --> 40:09.540
including physiotherapists, chiropractors, massage therapists and rehabilitation experts.

40:11.340 --> 40:22.400
Always use the current date and time, and we specify our time time zone and also pass the general current

40:22.640 --> 40:28.680
date time variable and assume that all appointments are for future dates only.

40:29.360 --> 40:37.280
So as objectives assist in scheduling an appointment for physiotherapy, blah blah blah and best practices

40:37.280 --> 40:42.800
during the call, ask one question at a time to keep the conversation natural and engaging.

40:43.200 --> 40:44.160
Listen actively.

40:44.760 --> 40:50.880
Now when collecting client information, ensure to gather their name, email address and mobile number.

40:50.880 --> 40:52.080
So this is very important.

40:53.120 --> 40:57.080
And waiting for each detail before proceeding to the next step.

40:58.240 --> 41:02.440
So when presenting available time slots clearly state them in spoken language.

41:05.280 --> 41:11.750
And if the user selects an unavailable time slot, provide two alternative options one in the morning

41:11.750 --> 41:15.350
and the one in the afternoon on the closest available day.

41:15.750 --> 41:18.270
And keep your responses clear and concise.

41:18.310 --> 41:19.430
Avoid rambling.

41:20.910 --> 41:21.830
Okay, great.

41:22.590 --> 41:25.070
Here you can choose the knowledge base.

41:26.710 --> 41:28.950
So basically you can add the knowledge base.

41:29.350 --> 41:32.070
As I as I showed in the previous tutorial.

41:32.590 --> 41:36.590
You just simply go to your AI dashboard.

41:37.270 --> 41:46.870
So under Knowledge base section you can just click on this plus button and give the Knowledge base name.

41:51.230 --> 41:52.870
You can add a web page.

41:53.950 --> 41:58.590
You can upload files and you can add text manually and then hit save.

41:58.590 --> 42:08.110
And when you go to your, uh conversational flow agent, you can add the knowledge base right here.

42:09.190 --> 42:12.010
So it will have access to the documents.

42:12.330 --> 42:18.930
Here you can play with some speed settings such as you can.

42:19.170 --> 42:21.330
You can add the background sound.

42:21.850 --> 42:27.290
You can adjust responsiveness so control how fast the agent responds.

42:27.290 --> 42:35.570
After users finish speaking, you can add some interruption, sensitivity, etc. I'm not going to dive

42:35.610 --> 42:37.130
deep into the settings.

42:37.170 --> 42:44.570
Now this is really important because by adding the post analysis feature, you can automatically pull

42:44.570 --> 42:47.050
out key details from the conversation.

42:48.370 --> 42:53.610
So let's add text and click save.

42:53.890 --> 42:55.330
And here you can choose.

42:55.650 --> 43:00.530
And here you can switch between different LMS for this post call data retrieval.

43:01.370 --> 43:04.170
But let's stick with the GPT four.

43:04.690 --> 43:12.920
So now the final step in this setup is making sure that you We have a fallback plan in case things don't

43:12.920 --> 43:14.040
go as expected.

43:14.040 --> 43:17.080
So like when a human agent is not available.

43:17.600 --> 43:23.400
And for that, we are using a special type of node which is called a global node.

43:23.840 --> 43:29.200
So you can enable this feature in every conversation node.

43:30.200 --> 43:39.480
When you click on the conversation node, like any of them, you can see that there is a global node

43:39.520 --> 43:40.200
option.

43:41.400 --> 43:48.400
So you can toggle it and it will allow other nodes jump jump to this node without edges.

43:48.920 --> 43:52.400
So this node doesn't need to be connected to the rest of the workflow.

43:56.000 --> 44:03.000
The global node is basically a part of your agent that can be triggered from anywhere in the flow.

44:03.600 --> 44:11.180
So no matter when the conversation is and in this case It kicks in whenever the user says something

44:11.180 --> 44:15.660
like, I want to speak to a real person or they sound frustrated.

44:16.540 --> 44:21.700
So in this note, the agent responds with something like, I'm transferring you to a human agent now.

44:22.340 --> 44:24.980
And then it tries to hand off the call.

44:25.500 --> 44:31.260
But just in case the transfer fails, maybe no one is around.

44:31.500 --> 44:39.140
We've got a backup message ready, so the agent politely lets the caller, uh, know support is not

44:39.140 --> 44:41.980
available at the moment and ends the call nicely.

44:41.980 --> 44:49.940
So this way we can keep everything professional and user friendly and and avoid bad customer support

44:49.940 --> 44:50.740
experience.

44:50.860 --> 44:53.780
So this is our conversational flow agent.

44:53.820 --> 44:56.380
As you can see we have a quite a few nodes.

44:56.740 --> 44:59.220
And this is the second part of the workflow.

45:00.060 --> 45:08.770
So this is our global node right now for the other two specialists in our physical therapy clinic.

45:09.370 --> 45:12.970
So the massage therapist and the physiotherapy rehab specialist.

45:13.330 --> 45:16.170
The conversation flow is going to be exactly the same.

45:16.530 --> 45:23.850
All you need to do is set up a separate calendars for each of them in Calcom, and then create dedicated

45:23.850 --> 45:26.490
agents in Naa10.

45:30.010 --> 45:33.770
To handle the color summaries and send out confirmation emails.

45:34.370 --> 45:37.170
So really, it's a simple copy and paste job.

45:37.410 --> 45:42.290
Just duplicate what we have already built and adjust the names and calendar links.

45:43.130 --> 45:46.530
And of course, this setup is not just for small clinics.

45:46.530 --> 45:52.690
You can easily scale it up for bigger businesses with five, ten, or even more team members.

45:53.090 --> 45:55.330
It's flexible and ready for production.

45:56.610 --> 45:59.090
All right, I hope this was helpful.

45:59.810 --> 46:02.450
Now go ahead and build it out for your practice.

46:03.130 --> 46:06.130
Thanks for listening and see you next time.
