---
schema_version: "1"
id: 96959f34a0dd359b1271f0ad0995b04f9763d92d3d9882fac4b260d2f0e9346a
title: "Best Practice: Launch a Screen Flow from a Maps Custom Action"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/salesforce_maps_setup_custom_action_screen_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.salesforce_maps_setup_custom_action_screen_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: be970b4adaca2971f979f9b6c8e5e8ec8b0725b69c4d64c8b2edeba562f6bab4
description: Launch a screen flow from a Salesforce Maps custom action so reps can capture a checklist, survey, or notes from a marker.
products:
  - Sales
  - Salesforce Maps
release: "264"
---
# Best Practice: Launch a Screen Flow from a Maps Custom Action

Launch a screen flow from a Salesforce Maps custom action so reps can capture a checklist, survey, or notes from a marker.

### 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;"><a href="https://help.salesforce.com/s/articleView?id=sales.salesforce_maps_editions.htm&amp;release=264.0.0&amp;type=5" title="Identify supported Salesforce editions, user interfaces, and product areas.">View supported editions</a>.</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="d10395e58">User Permissions Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d10395e58 ">To create flows:</td>

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

        </tr>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d10395e58 ">To configure custom actions:</td>

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

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

A Maps custom action can launch a screen flow from a plotted marker. Use this pattern when reps capture structured details from a marker and Salesforce writes those responses to a related record. Build a screen flow that accepts the marker's record ID, then connect it to a custom action button.

## Build the Screen Flow

Create a screen flow for the object that your reps plot on the map. The example uses the Account object. You can adapt it to leads, contacts, cases, or custom objects.

1. Enter Flows in the Quick Find box, and then select **Flows**.
2. Click **New Flow**. Select **Screen Flow**, click **Next**, and then select **Auto-Layout**.
3. Click **New Resource** and select **Variable**. For the API name, enter recordId. For the data type, select **Text**. Select **Available for input**, and then click **Done**. Salesforce Maps passes the ID of the record behind the marker into this variable.
4. Add a **Get Records** element and label it for your object (for example, Get Account Record). Select the object, and then filter its records.
    
     
    | Set This Filter Element | To |
    | --- | --- |
    | Field | Id |
    | Operator | Equals |
    | Value | `recordId` |
5. Add a **Screen** element. Enter a label, clear **Show Header** and **Pause**, and add the screen components that you want reps to complete, such as checkboxes or input fields.
6. Add a **Create Records** element (or **Update Records** to write to an existing record) to store the responses, for example in a related Task. Set the required field values, and then map each screen component to a field.
    
     
    | Field | Example Value |
    | --- | --- |
    | WhatId | `recordId` |
    | OwnerId | `{!Get_Account_Record.OwnerId}` |
    | Subject | `Check-in at {!Get_Account_Record.Name}` |
    | Status | Completed |
7. Select the record element, click **Add Fault Path**, and add a **Screen** with a **Display Text** component that tells reps what to do if Salesforce can't save their responses.
8. Add a confirmation **Screen** with a **Display Text** component, and then save the flow. Note its API name. You need it for the custom action.

## Create a Custom Action That Launches the Flow

1. Enter Installed Packages in the Quick Find box, and then select **Installed Packages**.
2. Find the Salesforce Maps package, and then click **Configure**.
3. Select **Settings** | **Custom Actions**.
4. Select **Create New**, name the custom action, and then select **Activity Support** and **Verified Location Support**.
5. Select the action **Launch Visual Flow**, and then enter the API name of the flow that you created.
6. Save your work.

## Add the Action to a Button Set

1. Select **Button Set Name** in Salesforce Maps Settings.
2. Select the button set that you want to add the custom action to.
3. Find the new button, and then drag it where you want it to appear in the Popup layout.
4. Save your work.

## Test the Flow

1. Plot a layer whose object corresponds with the flow that you created.
2. Click a marker, select **Actions**, and then click the button that you added.
3. Complete the screen, click **Next**, and then click **Finish**. Salesforce writes the responses to the related record.