0:05
hello everyone in this video we are
0:07
going to see how to invoke Google
0:11
Vert.ex agent from Salesforce Lightning
0:18
in order to achieve this
0:22
uh demo or uh in order to invoke Google
0:26
Vertx EA agent from your Salesforce
0:28
Lightning web component there are some
0:30
prerequisites you have to
0:33
do i have shared this blog post in the
0:36
video description so you can make use of
0:38
this uh blog post as your reference and
0:41
then you should be able to complete all
0:44
prerequisites uh you should have uh
0:47
remote site settings set up in
0:50
uh in the Google ser and you should have
0:55
account and uh in the when you create
0:58
the service account in Google you have
1:00
to make sure Dialogflow API admin and
1:03
also service usage consumer roles are
1:08
account i am making use of
1:14
here from the service account we will
1:16
get a key uh as a JSON file when we
1:21
create a key in the sales in the Google
1:24
IM for the service account uh it will
1:28
download automatically you have to
1:29
upload that in Salesforce static
1:31
resource since uh the Apex code will
1:36
uh JSON key to authenticate successfully
1:40
get the access token from Google and
1:43
then it will be able to make uh uh calls
1:47
and then it will it can handle the chat
1:52
this is a sample apex code but for the
1:55
lightning web component code I have made
1:58
use made use of this apex class i have
2:02
also shared the lightning web component
2:05
reference let's see the demo so I'm
2:13
universities in Canada so this will make
2:18
HTTP uh call to the Google Vort.x agent
2:24
and then it is getting the response i uh
2:27
the response will be in JSON format i
2:29
have passed and then I have got the
2:31
exact response what I need to display it
2:34
on the lightning block component uh so I
2:37
said topic citizen Canada it says that
2:40
it can help but it need what kind of
2:43
program you I'm interested in i'm going
2:45
to say I'm interested in data
2:53
science uh I'm looking
3:15
okay I got the information from it and
3:20
it has also asked me whether I need any
3:23
additional information i'm going to say
3:27
thanks now it will end the conversation
3:34
i'm not going to do the code walk
3:37
uh video but uh you can
3:41
uh create this lightning web component
3:44
and apex class and then you should be
3:46
able to pass your uh location ID project
3:50
ID and agent ID from your Google vortex
3:52
agent and then you should be able to
3:55
successfully invoke it if you have any
3:57
issues try to set up a debug log that
4:00
will give you more information to
4:02
troubleshoot and narrow down the issue
4:05
so that you can invoke and have a custom
4:09
chat client in Salesforce with the help
4:19
component i hope it was helpful
4:28
thank you for watching