Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Sales Productivity
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
          Gather Customer Information Using Pre-Chat

          Gather Customer Information Using Pre-Chat

          Add custom fields to your pre-chat form to store your chatting customer’s local and time zone information. Then you can auto-fill these hidden pre-chat fields when the conversation begins.

          Required Editions

          Available in: Lightning Experience
          Available with Sales in Performance and Unlimited Editions
          Available with Sales Engagement, which is available in Performance and Unlimited Editions, and for an extra cost in Professional and Enterprise Editions
          User Permissions Needed
          To customize pre-chat:

          Customize Application

          AND

          Modify Metadata Through Metadata API Functions

          1. Create custom parameters for your pre-chat form.
            1. From Setup, in the Quick Find box, enter Messaging Settings, and then select Messaging Settings. Then click Buyer Assistant Messaging Channel.
            2. Create a custom parameter that stores your customer’s locale. Save your changes and then create another custom parameter that stores your customer’s time zone. Save your changes. For both parameters, be sure to match the parameter name and channel variable name.
          2. Add hidden fields to your pre-chat form.
            1. From Setup, in the Quick Find box, enter Embedded Service Deployments, and then select Embedded Service Deployments.
            2. Open the Buyer Assistant embedded service deployment, and then click Edit Pre-Chat.
            3. Under Hidden Pre-Chat Fields, select the custom parameters you created. Then save and publish your changes.
          3. Add custom fields to your messaging session object.
            1. From Setup, in Object Manager, select the Messaging Session object.
            2. From the Fields & Relationships tab, create a custom field for your customer’s locale. Then create another custom field for your customer’s time zone.
          4. Map the hidden pre-chat fields to flow variables in the Buyer Assistant - Route to Bot flow.
            1. From the Buyer Assistant Messaging Channel settings, create a parameter-mapping variable for your customer’s locale. Save your changes, and then create another variable for your customer’s time zone. For both variables, add a flow variable name that describes the action. Save your changes.
            2. From Setup, in the Quick Find box, enter Flows, and then select Flows. Find and select Buyer Assistant - Route to Bot from the list.
            3. Add an input variable for each pre-chat field. The API Name must be identical to the Flow Variable Name from Parameter Mappings. The Data Type must be set to Text. And the variable must be available for input.
            4. Create an Update Records element in the flow after the Route Work element. Name the element Update Messaging Session. Make sure that the element identifies records based on conditions and set fields individually. For the object type, select Messaging Session, filter based on the recordId value, and enter each pre-chat field and its corresponding flow variable name. Then click Done.
            5. Save your changes and activate the flow.
          5. Create and map bot context variables to the custom object fields.
            1. Navigate to your Buyer Assistant bot. From the Bot Builder menu, select Variables.
            2. Create context variables that match the custom Messaging Session fields you created. For the data type, select Text. Save your changes.
            3. To map your custom context bot variables to the custom fields on the Messaging Session object, in the Variables list view, click your customer locale context variable.
            4. Create a context variable mapping. For the connection type, select Embedded Messaging. And for the field name, select Messaging Session.
            5. Save your changes and repeat the mapping steps for the time zone context variable. Then activate your bot.

          Next, create a messaging channel and connect it to your website. Then embed your bot on your website and add code that collects data for your pre-chat fields.

           
          Loading
          Salesforce Help | Article