Loading
Ongoing maintenance for Salesforce HelpRead More
Feature degradation | Gmail Email delivery failureRead More
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Configure MRT and Trusted Domains for the Shopping Agent

          Configure MRT and Trusted Domains for the Shopping Agent

          For the Guided Shopping Agent to work with PWA Kit storefronts, set up managed runtime (MRT). MRT provides the infrastructure for your PWA Kit storefront, and it enables the Shopping Agent to communicate with the Enhanced Chat service in your Salesforce org. Set the correct environment variables in Managed Runtime for your deployed bundle.

          Complete these prerequisites.

          • Confirm that you have access to the PWA-Kit v3.13.0 or later.
          • Confirm that you have access to the Managed Runtime Admin console.
          • Make sure you have an MRT project with a package.json file, and the name matches the project id on MRT. See Managed Runtime Overview and Deploy Your Code in the Composable Storefront developer guide.
          • Make sure your API key is set up so that you can push a code bundle and deploy it so MRT can run.
          • Your Salesforce org has Enhanced Chat enabled and the channel is connected to your Shopping Agent.

          Complete these steps in the Managed Runtime Admin console.

          1. For the PWA_KIT_SLAS_CLIENT_SECRET variable, enter your SLAS client secret.
            A SLAS API Client allows your application to authenticate and authorize shoppers. See Use a SLAS Private Client.
          2. For the COMMERCE_AGENT_SETTINGS variable, enter the JSON-encoded settings used by the Shopping Agent Enhanced Chat configuration. For example:
            {
             "enabled":"true",
             "askAgentOnSearch":"true",
             "agentOutputStreamingDisabled":"true",
             "embeddedServiceName":"Agentforce_Channel_Web",
             "embeddedServiceEndpoint":"https://sforg-5647rt566c.test1.my.pc-rnd.site.com/ESWAgentforceChannelWeb1745544099167",
             "scriptSourceUrl":"https://sforg-1645fa246c.test1.my.pc-rnd.site.com/ESWAgentforceChannelWeb1745544099167/assets/js/bootstrap.min.js",
             "scrt2Url":"https://sforg-1645fa246c.test1.my.pc-rnd.salesforce-scrt.com","salesforceOrgId":"00GHT0000RHBqn",
             "commerceOrgId":"f_ecom_zzeu_075",
             "siteId":"RefArchGlobal"
            }
            Find the values for these settings in the chat code snippet of your Enhanced Chat embedded service deployment.
            • Feature flag for Enhanced Chat
            • Sub-Feature flag for launching Enhanced Chat on any search query. This setting depends on the setting of the Feature flag.
            • Embedded Service Developer name
            • Embedded Service URL
            • Script URL—Located in the end script tag of the code snippet.
            • SCRT2 URL
            • Salesforce Org ID
            • B2C Commerce Org ID
            • Site ID
          3. Add the domains that you specified in the COMMERCE_AGENT_SETTINGS variable to the list of Trusted Sites in Salesforce.
            1. In your Salesforce org, at the top of the page, click Setup and select Setup.
            2. In the Quick Find box, enter then select Trusted URLs.
            3. Add the values for these settings as trusted URLs.
              • Embedded Service URL
              • Script URL
              • SCRT2 URL
           
          Loading
          Salesforce Help | Article