---
schema_version: "1"
id: c556e7345a70511ed0bae3e2287fba1bfd532661e2f94a2088b1ce7ea95ba08b
title: Create and Send Secure Forms in Messaging Sessions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/messaging_components_forms.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.messaging_components_forms.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a9b446cb69fde2873a3f9ff6bf8257d7607577267fe9f9cae9bd8506b2425b72
description: To let service reps send secure forms to customers in supported messaging channels, create a form messaging component. Forms let you quickly gather sensitive information from customers, such as network passwords or credit card information.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# Create and Send Secure Forms in Messaging Sessions

To let service reps send secure forms to customers in supported messaging channels, create a form messaging component. Forms let you quickly gather sensitive information from customers, such as network passwords or credit card information.

### 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;">
                <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/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, Enhanced Web Chat v1, Enhanced Apple Messages for Business,
                and Bring Your Own Channel</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 Web Chat v2, Enhanced WhatsApp, Enhanced Facebook Messenger, Standard
                and Enhanced SMS, Enhanced LINE</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="d94212e102">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d94212e102 ">To create messaging components:</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d94212e102 ">
                <p>Customize Application AND View Setup and Configuration </p>
                <p>OR</p>
                <p style="margin-bottom:0;">System
                  Administrator </p>
              </td>

            </tr>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d94212e102 ">To send and receive messages in Messaging:</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d94212e102 ">Messaging Agent</td>

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

When a customer submits their form responses, Salesforce creates a record of them. Admins control whether service reps can see the responses. A customer can’t view their submitted responses.

You can create a form based on a global action or an Apex class. After you create the form, reps can send it in a messaging session. When a customer submits their form responses, Salesforce writes their responses to a new record, such as a contact record. The record’s visibility settings for each field determine which form responses are visible to service reps. A customer can’t view their submitted responses.

## Create a Form Based on a Global Action

With a global action, create static messages that don’t change based on the user or input provided in the form. To get started, create a global action that creates a record, such as a contact record. Then, link it to a new form messaging component on the Messaging Components page in Setup.

1. Create a global action to link to your messaging component.
    1. Go to the Global Actions page in Setup.
    2. Click **New Action**.
    3. For action type, select **Create a Record**.
    4. Select a target object, which is the type of record that the action will create. Any custom object and the following standard objects are supported: Case, Contact, Order, Product, and Asset.
    5. Complete the remaining fields and click **Save**.
        
        ![New global action window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_action.png)
    6. Add fields from any object to the action layout, and customize their order. Global actions that are linked to a form messaging component can contain these types of fields: Text, Text Area, Text Area (Long), Email, Checkbox, Date, Date/Time, Number, Phone, Picklist, Picklist (Multi-Select), and URL. All other field types, including lookup fields, aren’t supported. If an unsupported field is added to the global action layout, it won't be visible in the form component and can cause an error. We recommend creating help text for any field that requires a specific format, such as a Phone field.
2. Go to the Messaging Components page in Setup.
3. Click **New Component.**
4. Select **Form**, and then click **Next**.
5. Click **Global Action**, and then click **Next**.
6. Enter a title and select a global action to link to your component. Only global actions that create records appear in the dropdown list. The title appears in the messaging session as a link to the form.
    
    ![New component window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_window.png)
7. Click **Next**.
8. Add a name and description for your component.
    
    These values aren’t visible to customers, but agents see the name in the list of messaging components in the Service Console. Assign a name that indicates the component’s purpose so agents know when to use it.
9. Click **Done**.
    
    The Messaging Component Builder opens.
10. In the Component Formats section, control how the component looks in messaging sessions. Click **Add Format**, select **Flow** or **Form**, and then click **Done**.
    
    ![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 Each messaging component is available in one or more formats, and some formats work only in certain channels. For a list of formats that each channel supports, see [Messaging Component Types and Formats](https://help.salesforce.com/s/articleView?id=service.messaging_component_formats.htm&release=264.0.0&type=5 "With messaging components, you can send structured content such as questions with options in enhanced Messaging channels and Enhanced Chat. Learn the purpose, format, and setup process of each component type."). It’s a good idea to add at least one supported format for each channel where the component will be sent. If no formats are added, the component uses the default text format.
11. In the left-hand sidebar, click the format type to update its properties.
    
    For example, if you selected the Form format, first, select the top field in the form preview to edit the form’s overall properties. Then, select one field at a time to configure the prompt, response, and keyboard shown for that field.
    
    ![Messaging Component Builder showing the Form format properties](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_builder.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 These properties apply only to Apple Messages for Business, and aren't used in Enhanced Chat: Initial Message, Initial Image, Welcome Screen Title, Welcome Screen Image, Welcome Screen Button, Welcome Screen Message, and Field Subtitle Configuration.
12. After you update the Flow or Form format properties, click **Save**.
13. In the left-hand sidebar, click the Text format type to update its properties.
    
    The plain text version is sent if your preferred format isn’t available or doesn’t load. While global action-based forms can’t be sent in plain text, you can edit your component’s plain text version so it contains a link to a public form or shows a text-only list of the questions that appear in your form.
    
    ![Text format properties](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_plain_text.png)
14. In the left-hand sidebar, click **Customization**. Optionally, change the expiration limit for the form. By default, when the form is sent in a messaging session, customers have 5 minutes to submit their responses before the link expires.
15. When you’re done editing your component, click **Save**. Your component is saved in a draft state.
16. When you're ready to make it available to your support team, click **Activate** at the top of the page.
17. If you ever need to take the component offline—for example, to give you time to reconfigure it—open it in the Messaging Component Builder and click **Deactivate**. When you're ready, activate it again.
18. If you want your form component to be used in an Enhanced Web Chat deployment for an Experience Builder or Commerce Cloud site, republish your deployment after creating or editing the component. Otherwise, messaging users can’t receive the form in messaging sessions.

## Send a Form in a Messaging Session

You can send form messaging components to customers in enhanced Apple Messages for Business, enhanced WhatsApp, and Enhanced Chat channels.

1. During an active messaging session, click the messaging component action in the messaging window of the Service Console.
    
    ![Messaging component action](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/component_selector_button.png)
2. Optionally, use the filter at the top to show only forms.
3. Select the form that you want to share and click **Insert**.
    
    A placeholder appears below the message field. No preview of the component is available.
4. Click **Send**.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/images/icon_example.png)

Example

When a service rep sends a form component in an Enhanced In-App Chat channel, the customer sees the form’s initial message and image (if you provided one) in a chat bubble. After opening the link, the customer proceeds through the welcome screen and form questions, which appear in separate screens.

![Form component on a mobile device](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_customer.png)

When the customer submits the form, the conversation transcript updates. The transcript shows the record that the form’s associated global action or Apex class created. The customer sees the form confirmation message and image in the chat bubble, but isn’t notified that a record was created.

![Message transcript showing form component](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_channels-264-0-0-production-enus/f3c4b3d2-ff86-4f7c-9fe2-3d8b23d35109/support_channels/images/messaging/messaging_form_agent.png)

If a customer refreshes their browser tab while filling out a form, their form responses are cleared for security reasons. After a customer submits a form, they can’t click the form link in their messaging session to submit new responses. If needed, the service rep can resend the form component to gather new responses.