How to add Embedded Flow outside Salesforce org

Salesforce enhances the user engagement of an organization with Salesforce Communities whether it is for Customers, Partners or Employees. These users can have different use case options or functionalities that can be added into a Salesforce communities as per the need.

There is another very important component in Salesforce Lightning called Lightning Flows that can be used for automating business processes through data collection in a Salesforce org.

Lightning Flows can be created using the flow builder and added for an org but have you faced a situation where you need a flow outside of Salesforce. Let’s see it this way now, what if we need to collect some information related to a business in the Salesforce org and the user may not be a Salesforce user then what options do we have or is this even possible?

The answer is yes we can achieve this functionality by using Embedded Flow, that can be used outside a Salesforce org but the next Question is how?

We can add flows in a Lightning community or if Communities are not used then by using Lightning out a developer can embed the Lightning Flow component in an external app. More details can be found in the trailhead Lightning Component Basics module.

Adding an Embedded Flow in Lightning community is similar to adding a flow on a Lightning page and it will enable us to capture information from external users. There can be a number of use cases to understand how flows can be very useful for portals built on Salesforce Communities and some of them are highlighted below.

Use Cases of Embedded Flow on Communities

The biggest challenge in this project was to accommodate the inter-territory movement of technicians. FSL provided 2 ways of interaction between territories.

  • User Surveys: If we need to conduct Surveys from users on the products or services offered by a Company or get feedback.
  • Forms: If we need users to register for an event or some service request If we need users to send there interest for a service
  • Quote generation: If users need to get a Quote from the data in a Salesforce org like for a service or product

Adding an Embedded Flow in the Community

As per the rollout strategy from the community developer Salesforce Communities will be defined and pages will setup. We can create a community as per the need and add a the flow as a component. Once the flow is built using the builder in terms related to the Community Builder, a Flow is a component and therefore can be added in the community by the following steps.

Creation of Community

  1. Initial Community setup

    We need to enable Communities in the org as the first step (If Communities is already enabled, skip ahead to step 2.)

    1. From Setup Menu, by entering Communities in the Quick Find box, we can find the Communities settings.
    2. On clicking the communities settings, a window will open with an option to Click Enable communities.
    3. After we click the Enable Communities button, user will be prompted to Enter a domain name and then save the changes.

  2. Creation of a community.
    1. We should have been redirected to the All Communities page in Setup or if communities are already enabled, then we can enter Communities in the Quick Find box, and select All Communities.
    2. From the All communities page, click on New Community button.
    3. Next step is to select a template, and then click Get Started.
    4. After the template is selected enter a name for the community and click Create.
  3. Adding flow to its page.
    1. We need to go to the Community Workspaces page, from this page we will click on the Builder to open Community Builder.
    2. Once Community Builder opens, in the top-left corner there will be a section named Components. We will click Components to open the Components pane.

      EmbeddedFlows
    3. This will open the list of components and we will Search for Flow as shown in the image below and then will drag Flow onto the community page.

      EmbeddedFlows
    4. To get the right flow displayed we can check the flow name and also add the layout. In the properties pane for Flow, select Sample Flow.

      EmbeddedFlows

Adding an Embedded Flow in a Website

A flow can be embedded by using Embedded Service into a website and therefore can be used for user’s input for automated tasks that can run in the backend. This will also support external users like a guest user where no login is required and this can be created with Flow Builder and added to an Embedded Service deployment.

Resources
https://help.salesforce.com/articleView?id=flow_distribute_external.htm
https://trailhead.salesforce.com/screen_flow_distribution_external
https://help.salesforce.com/articleView?id=snapins_create_deployment.htm&type=5

For any query on Embedded Flow Implementation, contact support@astreait.com