---
schema_version: "1"
id: 70beb0694dbbf110771d87a8861515471bb3ad5ca86168612ad5b20b7f1cad9f
title: Create Customer Flows 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_field_example.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.miaw_custom_field_example.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3bf5126a67ef097f04784ade3e77d0f5bf35c876eb2d1a4a44a48aa4a8789163
description: 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.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# 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

<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_field_example__d1244e335"><!-- --></a><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" id="miaw_custom_field_example__d1244e335" 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="d84405e98">User Permissions</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions" class="slds-cell-wrap" style="vertical-align:top;" headers="d84405e98 ">To set up Omni-Channel Flow and Enhanced Chat:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d84405e98 ">Customize Application</td>

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

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

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

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.](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_data_flow_diagram.png)

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](https://help.salesforce.com/s/articleView?id=service.miaw_prepare_org_1.htm&release=264.0.0&type=5 "Build a strong foundation for your new messaging channel and deployment.") with Omni-Channel, Omni Flow, and a new Messaging channel. Then configure your [Enhanced In-App Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_mobile.htm&release=264.0.0&type=5 "Customize an existing Enhanced In-App Chat deployment, add it to your site, and set up security. Or, if you’re adding a second deployment to an existing Enhanced In-App Chat channel, follow these steps to create and customize it.") or configure your [Enhanced Web Chat](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm&release=264.0.0&type=5 "Connect your messaging channel to a website with a new embedded deployment. Create and customize your deployment, add it to your site, and set up security.").

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](https://help.salesforce.com/s/articleView?id=service.planning_checklist.htm&release=264.0.0&type=5 "Before configuring an Enhanced Chat experience, consider your business's current support goals. This step helps you select the right Omni-Channel routing approach, pre-chat form fields, and custom parameters to personalize the experience.") 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.](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_settings_prechat.png)
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.](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_visible_fields.png)
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_note.png)
    
    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](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)
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](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)
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_note.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_important.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_note.png)

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](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_3.png)
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.](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_mappings_list.png)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_note.png)
    
    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](https://help.salesforce.com/s/articleView?id=service.miaw_prepare_org_1.htm&release=264.0.0&type=5 "Build a strong foundation for your new messaging channel and deployment."). 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](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm&type=5&language=en_US).

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.](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_new_resource.png)
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.](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_new_update_records.png)
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.](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_session_records.png)
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.](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_omni_final.png)

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.