---
schema_version: "1"
id: c518226a0cc2c89630f946618d1f68f0b44ed51e72a29362126ddcab865a63ef
title: Customize Pre-Chat for Enhanced Chat
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/miaw_custom_prechat_3.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_3.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9ab87b62a8e86048bc22be068684c6d34dcacbdbb70c11022997c39db11e36f3
description: 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.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# 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

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

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <a name="miaw_custom_prechat_3__d794e335"><!-- --></a><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" id="miaw_custom_prechat_3__d794e335" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/resources-global/_corporate/images/checkmark.png" alt="Checkmark"></span>
              <strong>This article applies to:</strong>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Enhanced In-App Chat and Enhanced Web Chat channels</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/resources-global/_corporate/images/crossmark.png" alt="X icon"></span>
              <strong>This article doesn’t apply to:</strong>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Enhanced WhatsApp, Enhanced Facebook Messenger, Standard and Enhanced SMS,
              Enhanced Apple Messages for Business, Enhanced LINE, and Bring Your Own
              Channel</td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d132235e97">User Permissions</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions" class="slds-cell-wrap" style="vertical-align:top;" headers="d132235e97 ">To set up this feature:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d132235e97 ">
              <p>Customize Application </p>
              <p>AND</p>
              <p style="margin-bottom:0;">Modify Metadata Through Metadata API
                Functions</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions" class="slds-cell-wrap" style="vertical-align:top;" headers="d132235e97 ">To modify permission sets and profiles:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d132235e97 ">Manage Profiles and Permission Sets</td>

          </tr>
        </tbody>
      </table>

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.

#### See Also

- [Use Pre-Chat with an Enhanced Bot](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_prechat.htm&type=5&language=en_US)
- [Enhanced Web Chat Developer Guide](https://developer.salesforce.com/docs/service/messaging-web/guide/introduction.html)
- [Enhanced In-App Chat Developer Guide](https://developer.salesforce.com/docs/service/messaging-in-app/guide/introduction.html)
- [Enhanced Chat FAQ](https://help.salesforce.com/s/articleView?id=service.miaw_faq.htm&release=264.0.0&type=5 "Review answers to commonly asked questions about Enhanced Chat, formerly Messaging for In-App and Web.")

## 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.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/miaw/miaw_custom_fields_1.png)
    
    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. Every session is only supported for Enhanced Chat v1.
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.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/miaw/miaw_custom_fields_2.png)
        
        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 appears 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](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm&type=5&language=en_US).
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](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm&type=5&language=en_US).
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](https://help.salesforce.com/s/articleView?id=xcloud.data_retention.htm&type=5&language=en_US).

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.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/miaw/miaw_hidden_fields.png)
7. Save your changes.
8. Work with your developer to pass these values programmatically from your website or mobile app to Salesforce ([Web](https://developer.salesforce.com/docs/service/messaging-web/guide/pre-chat.html), [iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-pre-chat.html), [Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-pre-chat.html)). The pre-chat field names in the code must be identical to what is specified in Setup.