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
- Data > Get Records
- Object: Product
- Condition: Family Does Not Equal {!$GlobalConstant.EmptyString}
- All Records
- Resource > Picklist Choice Set
- Object: Product, Field: Family
- Interaction > Screen
- Radio Buttons: Choices: {!ProductFamily}
- Resource > Record Choice Set
- Object: Product
- Filter Product Records: Family Equals {!ProductFamilyRadioButtons}
- Configure Each Choice:
- Label: Name
- Data Type: Text
- Choice Value:
- Interaction > Screen
- Checkbox Group: Choice: {!ProductNames}
Deploy Flow
- Opportunity Record Page > Edit Page > Add “Flow” element to page from Lightning App Builder > Select Appropriate Flow
The prompt is taken from content on Salesforce's Trailhead website.