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
          Build a Dynamic Sales Pipeline View in a Screen Flow Example

          Build a Dynamic Sales Pipeline View in a Screen Flow Example

          This example shows how you can use the Kanban Board component to organize a collection of records, such as opportunities, into columns for a visual representation of your data.

          Required Editions

          View supported editions.
          Note
          Note The Kanban Board feature is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

          Use the Kanban Board component when you need to provide a strategic overview of a sales funnel or process, allowing users to see records grouped by stage at a glance. For example, as a sales leader, you want to see a visual representation of your team's sales funnel.

          This example includes a screen action that calls an autolaunched flow and acts as a custom filter engine, allowing users to dynamically search by name and stage using on-screen text and picklist fields.

          Create an Autolaunched Flow

          1. Open the Flows list view.
            • From Setup, in the Quick Find box, enter Flows, and then select Flows.
            • From the Automation app, select the Flows tab.
            • From the Flows tab in any Lightning app, click the actions menu and select Open Flow.
          2. Create an autolaunched flow.
            • From the Automation app, click Flows and then click New. In the New Automation window, select Autolaunched Automations, and then select Autolaunched (No Trigger).
            • From Setup, click New Flow. In the New Automation window, select Autolaunched Automations, and then select Autolaunched (No Trigger).

          Create Variables to Search,Filter, and Count Records

          1. Create a text variable resource:
            1. Click Open toolbox and then click New Resource.
            2. For Resource Type, select Variable.
            3. For API Name, enter searchString.
            4. For Data Type, select Text.
            5. For Availability Outside the Flow, select Available for input and then click Done.
          2. Create another text variable resource with API name stage and select Available for input.
          3. Create a number variable resource.
            1. For Resource Type, select Variable.
            2. For API Name, enter Count.
            3. For Data Type, select Number.
            4. For Decimal Places, enter 2.
            5. For Availability Outside the Flow, select Available for output and then click Done.

          Get Opportunities Matching User's Search Criteria

          1. Click Plus icon used to add an element or action., and select Get Records.
            The Get Records properties panel opens.
          2. For Label, enter Get Filtered Opportunities.
          3. For Object, search for and select Opportunity.
          4. In the Filter Opportunity Records section, set the condition requirements to Custom Condition Logic Is Met.
          5. For Condition Logic, enter 1 OR 2.
          6. For Field, select Name. For Operator, select Equals. For Value, select searchString.
          7. To add a second condition, click Add Condition.
          8. For Field, select Stage. For Operator, select Equals. For Value, select stage.
          9. For How Many Records to Store, select All Records. Use the default values for the other fields.
            Get Records element configuration

          Iterate Over Every Opportunity and Assign a Resource

          1. Click Plus icon used to add an element or action., and select Loop.
          2. For the label, enter Iterate Over Opportunities.
          3. Set the Collection Variable to Opportunities from Get Filtered Opportunities.
          4. Add an assignment element that runs for each iteration of the loop.
          5. In the label field, enter Add to Count.
          6. For Variable, select Count. For Operator, select Add. For Value, enter 1.

          Assign a Collection Variable for the Opportunity Records

          1. Create a record collection variable.
            1. Click Open toolbox and then click New Resource.
            2. For Resource Type, select Variable.
            3. For API Name, enter Records.
            4. For Data Type, select Record and select Allow multiple values (collection).
            5. For Object, enter opportunity and select Opportunity.
            6. For Availability Outside the Flow, select Available for output and then click Done.
          2. Click Plus icon used to add an element or action., and select Assignment.
            1. For Label, enter Set Output Variables.
            2. For Variable, select Records. For Operator, select Equals. For Value, select Opportunities from Get Filtered Opportunities.
            Assignment element configuration
          3. Save your flow and give it a descriptive name.
          4. Debug your flow by using sample data and different scenarios.
          5. When you're ready to activate your flow, click Activate.

          Create a Screen Flow and Choice Resources for Opportunity Stages

          1. Open the Flows list view.
            • From Setup, in the Quick Find box, enter Flows, and then select Flows.
            • From the Automation app, select the Flows tab.
            • From the Flows tab in any Lightning app, click the actions menu and select Open Flow.
          2. Create a screen flow.
            • From the Automation app, click Flows and then click New. In the New Automation window, select Screen Automations, and then select Screen Flow.
            • From Setup, click New Flow. In the New Automation window, select Screen Automations, and then select Screen Flow.
          3. Create choice resources for the picklist component to filter ‌opportunities based on the stage.
            1. Click Open toolbox and then click New Resource.
            2. For Resource Type, select Choice.
            3. For API Name, enter Closed.
            4. For Choice Label, enter Closed.
            5. For Data Type, select Text and for Choice Value, enter Closed.
            6. Click Done.
            7. Repeat the previous steps to add the other stages.

          Get the Sales Opportunity List

          1. Click Plus icon used to add an element or action., and select Get Records.
            The Get Records properties panel opens.
          2. For Label, enter Get Pipeline Opportunities.
          3. For Object, search for and click Opportunity.
          4. In the Filter Opportunity Records section, set the condition requirements to None—Get All Opportunities Records.
          5. For How Many Records to Store, select All Records. Use the default values for the other fields.

          Create Text and Picklist Components to Capture User Input

          Add a screen element that contains Text, Picklist, and Display Text components to collect the user's filter criteria and display a record count. The Screen Action uses the search text and stage values as inputs to run a subflow.

          1. Click Plus icon used to add an element or action., and select Screen.
          2. For Label, enter Sales Pipeline.
          3. Add a Display Text component to the Screen element. For API name, enter Kanban_board.
          4. Add a Text component to the Screen element. For API name, enter Search.
          5. Add a Picklist component to the Screen element.
            1. For API name, enter Stage.
            2. For Let Users Select Multiple Options, select No.
            3. For Component Type, select Picklist.
            4. For Choice, select Closed.
            5. Click Add Choice and add the choice resources created for the opportunity stages earlier in the flow.
          6. Add the autolaunched flow created earlier as a screen action to this screen flow.
            1. Click the screen element's header.
              The screen element’s properties panel opens.
            2. Under Configure Screen Actions, search and select the autolaunched flow created earlier.
            3. For Label, enter Filter Opportunities.
            4. Enable the actions searchString and stage created in the autolaunched flow.
            5. For searchString, select Sales Pipeline | Search.
            6. For stage, select Sales Pipeline | Stage.
              Screen action configuration

          Configure the Kanban Board Component to Display the Records (Beta)

          To visually display the collection of opportunity records, add a Kanban Board component. To display the sales funnel, set Column Source Field to StageName. Then add key fields, such as Name, Amount, and CloseDate, to the Card Header and Card Content.

          1. Add a Kanban Board component to the Screen element.
          2. For API name, enter kanban_Opportunities.
          3. For Label, enter Sales Pipeline.
          4. For Source Collection, select Opportunities from Get Pipeline Opportunities.
          5. Under Configure Columns, for Column Source Field, select StageName.
          6. For Header Style, select Path and select Show Summary field.
          7. For Summary Fields, select Amount.
          8. Under Configure Card, select up to 5 fields to show on the card.
            1. For Card Header Field, select Name.
            2. For Source Field, select Close Date and then click Done.
            3. Click Add Field and select the other field to show on the card.
            Kanban board screen component configuration
          9. Save your flow and give it a descriptive name.
          10. Debug your flow by using sample data and provide a specific search string, select a specific stage value.
          11. When you're ready to activate your flow, click Activate.
           
          Loading
          Salesforce Help | Article