Flow: Product Filtering Quick Reference

Prompt

We need some kind of product quick search thingy or widget on the page that lets reps filter products on the type of product they want to buy and see a list right on the opportunity record.

I want a rep who’s talking to a customer to just check a box on the opportunity for the type of product the customer wants, and like magic that widget thingy shows all products of that type.

Solution

Preparation

  • Added 3x values to “Product Family” picklist:
    • Generator, Installation, Service Agreement
  • Assigned the Product Family field as appropriate to the default Products in default Trailhead orgs.

Build Flow

  1. Data > Get Records
  • Object: Product
  • Condition: Family Does Not Equal {!$GlobalConstant.EmptyString}
  • All Records
  1. Resource > Picklist Choice Set
  • Object: Product, Field: Family
  1. Interaction > Screen
  • Radio Buttons: Choices: {!ProductFamily}
  1. Resource > Record Choice Set
  • Object: Product
  • Filter Product Records: Family Equals {!ProductFamilyRadioButtons}
  • Configure Each Choice:
    • Label: Name
    • Data Type: Text
    • Choice Value:
  1. Interaction > Screen
  • Checkbox Group: Choice: {!ProductNames}

Deploy Flow

  1. Opportunity Record Page > Edit Page > Add “Flow” element to page from Lightning App Builder > Select Appropriate Flow