Loading
Agentforce Contact Center
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
          Create Customer Flows for Enhanced Chat

          Create Customer Flows for Enhanced Chat

          Enhanced Chat offers a powerful method to gather pre-chat details from your customer before the service rep connects. Standard Pre-Chat form fields you select, such as first name and last name, and new custom fields like account numbers, drive the experience. Here’s an example of how to create your first customer flow for efficient conversations.

          Required Editions

          View supported editions.
          Checkmark This article applies to: Enhanced In-App Chat and Enhanced Web Chat channels
          X icon This article doesn’t apply to: Enhanced WhatsApp, Standard and Enhanced Facebook Messenger, Standard and Enhanced SMS, Enhanced Apple Messages for Business, Enhanced LINE, and Bring Your Own Channel
          User Permissions
          To set up Omni-Channel Flow and Enhanced Chat: Customize Application
          To modify permission sets and profiles: Manage Profiles and Permission Sets

          Before getting started, let’s review how data passes through a messaging channel in a customer flow. This diagram shows each stage of the process.

          A customer requests a messaging conversation and provides their contact info and other details in a Pre-Chat form. Their form-field inputs travel in your new messaging channel and are mapped as parameters. The flow you define guides where the inputs go, such as an email address or an order number. A service rep connects with specific information about the customer at their fingertips. Optionally, a new Salesforce record can be created or updated as part of your enhanced flow

          diagram of customer data flow for pre-chat values.

          Set Up Enhanced Chat

          If you’re new to messaging, read the requirements and then follow the steps to Prepare a Salesforce Org for Enhanced Chat with Omni-Channel, Omni Flow, and a new Messaging channel. Then configure your Enhanced In-App Chat or configure your Enhanced Web Chat.

          Create a Pre-Chat Form

          Decide on the combination of standard and custom fields, which link as parameters to your flow. Pick the standard fields for your use case. If you need specific information for your service reps, create your own custom fields. We recommend a maximum of 5-6 total fields.

          Standard Field choices Custom Field Examples
          First Name Account Number
          Last Name Order Number
          Email Service Request
          Subject Your Custom Requirement

          Follow these steps to create your Pre-Chat form.

          1. From Setup, in the Quick Find box, enter Embedded Service Deployments, and then click to select.
          2. Find your deployment and select Edit.
          3. From the Deployment Settings page for your new web or mobile deployment, select Add Pre-Chat.
            Embedded Service Deployment Settings page with Edit Pre-Chat highlighted.
          4. For this example, use Add Field to select First Name and then Last Name, which are standard fields.
            Pre-Chat Form editor page with Add Field dropdown menu highlighted.
          5. Save your work.
          6. To add your custom field, you first must create a custom parameter in Messaging Settings. This process sets a Channel Variable Name, which you need for your Pre-Chat form.
          7. From Setup, in the Quick Find box, enter Messaging Settings, and then click to select.
          8. Find the Messaging Channel Name that you set up for your Enhanced Chat deployment from the list and select it.
          9. In the Custom Parameters section, click New.
          10. Note
            Note String is the only option for Data Type. While the pre-chat form allows you to display text, email, phone, number, and checkbox fields, a flow automatically converts them to string fields. If you use a flow to populate another record with the output of a pre-chat form field, the output renders as a string field. While most letters, numbers, and special characters allowed by the original field type are also allowed by a string field, you notice slight differences. For example, the flow converts a checkbox field to a string statement of “true” or a string statement of “false” in the resulting flow output.
            Name your parameter CustomerAccountNumber, select the type, and character maximum limit for your customer’s input.
            New custom parameter modal
          11. Save your work.
          12. From Setup, in the Quick Find box, enter Embedded Service Deployments, and then click to select.
          13. Return to your previous deployment settings page and edit the Pre-Chat form.
          14. From the Add Field list, select Custom.
          15. In the New Custom Field window, select Field Type and Text for your customer account number field. Find the Channel Variable Name that you set in Messaging Settings, CustomerAccountNumber, and select it.
            New custom field modal
          16. If you want the customer to complete the fields, check the Required box.
          17. Review the Pre-Chat form order, set the toggle to Active, and save your work.

          Parameters are the connection points between your pre-chat form and the flow. To map your standard and custom Pre-Chat field values, follow these steps.

          Note
          Note To create a custom label for pre-chat fields, return to the deployment settings page and select the Custom Labels section. Find your custom field in the Label Group Pre-Chat. All custom fields require a custom label because there’s no default label.
          Important
          Important To use the Custom Label panel, the admin must authorize a logged-in user as a translator in the Salesforce User language and the translated label language. Then, the user can customize the words or phrases.
          Note
          Note If you edit a deployment, you must click the Publish button on the Embedded Service Deployment Settings page. The changes can take up to 10 minutes to complete.
          1. From Setup, in the Quick Find box, enter Messaging Settings, and then click to select.
          2. Find the Messaging Channel Name you set up for your Messaging for In-App or Web deployment from the list and select it.
          3. In the Parameter Mapping section, click New.
          4. In the Parameter field, select an item for your Pre-Chat form.
          5. Add a Flow Variable Name that describes the action. The Flow Variable Name matches what you use for Omni-Flow.
            New parameter mapping modal
          6. Save your work.
          7. Continue the process with each standard and custom field in your Pre-Chat form. When finished, you have a parameter mappings list.
            Your Parameter Mappings list shows all your Parameters and Flow Variable Names.
            Note
            Note Standard Parameter API Names, such as first name and last name, have an underscore and no spaces. For example, _FirstName and _LastName. Custom Parameters don’t have underscores.

          Return to the Omni-Channel Flow that you created when you set up your Salesforce org. Previously, you selected the Route To Queue action to direct a customer request to the right queue. In this section, we add one more element to store your pre-chat fields.

          Before starting, you must create three custom fields on the Messaging Session object, FirstName, LastName, and CustomerAccountNumber. See Create Custom Fields.

          1. From Setup, in the Quick Find box, enter Flows, and then click to select.
          2. Find and select your previous flow 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 variable must be Available for input.
            New Resource modal to add input variable for each pre-chat field.
          4. Create an Update Records element before the Route Work element in your flow. Select Specify conditions to identify records and set fields individually. Select Messaging Session as the object. In the Filter Records section, filter based on the recordId value.
            New Update Records modal.
          5. Set the Field Values for the Messaging Session Records so that the fields match the custom field names, which in this case is associated with the Messaging Session.
            Edit Update Records window with Set Field Values for the Messaging Session Records highlighted.
          6. The Value matches the input variables for the flow.
          7. Click Done. The complete flow looks like this.
            Diagram of the final Omni-Channel Flow with Route to Queue and End.

          With this flow, a service rep sees the customer’s pre-chat inputs of first name, last name, and customer account number in the session record as they connect.

           
          Loading
          Salesforce Help | Article