---
schema_version: "1"
id: e2b0a5411e20c8f4159789d5134ff3d4740c1cc1c19e9759bcaf5618fe9f8dd6
title: Localize a B2B Guided Shopping Agent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_agent_guided_shopping_localize.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_agent_guided_shopping_localize.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0619fe7b7986fed8a90d206a320ed9a788abca3b5af3228b0d8ec228ef99b0a7
description: Reach more customers with a multilanguage Guided Shopping Agent for a B2B store. Configure the agent to interact with customers in their preferred language.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

Before you begin:

- [Create a guided shipping agent for a B2B Commerce Store](https://help.salesforce.com/s/articleView?id=commerce.comm_agent_guided_shopping_create_agent.htm&language=en_US).
- [Create an Omni-Channel routing flow for the B2B Guided Shopping Agent](https://help.salesforce.com/s/articleView?id=commerce.comm_agent_guided_shopping_omnichannelflow.htm&language=en_US).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/images/icon_note.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) 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.

#### See Also

- [Customize Pre-Chat for Messaging fo In-App and Web](https://help.salesforce.com/s/articleView?id=sf.miaw_custom_prechat_2.htm&language=en_US)
- [Map Pre-Chat Values in Omni-Channel Flow](https://help.salesforce.com/s/articleView?id=sf.miaw_map_messaging_2.htm&language=en_US)
- [Add a Content Security Policy (CSP) Trusted Site for the Commerce Einstein Domain](https://help.salesforce.com/s/articleView?id=commerce.comm_einstein_csp_trusted_site_add.htm&language=en_US)