---
schema_version: "1"
id: d4c4c85b96d5d67bf4dbd742ba78dddfb52136e1b821ac6b6222bb61b38f3950
title: Create Flows to Send Messages for Real-Time Location
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/mfs_appointment_assistant_create_flows.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.mfs_appointment_assistant_create_flows.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 57c7e297f785848a193ac7063e0e900dbd46cfb68beb73ebab30146f625e2e98
description: Streamline your messaging process for Field Service Appointment Assistant by setting up flows that use the messaging components that you created.
products:
  - Field Service
release: "264"
---
# Create Flows to Send Messages for Real-Time Location

Streamline your messaging process for Field Service Appointment Assistant by setting up flows that use the messaging components that you created.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Field Service core features, managed package, and mobile app are available in <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available only if Digital Engagement is enabled.</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="d128230e78">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d128230e78 ">To open, edit, or create a flow in Flow Builder:</td>

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

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

1. From Setup, in the Quick Find box, enter Process Automation, and then select **Flows**.
2. To Create the En Route flow, click **New Flow**.
3. Select **Record-Triggered Flow**, and click **Create**.
4. In the Configure Start window:
    1. In Object, enter Assigned Resource.
    2. In Trigger the Flow When, select **A record is updated**.
    3. In Condition Requirements, select **All Conditions Are Met (AND)**.
    4. For Field, enter LocationStatus.
    5. For Operator, select **Equals**.
    6. For Value, enter EnRoute.
    7. In When to Run the Flow for Updated Records, select **Only when a record is updated to meet the condition requirements**.
    8. Click **Done**.
5. Add a collection variable for the Messaging User object. This collection variable is populated with a list of messaging user record IDs based on your criteria. For example, you can configure your flow to send an automated message to a subset of messaging users based on channel and consent status.
6. Add an action to the canvas. The New Action window opens.
7. Select the **Send Conversation Messages** action and complete the fields.
    
    - In **Messaging Users**, select the collection variable that you created.
    - In **Messaging Component**, select your new messaging component. Make sure that the component status is Active on the Messaging Components page in Setup.
    - Select **Any Time** for when to send the message.
    - Select **Yes**, apply Messaging End User settings for end user’s consent preferences.
    - In **Session Longevity**, select **Yes, End Session Immediately** if the end user doesn’t need to respond in this messaging session.
    
    You can use values from earlier in a flow to set inputs for the message. If the action fields don’t contain valid inputs, the flow fails.
    
    ![Send Conversation Messages flow action](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/mfs_aa_send_conversation_messages1.png)
8. Click **Done**.
9. Save and activate the flow.
10. To create the Approaching Messages flow, repeat these steps with a few changes.
    1. In step 4:
        
        - In Condition Requirements, select **All Conditions Are Met (AND)**.
        - For Field, enter LocationStatus.
        - For Operator, select **Equals**.
        - For Value, enter LastMile.
    2. In step 7:
        
        - In **Messaging Component**, select the messaging component that you created for Approaching messages.

The limit for active flows per flow type is 2,000. To help troubleshoot flows, turn on flow debug logs.

#### See Also

- [Interactive Messaging Components](https://help.salesforce.com/articleView?id=service.messaging_components_parent.htm&language=en_US)