Loading
Salesforce now sends email only from verified domains. Read More
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
          Customize Pre-Chat for Enhanced Chat

          Customize Pre-Chat for Enhanced Chat

          Ask customers to fill out visible pre-chat fields before starting a messaging session, or auto-fill hidden pre-chat fields when the conversation begins. Add standard and custom fields to your pre-chat form.

          Required Editions

          View supported editions.
          Checkmark This article applies to: Messaging for In-App and Messaging for Web channels
          X icon This article doesn’t apply to: Standard and 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 this feature:

          Customize Application

          AND

          Modify Metadata Through Metadata API Functions

          To modify permission sets and profiles: Manage Profiles and Permission Sets

          In this stage of Enhanced Chat setup, you:

          • Create custom parameters, which help map your pre-chat form to your flow.
          • Add visible fields to your pre-chat form.
          • Add hidden fields to your pre-chat form.

          Create Custom Parameters for Pre-Chat

          1. From Setup, in the Quick Find box, enter Messaging Settings, and then select Messaging Settings.
          2. Click the name of your messaging channel.
          3. Under Custom Parameters, click New.
          4. Fill in the details of your parameter. To make mapping easy and transparent, match the parameter name and channel variable name. Channel Variable Name appears as a selection when adding custom fields to your pre-chat form. Think of each custom parameter as the link between your pre-chat form’s custom fields (both hidden and visible) and your flow.
            Custom parameter modal with fields filled out.
            1. String is the only option for Data Type. While the pre-chat form lets you show visible fields formatted as text, email, phone, number, dropdown, and checkbox fields, a flow automatically converts these fields to string fields. If you use a flow to send information from a pre-chat field to another record, the output appears as a string field. While most letters, numbers, and special characters allowed by the original field type are allowed by a string field, differences sometimes occur. 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. As another exception, the flow passes the original dropdown API value from a pre-chat form’s dropdown field, not the custom label for that field value.
          5. Save your changes, and create additional custom parameters for each hidden or visible field that you plan to add to your pre-chat form.

          Add Visible 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. Select View from the dropdown menu for your deployment.
          3. Click Edit Pre-Chat.
          4. Select Activate the pre-chat feature.
          5. Choose whether to show the pre-chat form with every conversation, or with every session.
            1. If you select Every Conversation, the display frequency of the pre-chat form depends on whether you add user verification to your messaging channel. If you add user verification, an Enhanced Chat conversation has no end. Your customer sees the pre-chat form only when messaging you for the first time. If you don’t add user verification, a customer can click End Chat to end a conversation. They see the pre-chat form the first time that they message, and each subsequent time that they start a new conversation after ending the previous one.
            2. If you select Every Session, the display frequency of the pre-chat form also depends on whether you add user verification to your messaging channel. Learn more here: Considerations and Limitations for Enhanced Chat
          6. To add a standard field to your form:
            1. Under Visible Pre-Chat Fields, click Add Field, and then select the field that you want to show.
            2. Save your changes.
          7. To add a custom field to your form:
            1. Under Visible Pre-Chat Fields, click Add Field, and then select Custom.
            2. To determine how the information appears, select your field type.
            3. Find and set the channel variable name of the custom parameter.
              New custom field modal with fields filled out.

              If you selected Dropdown as your field type, also add a Dropdown Name, Dropdown API Name, and Dropdown API Values. There are a few things to note:

              • Each pre-chat form can have up to 5 custom dropdown fields and each dropdown can have up to 200 values.
              • A dropdown API name can only be used one time per org. If you delete a dropdown api name from your org, you still can’t use it again in that same org.
              • Format each dropdown API value to start with a letter, contain only alphanumeric characters, and use underscores instead of spaces.
              • We recommend creating a custom label for each dropdown value that displays on your pre-chat form, as it’s what your customer sees. You can create a custom label in each of your supported languages. If you don’t create custom labels, your customer sees the dropdown API values, which can include underscores.
              • We pass the original dropdown API value to your flow, not your custom labels.
            4. Click Next.
            5. On the next page, optionally select a Default Dropdown API Value for your dropdown field, which appears in the field if a selection isn’t already made. Also, order your dropdown field values.
          8. Click Save (if you created a custom dropdown field) or click Done (for all other custom field types).
          9. Save your changes to the pre-chat form.
          10. To create a custom label for a custom field, return to the deployment settings page and click Set Custom Labels.
          11. Select the language for this custom label. You must create a custom label for each language that you support.
          12. Select Pre-Chat as the chat group.
          13. Under Label Group, select Dropdown Values to customize the labels for your field’s dropdown API values. Or, select Pre-Chat Form to customize the label for standard fields, or custom email, number, phone, checkbox, and text fields.
          14. Under Label Type, select Standard.
          15. Enter a custom label for your custom field, and then click Finish.
          16. Repeat this step for each language that you support.
          17. Return to the deployment settings page and click Publish.

          Add Hidden Fields to Your Pre-Chat Form

          End users don't see hidden pre-chat fields. Update your privacy policy to include what data you collect with hidden fields. Consider linking to the policy with a Messaging Component in the conversation. Collect the minimum amount of data needed for a service rep to do their job, and only store this data for as long as it's needed to close the case. Learn how to delete data.

          1. From Setup, in the Quick Find box, enter Embedded Service Deployments, and then select Embedded Service Deployments.
          2. Select View from the dropdown menu for your deployment.
          3. Click Edit Pre-Chat.
          4. Select Activate the pre-chat feature if it’s not already selected.
          5. Under Hidden Pre-Chat Fields, click to highlight a custom parameter from the Available list. Custom parameters appear if they’re associated with the messaging channel for this deployment and if they’re not already in use as a visible or hidden field on this deployment. A hidden pre-chat field must be a Text type field and can’t be required.
          6. To move your field to the Selected list, click the arrow pointing toward the Selected list.
            Hidden pre-chat builder showing how to move a field from Available to Selected.
          7. Save your changes.
          8. Work with your developer to pass these values programmatically from your website or mobile app to Salesforce (Web, iOS, Android). The pre-chat field names in the code must be identical to what is specified in Setup.
           
          Loading
          Salesforce Help | Article