Portfolio


Craft Beer Review Flow

Salesforce Screen Flow to easily input breweries, beers, and reviews.


As part of the Beer Review Salesforce App, I created a Screen Flow that would allow my husband and me to enter new reviews on the go. There is a tap house in Phoenix, Arizona that has tons of beers from different breweries and when we go we want to keep track of the beers we drink quickly.

Creating this Screen Flow was a great way to practice my Flow skills and become more comfortable with the different elements of Flows. I started to make more connections between JavaScript and Flow elements and things started to click more.

Process:

The Flow starts with either picking an existing brewery or entering a new one, depending on if an existing brewery was chosen, the Flow creates a brewery or moves on to adding a new beer and then creates a review for the beer.

Resources:

Record (Single) Variables:
breweryAccount (stores Brewery Record fields)
beerAccount (stores Beer Record fields)
reviewRecord (stores Review Record fields)

Record Choice Sets:
existingBreweryPicklist (has all Brewery records in the system)

Brewery Screen:

Users can create a new brewery by entering the name, city, and state of the brewery.

Or a user can select an existing brewery from the picklist, which is a Record Choice Set and the selection is stored in the breweryAccount Record Variable.

There is a decision element that checks to see if the picklist of the existing breweries is NOT null, if there is a value in it then the Flow moves to the Beer Screen. If there ISN'T a value in the picklist field, an Assignment Element assigns the brewery name, city, and state to the breweryAccount Record Variable and creates the brewery.

Beer Screen:

The Beer Screen component has fields for users to input the beer name, style (a picklist from the Beer object), other styles if the style is not in the picklist, a description, and ABV%. The beer name, style, other styles, and description components are all from the Brewery Object (Fields(Beta)) and will be stored into the beerRecord record variable when entered. There is an Assignment Element to assign the ABV% and Brewery Name (from the breweryAccount record variable) into the beerRecord record variable. Then the beer is created.

Review Screen:

At the top of the user screen, there is a text box with: {!$User.FirstName}'s review of {!beerAccount.Name}. This is to confirm that the Flow is grabbing the right user who is signed in using the flow.

The user enters their rating from 1 - to 5 (there is a validation that will not allow a number lower than 1 or higher than 5), and enter any comments or thoughts about the beer in the "What did you think?" field.

The "What did you think?" component is from the Fields(beta) Review Object, so that will automatically be assigned to the reviewRecord record variable. The next step is the Assignment Component that assigns the rating and the user ($User.Id value) to the reviewRecord record variable. The beer from the beerRecord is assigned to the reviewRecord record variable.

Confirmation Screen:

After the review is created a confirmation screen is shown confirming the brewery and beer name.