Localize a B2B Guided Shopping Agent

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

Note
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.
  1. Create a custom parameter on the Messaging Session object that maps to a variable in your inbound Omni-Channel flow.
    1. In your Salesforce org, click Setup icon at the top of the page, and then select Setup.
    2. In the Quick Find box, enter and select Messaging Settings.
    3. Select the name of your channel.
    4. Under Custom Parameters, click New.
    5. 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.
    6. Save your changes.
      The new custom parameter is listed in the Commerce Parameters section.
    7. Under Parameter Mappings, click New.
    8. Select Language as the value for the Parameter field.
    9. Enter endUserLanguage in the Flow Variable Name field, and save your changes.
      The new parameter mapping is listed in the Parameter Mappings section.
  2. Update your inbound Omni-Channel flow so that it sets the value of the Messaging User Language context variable field.
    1. In the App Launcher, find and select Automation.
    2. Click Flows.
    3. Select the inbound Omni-Channel flow and open it.
    4. In the Manager tab, click New Resource.
    5. Select Variable as the Resource Type.
    6. Enter endUserLanguage as the API Name, and select Text as the Data Type.
    7. Select Available for input.
    8. Click Done.
    9. 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.
    10. 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.
  3. Activate pre-chat.
    1. At the top of the page, click Setup icon and select Setup.
    2. In the Quick Find box, enter and select Embedded Service Deployments.
    3. Select the embedded service deployment that you created for the channel your agent is using.
    4. Click Edit Pre-Chat, and then select Activate the pre-chat feature.
    5. Under Hidden Pre-Chat Fields, add Locale to the Selected column.
  4. Add the embedded messaging component to your page.
    1. At the top of the page, click Setup icon and select Setup.
    2. In the Quick Find box, enter and select All Sites.
    3. Click Builder next to your B2B store.
    4. Click the Components widget.
    5. Drag and drop Embedded Settings in the store footer.
    6. Republish your store.
  5. To test your language setup for a channel, select Test Messaging on the embedded service deployment setting page.