Loading
Prepare for Email to Become the Default Login ExperienceRead More
Automate Your Business Processes with Salesforce Flow
Embed a Flow in a Visualforce Page for External Users

Embed a Flow in a Visualforce Page for External Users

Let external users run your flow by adding the flow to a Visualforce page and distributing that page externally. For example, through a community.

Required Editions

User Permissions Needed
To create, edit, and set version settings for Visualforce pages: Customize Application

For example, you can set up a self-service tool for your public Salesforce site to help visitors generate custom sales quotes. Because the flow is embedded in a Visualforce page, you can customize the appearance of the flow so that it uses your company’s branding and style.

Note
Note When you make a flow available to site or portal users, point them to the Visualforce page that contains the embedded flow, not the flow itself. Site and portal users aren’t allowed to run flows directly.

To add a flow to a Visualforce page, embed it by using the <flow:interview> component.

  1. Find the flow’s API name.
    1. From Setup, enter Flows in the Quick Find box, then select Flows.
    2. Click the name of the flow.
    3. Copy the API name of the flow.
  2. From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
  3. Define a new Visualforce page, or open an existing one.
  4. Add the <flow:interview> component somewhere between the <apex:page> tags.
  5. Set the name attribute to the API name of the flow.

    For example:

    <apex:page>
    <flow:interview name="flowAPIName"/>
    </apex:page>
    If the flow is from a managed package, the name attribute must be in this format: namespace.flowuniquename.
  6. Click Save.
  7. Restrict which users can access the Visualforce page.
    Any external users with access to the Visualforce page can run the embedded flow.
    1. Click Visualforce Pages.
    2. Click Security next to your Visualforce page.
    3. Move all the appropriate profiles from Available Profiles to Enabled Profiles by using the add and remove buttons.
    4. Click Save.
  8. To distribute your Visualforce page, add the Visualforce page to your Salesforce site. Or use the Visualforce page to define a custom Visualforce tab, and then add that tab to your portal or community.
 
Loading
Salesforce Help | Article