---
schema_version: "1"
id: da0fda086103f46d5fc6d9556d9e15156aaea41383378f096b2dccfc996223fe
title: Set Up a Flow to Send Questions with Options 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_flow_dynamic_questions.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.messaging_flow_dynamic_questions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1d470c9aa530476ee66a9ee2507f914ac790e61e26678d2d837a1dad0a5fb32e
description: To let service reps send a question with dynamic options in supported enhanced Messaging channels or Enhanced Chat, create a flow and associate it with your question component. Then, add the flow to the Service Console.
products:
  - Service Cloud
  - Digital Engagement
release: "264"
---
# Set Up a Flow to Send Questions with Options in Messaging Sessions

To let service reps send a question with dynamic options in supported enhanced Messaging channels or Enhanced Chat, create a flow and associate it with your question component. Then, add the flow to the Service Console.

### 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="messaging_flow_dynamic_questions__d1150e840"><!-- --></a><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" id="messaging_flow_dynamic_questions__d1150e840" 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 Web Chat v2, Enhanced
              WhatsApp, Enhanced Facebook Messenger, Enhanced Apple Messages for Business, Enhanced
              LINE, 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;">Standard and Enhanced SMS channels</td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <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="d155935e98">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d155935e98 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d155935e98 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d155935e98 ">To create or edit a console app:</td>

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

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

![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 plan to create multiple messaging components that are linked to flows, here are two ways to help service reps quickly find the flow they need in the Service Console:

- Group the Flow components in an Accordion component. To help service reps understand the purpose of the accordion component, enter a custom section label—for example, Messaging Components (Dynamic).
- Group all messaging component flows as sub-flows within one larger flow. When a service rep runs the flow, they select the relevant sub-flow to insert the messaging component they need.

1. In Flow Builder, create a screen flow.
2. Create a Variable resource of data type Text, called recordId, and make it available for input. This resource stores the ID of the messaging session.
3. Add your own custom flow logic.
    1. To add a Record Collection Variable and show a collection of records, select **Allow multiple values (collection)**. The flow must populate the variable with the same object type that the messaging component needs. For example, if your messaging component shows a list of cases, your flow should produce a variable that is a collection of Case records.
    2. Add a Get Records element and define conditions to get the records of interest. For example, if your messaging component shows a list of cases, create an element that gets cases with a high priority and a status of New.
4. Add a Screen flow component. Within that screen, add an Enhanced Message component.
    1. For Messaging Session ID, enter the recordId Variable that you created in step 2.
    2. Select the messaging component that you want to use.
    3. For Record Variable, enter the Record Collection Variable described in step 3.
5. Save and activate the flow.
6. Add the flow to the Service Console so service reps can send the component during messaging sessions. See [Add Messaging to the Service Console](https://help.salesforce.com/s/articleView?id=service.livemessage_create_console_app.htm&release=264.0.0&type=5 "Configure the Service Console to put all messaging tools at your team's fingertips. Add Omni-Channel, customize the Messaging Session page layout, and make the Send Message global action available. Optionally, customize the Enhanced Conversation component and add messaging components to the Service Console.").
7. Send the question with options in enhanced Messaging channels or Enhanced Chat.
    
    1. During an active messaging session, in the Service Console, find the Flow component that’s linked to the question with options.
    2. Run the flow to insert the component into the message field.
    3. Click **Send**.
    
    In this enhanced Facebook Messenger channel, the service rep sees:
    
    ![Flow in the Conversation 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_dynamic_conversation.png)
    
    The customer sees:
    
    ![Customer view of messaging component with dynamic options](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_customer_dynamic.png)

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

This flow sends a question with options component that prompts the customer to select the case that they’re inquiring about. The component is linked to the flow on the screen labeled Case Screen.

![Sample flow](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_flow_example.png)

#### See Also

- [Build a Flow](https://help.salesforce.com/s/articleView?id=platform.flow_build.htm&type=5&language=en_US)
- [Flow Screen Input Component: Enhanced Message](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_screencmp_enhancedmessage.htm&type=5&language=en_US)