Reach more customers with a multilanguage Guided Shopping Agent for a B2B store. Configure the agent to interact with customers in their preferred language.
Required Editions
| View supported editions. |
Before you begin:
Note If a buyer changes the store locale during an agent chat session, the agent doesn't change
its language. To use the new locale, the buyer must end the chat and start a new one.
-
Create a custom parameter on the Messaging Session object that maps to a variable in your
inbound Omni-Channel flow.
-
In your Salesforce org, click
at the top of the page, and then select Setup.
- In the Quick Find box, enter and select Messaging Settings.
- Select the name of your channel.
- Under Custom Parameters, click New.
-
Enter a Parameter Name, and select the Data Type.
The Parameter API Name and the Channel Variable Name are automatically populated. If you select String as the Data Type, also specify the maximum length of the string.
-
Save your changes.
The new custom parameter is listed in the Commerce Parameters section.
- Under Parameter Mappings, click New.
- Select Language as the value for the Parameter field.
-
Enter endUserLanguage in the Flow Variable Name field, and save your changes.
The new parameter mapping is listed in the Parameter Mappings section.
-
In your Salesforce org, click
-
Update your inbound Omni-Channel flow so that it sets the value of the Messaging User
Language context variable field.
- In the App Launcher, find and select Automation.
- Click Flows.
- Select the inbound Omni-Channel flow and open it.
- In the Manager tab, click New Resource.
- Select Variable as the Resource Type.
- Enter endUserLanguage as the API Name, and select Text as the Data Type.
- Select Available for input.
- Click Done.
-
Add an element, Update Records, immediately before the Route Work element in the
flow.
- Make sure that you select Specify conditions to identify records and set fields individually.
- Select Messaging Session as the object type.
- In the Filter Records section, filter based on the recordId value.
-
In the messaging session record element, under Set Field Values, add a field.
- Enter endUserLanguage for the context variable field API name.
- Enter endUserLanguage for the flow variable API name.
-
Activate pre-chat.
-
At the top of the page, click
and select Setup.
- In the Quick Find box, enter and select Embedded Service Deployments.
- Select the embedded service deployment that you created for the channel your agent is using.
- Click Edit Pre-Chat, and then select Activate the pre-chat feature.
- Under Hidden Pre-Chat Fields, add Locale to the Selected column.
-
At the top of the page, click
-
Add the embedded messaging component to your page.
-
At the top of the page, click
and select Setup.
- In the Quick Find box, enter and select All Sites.
- Click Builder next to your B2B store.
- Click the Components widget.
- Drag and drop Embedded Settings in the store footer.
- Republish your store.
-
At the top of the page, click
- To test your language setup for a channel, select Test Messaging on the embedded service deployment setting page.