---
schema_version: "1"
id: 8567fb4f41624c7c3f46f3679c5337404887c97c8b3f101c0cf6da6689d74ff9
title: Map Pre-Chat Values in Omni-Channel Flow
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/miaw_map_messaging_2.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3d35331c6209a7513c080eff51ec2dfb320f2aae9a470242f24b9068dcaf8409
description: Omni Flow sends pre-chat form data to the messaging session for a more informed service rep experience. Map visible and hidden fields from your pre-chat form to your Omni flow.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# Map Pre-Chat Values in Omni-Channel Flow

Omni Flow sends pre-chat form data to the messaging session for a more informed service rep experience. Map visible and hidden fields from your pre-chat form to your Omni flow.

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

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d108705e96 ">
            <p style="margin-bottom:0;">Customize Application</p>
          </td>

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

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

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

In this stage of Enhanced Chat setup, you:

- Map pre-chat fields to Omni flow variables.
- Update your Omni-Channel flow to set field values for the messaging session after they’re filled out in the pre-chat form.

## Map Pre-Chat Fields to Omni Flow Variables

1. From Setup, in the Quick Find box, enter Messaging Settings, and then select **Messaging Settings**.
2. Select your channel name.
3. In the Parameter Mapping section, click **New**.
4. In the **Parameter** field, select an item from your pre-chat form.
5. Add a flow variable name that describes the action. You reference the flow variable name in your flow later.
    
    ![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 changes.
7. Continue the process with each standard and custom field in your pre-chat form.

## Update Your Omni-Channel Flow to Set Field Values in the Messaging Session

Return to the Omni-Channel Flow that you created in the [first stage of setup](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."). Add one more element to store your pre-chat fields.

![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 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.

1. From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
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 Data Type must be set to **Text**.
    - The variable must be **Available for input**.
    
    ![New Resource 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_4.png)
4. Create an Update Records element before the Route Work element in your flow. 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.
    
    ![Screenshot of 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. Under Set Field Values for the messaging session records, enter each field name under Field, and enter its corresponding flow variable name under Value.
    
    ![New Update Records modal 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_new_record_field_values.png)
6. Click Done. The complete flow looks like this.
    
    ![Diagram of Omni-Channel Flow with Messaging Session added.](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_flow_final.png)
7. Save this flow as a new version, and verify that it’s activated.

![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 When the service rep clicks End Chat, the messaging session ends. If the customer continues the conversation, another session is created. By default, pre-chat data isn’t carried over to this new session.

- **[Use Pre-Chat API to Pass Customer Information to the Service Rep in an External Website](https://help.salesforce.com/s/articleView?id=service.miaw_pre_chat_api_2.htm&release=264.0.0&type=5)**  
    To provide service reps with customer information that helps move an interaction forward, send end-user data to the service console via the pre-chat API.
- **[Use Pre-Chat API to Pass Customer Information to the Service Rep in an Experience Site](https://help.salesforce.com/s/articleView?id=service.miaw_pre_chat_api_3.htm&release=264.0.0&type=5)**  
    To provide service reps with customer information that helps move an interaction forward, send end-user data to the service console via the pre-chat API.

#### 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)