Salesforce Agentforce + Messaging for Web: A Technical Guide to Multi Language Customer Support
7K views
May 1, 2025
Salesforce Agentforce Service Agent can be used for handling multi-language with Messaging for Web implementation. Blog Post: https://www.infallibletechie.com/2025/04/salesforce-agentforce-messaging-for-web-a-technical-guide-to-multi-language-customer-support.html
View Video Transcript
0:06
hello everyone in this video we are
0:08
going to see how to support
0:13
multilanguage whenever we are using
0:16
Salesforce messaging for web
0:19
and agent force service agent
0:26
in order to access uh Salesforce
0:29
uh agent for service agent we can make
0:33
use of uh messaging
0:35
for uh web implementation
0:38
so if you have already implemented
0:41
service agent and messaging for uh web
0:45
uh configuration and then if you wanted
0:47
to have multi- language support then
0:51
this uh video will uh help in
0:54
configuring
0:56
that the first step is we have
0:59
to go and enable translation workbench
1:04
you have to add the supporting language
1:07
for your
1:08
business once it is enabled you should
1:11
see this add button and then you will be
1:13
able to add multiple
1:16
languages the next step is we have to go
1:19
to the agent for service agent open it
1:24
in the builder go to language
1:28
settings in order to edit the language
1:33
settings we have to deactivate the agent
1:36
for service agent once it is deactivated
1:39
we will be able to add and remove the
1:42
languages if it is in active state we
1:46
won't be able to add it because uh the
1:49
language settings will be in read only
1:51
mode once you have added uh the
1:54
supporting languages the next step
1:58
is we have to configure language uh
2:03
variable in the omni channel
2:07
flow here we are going to make use of
2:11
hidden pre-hat field
2:14
value for language for that I have
2:17
created end user language flow variable
2:22
name so this is the flow variable name
2:25
and this is the flow variable i made
2:27
sure it is available for
2:31
input and this is my omni channel flow
2:34
which will route my messaging session
2:37
record to the agent force service
2:41
agent before routing I have to update
2:46
the enduser language agent for service
2:50
agent makes use of end user language
2:53
which is set up on the messaging session
2:56
record to display or convert or
3:01
translate
3:03
the labels and other system messages
3:06
also for example if you have
3:12
uh so all these like context um this
3:17
date uh this topics and everything will
3:19
be converted and then it will be
3:20
displayed in our chat widget for that we
3:24
have to make sure we are updating this
3:26
end user language on the messaging
3:28
session record so using update records
3:31
flow element I'm updating the end user
3:33
language
3:36
so my flow is active whenever uh the
3:38
messaging session is routed it will
3:41
update the end user
3:43
language based on this end user language
3:47
flow variable since this end user
3:50
language flow variable is available for
3:53
input I will be able to pass it using
3:56
the hidden prehat so we will see
3:59
that next in the messaging uh settings
4:03
we have to find the channel that is used
4:05
for your embedded service
4:07
deployment and then u you have to add
4:10
multiple languages
4:13
here
4:15
next in the custom parameters I have
4:18
created a custom parameter with the name
4:20
language data type is string and maximum
4:23
length is 100 we can keep it very short
4:26
also like 10 because we are going to
4:28
make use of the language code not the
4:31
full language label value next do the
4:34
parameter mapping so in this parameter
4:37
mapping I have selected the parameter as
4:40
language and for the flow variable I am
4:42
using the flow input variable called end
4:45
user language so whenever the omni
4:48
channel flow is invoked using the
4:50
pre-hat value language it will pass that
4:55
pre-hat value to this end user language
4:59
flow variable so that my flow will be
5:02
able to update the end user language
5:04
field on the messaging session record so
5:06
this is the crucial step once this is
5:10
done in the embedded service
5:12
deployment enable activate the pre-hat
5:16
feature add the available language
5:18
fields field to the selected uh column
5:22
save it publish the embedded service
5:25
deployment wait for a few minutes
5:27
because uh the embedded service
5:29
deployment uh publish will take some
5:32
time once it is done we should be able
5:35
to test it in order to test it what I
5:38
have done is I'm going to pass the
5:41
language in the URL parameter i'm going
5:45
to make use of my third party website
5:47
using GitHub which is uh uh easy to set
5:50
up uh so I'm going to make use of that
5:53
so that I will be able to pass the
5:54
parameter for the language in the query
5:58
in the URL so I'm going to make use of
6:00
the query
6:01
parameter so I'm going to get
6:04
window.location search and I'm going to
6:07
make use of URL search parame method
6:10
where I'm passing the window.location
6:12
search it will pass my URL it is get it
6:16
is trying to see whether the language
6:19
uh is there on the path or the in the
6:22
query parameter if it is not there it
6:25
will set the default encore us as the
6:29
language using a console.log lock
6:32
statement I'm setting I'm displaying
6:34
what is the language that is set
6:38
uh in this embedded service bootstraps
6:41
settings.language I'm setting the
6:43
language that is passed in the
6:45
URL I have
6:47
added window addvent listener for this
6:51
on embedded messaging ready event
6:54
whenever the messaging session is ready
6:56
and then whenever it is
6:58
loaded it will add this console.log lock
7:01
statement using embedded service
7:04
bootstrap prechart api set hidden
7:07
pre-chart fields method i am passing the
7:09
language parameter
7:14
value so this is the parameter value i'm
7:18
setting it
7:20
once this is set it will pass the value
7:22
to end user
7:25
language to my
7:27
uh inbound omni channel flow and that
7:30
will update the messaging session
7:34
record in my blog post I have given the
7:37
sample code for your
7:41
reference okay now let's test it so in
7:45
the URL I am using language as FR fr
7:50
means French so I'm able to see that is
7:53
set up properly so if I
8:00
initiate So now if I
8:03
initiate it should display everything in
8:05
French so it is displaying this in
8:08
French even the system uh messages that
8:12
is configured it is also displayed in
8:15
French if I go
8:20
back to my agent force uh
8:26
agent the system messages are set in
8:31
uh English but it was able to translate
8:35
and display it in French
8:39
if I go to my messaging session records
8:42
so this is the latest
8:45
one it was able to set the messaging
8:48
user language to
8:50
French so this is the key here we have
8:54
to have the omni channel flow where it
8:56
should update the end user language in
8:58
order to get the end user language we
8:59
are making use of end user language flow
9:03
variable name
9:05
this is the flow variable name and we
9:08
are we are creating a custom parameter
9:09
for
9:10
language using hidden pre-hat we were
9:13
able to pass that language
9:23
value please check the video description
9:26
in the video description I have given my
9:28
blog post from the blog post you should
9:30
be able to get the screenshots for your
9:33
reference and also the sample pre-chart
9:36
code
9:38
uh to set the hidden pre-chart field
9:40
value you can make use of this code for
9:44
your
9:51
reference i hope it was helpful
10:00
thank you for watching
#Customer Relationship Management (CRM)
#Helpdesk & Customer Support Systems
#Internet Software
#Text & Instant Messaging
#Web Services