Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Send Variable Values to a Flow Using the Flow's URL

          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

          View supported editions.
          User Permissions Needed
          To view a flow’s detail page: View Setup and Configuration
          To create and edit custom buttons, links, and Web tabs: Customize Application

          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 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
            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.
          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.
          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
          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.

          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.

          Variable Type Acceptable Values
          Boolean
          • Merge field of type Checkbox
          • True values: true or 1
          • False values: false or 0
          Currency Merge field of type Number or a numeric value
          Date Merge field of type Date or YYYY-MM-DD
          DateTime Merge field of type Date/Time or YYYY-MM-DDThh:mm:ssZ
          Multi-Select Picklist Merge field of any type or a string in this format: value1; value2
          Number Merge field of type Number or a numeric value
          Picklist Merge field of any type or a string
          Text Merge field of any type or a string
          Time Merge field of type Time or hh:mm:ss.msZ

          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}
           
          Loading
          Salesforce Help | Article