---
schema_version: "1"
id: 20bd250dd0ec00809758b2ef32e05923ebf5cc900efa3e7f7330e8698ea87932
title: Send Variable Values to a Flow Using the Flow's URL
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_distribute_internal_url_variable.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_distribute_internal_url_variable.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a938ef3014f76cc824da2de2b3ab4b16852b4bf2b83aaac919d036dc0537adca
description: When you distribute a flow by using a URL, you can set variables values within that flow by using parameters in the URL.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Send Variable Values to a Flow Using the Flow's URL

When you distribute a flow by using a URL, you can set variables values within that flow by using parameters in the URL.

### 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=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">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="vertical-align:top;" id="d204028e62">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e62 ">To view a flow’s detail page:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e62 ">View Setup and Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e62 ">To create and edit custom buttons, links, and Web tabs:</td>

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

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

Before you begin, make sure the flow variables that you’re setting are available for input.

1. From Setup, enter Flows in the Quick Find box, and then select **Flows**.
2. Click ![Show Actions](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow_mgmnt_dropdown.png) for the flow that you want to customize, and select **View Details and Versions**.
3. Copy the URL for the flow and add `/lightning` to the beginning of the URL.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)
    
    Note We recommend using Lightning experience and adding /lightning to the beginning of your flow URL. However, if you don't add /lightning to the flow URL, it still works, you just don't get the new benefits of running in Lightning. To learn more, see [Choosing Between Lightning and Non-Lightning Flow URL Formats](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_internal_url_lightning_vs_lightning_out.htm&release=264.0.0&type=5 "When you run a screen flow from a URL, you can choose between using Lightning or the non-Lightning URL format, which uses Lightning Out. We recommend using Lightning for a faster, more consistent experience. However, there are times when you need to use the non-Lightning format.").
4. To set a single variable value, append `?flow__name=value` to the end of the flow URL, where name is the unique name of the variable or collection variable in the flow that you want to set and value is the value you want to set it to.
5. To set multiple variable values, append `?flow__name1=value1&flow__name2=value2` to the end of the flow URL.
6. To send a list of IDs from a list view to a flow, create a collection variable named ids and make it available for input. It automatically works without setting values in the URL. Learn more in [Run a Flow from a Custom List View Button](https://help.salesforce.com/s/articleView?id=platform.automate_flow_distribute_internal_url_list_button.htm&release=264.0.0&type=5 "Add a custom button to a list view that starts an active autolaunched flow or screen flow. Send the IDs of the selected list view records to the flow. Use the flow's web address (URL) to set up the button.").
7. To set the values for multiple items in the same collection variable that isn't ids, don't append `flow__` before variable names and don't add `/lightning` to the beginning of the flow URL. Instead, append `?name=value1&name=value2` to the end of the flow URL.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note Collections: The only collection value setting that's supported in Lightning is sending IDs from a list view to a collection variable named ids. Learn more in [Run a Flow from a Custom List View Button](https://help.salesforce.com/s/articleView?id=platform.automate_flow_distribute_internal_url_list_button.htm&release=264.0.0&type=5 "Add a custom button to a list view that starts an active autolaunched flow or screen flow. Send the IDs of the selected list view records to the flow. Use the flow's web address (URL) to set up the button.").

Setting values for record variables and record collection variables by using URL parameters isn't supported in Lightning or the non-Lightning URL format.

Here are the valid values for each flow variable and collection variable based on its data type.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:11.49425287356322%">
          <col style="width:88.5057471264368%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d204028e268">Variable Type</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d204028e271">Acceptable Values</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Boolean</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">
              <ul>
                <li>Merge field of type Checkbox</li>

                <li>True values: <code>true</code> or <code>1</code></li>

                <li>False values: <code>false</code> or <code>0</code></li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Currency</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of type Number or a
              numeric
              value</td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Date</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of type Date or <code>YYYY-MM-DD</code></td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">DateTime</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of type Date/Time or <code>YYYY-MM-DDThh:mm:ssZ</code></td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Multi-Select Picklist</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of any type or a string in this format: <code>value1;
                  value2</code></td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Number</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of type Number or a numeric value</td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Picklist</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of any type or a string</td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Text</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of any type or a string</td>

          </tr>
          <tr class="">
            <td data-label="Variable Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e268 ">Time</td>

            <td data-label="Acceptable Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d204028e271 ">Merge field of type Time or <code>hh:mm:ss.msZ</code></td>

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

Example 1: Single Variable Value. A flow URL that is used in a custom button on a case page layout. When a user clicks that button, the flow launches with the varID variable (of type Text) set to the case record’s CaseNumber field value.

```
/lightning/flow/Case_Management?flow__varID={!Case.CaseNumber}
```

Example 2: Multiple Variable Values. Set the varUserFirst and varUserLast variables (both of type Text) to the running user’s FirstName and LastName field values.

```
/lightning/flow/User_Info?flow__varUserFirst={!$User.FirstName}&flow__varUserLast={!$User.LastName}
```

Example 3: Collection Values. A flow URL is used in a custom button on a contact page layout. When a user clicks that button, the flow launches and adds text values from the contact as items in the {!collNames} text collection variable.

```
/flow/Contact_Info?collNames={!Contact.FirstName}&collNames={!Contact.LastName}
```

#### See Also

- [Customize a Flow URL to Control Finish Behavior](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_internal_url_returl.htm&release=264.0.0&type=5 "By default, after a user finishes a screen flow, the screen flow redirects the user to the first screen. If you want to redirect users to another page within Salesforce when they click Finish, use the retURL parameter in the flow URL.")
- [Distribute a Flow](https://help.salesforce.com/s/articleView?id=platform.flow_distribute.htm&release=264.0.0&type=5 "After you’ve designed and tested your flow, it’s time to put it to work! Flows can be run in several ways, depending on who the flow is designed for. Internal users, external users, or systems can run a flow, or a flow can be deployed for another organization.")
- [Troubleshooting Flow URLs](https://help.salesforce.com/s/articleView?id=platform.flow_troubleshoot_url.htm&release=264.0.0&type=5 "If you’re distributing a flow and the custom button, custom link, or a direct flow URL isn’t working as expected, verify the referenced flow. In addition, verify its variables if you’re passing values into a flow from the URL.")
- [Distribute Flows to Users Outside Your Org](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_external.htm&release=264.0.0&type=5 "Let external users run your flow by adding the flow to an Experience Builder site, an external app or page, or an Embedded Service deployment. For finer control over how your flow behaves in external contexts, use a custom Aura component or Visualforce page. Flows in custom Aura components use Lightning runtime, and flows in Visualforce pages use Classic runtime.")
- [Add a Screen Flow to an Authenticated Experience Cloud Site](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_external_community.htm&release=264.0.0&type=5 "To add a screen flow to a page on your authenticated Experience Cloud website, use an Experience Builder Flow component. Use this method if you have a customer portal or other website that requires users to log in to use.")