Start tracking your progress
Trailhead Home
Trailhead Home

Create a Candidate Rating Flow

Right now, the AW Computing hiring managers have to manually input a number when they rate candidates. Ling Wu wants this process to be more user friendly, with radio buttons.

To set this up for her, create a flow. Flows, which you build using Flow Builder, automate business processes by executing logic, interacting with the Salesforce database, and collecting data from users.

Create Radio Buttons for Experience

Begin creating the flow.

  1. From Setup, enter Flows in the Quick Find box and select Flows.
  2. Click New Flow.
  3. Add a screen element to prompt for the Review information by dragging Screen from the palette onto the flow window.
  4. For Label, enter New Review.

Now add radio button choices to rate a candidate on a scale of 1 (poor) to 5 (excellent) for Experience, along with a text box for comments.

  1. Click Radio Buttons from the Input section of the palette on the left.
  2. Enter Experience in the Label field. (The API Name field will default.)
  3. Set the Data Type to Number.
  4. Click the Choice field, select +New Resource, select Choice as the Resource Type, and fill in the details.
    Field
    Value
    API Name Excellent
    Choice Label Excellent
    Value Date Type
    Number
    Choice Value
    5
  5. Click Done.
  6. Go back into the Choice field and select Excellent from the Choices options.
  7. Click +Add Choice four times.
  8. Click the second Choice field and select +New Resource.
  9. Select Choice as the Resource Type, and fill in the details.
    Field
    Value
    API Name VeryGood
    Choice Label Very Good
    Value Data Type
    Number
    Choice Value
    4
  10. Click Done.
  11. Go back into the second Choice field and select VeryGood from the Choices options.
  12. Click the third Choice field and select +New Resource.
  13. Select Choice as the Resource Type, and fill in the details.
    Field
    Value
    API Name Average
    Choice Label Average
    Value Data Type
    Number
    Choice Value
    3
  14. Click Done.
  15. Go back into the third Choice field and select VeryGood from the Choices options.
  16. Click the fourth Choice field and select +New Resource.
  17. Select Choice as the Resource Type, and fill in the details.
    Field
    Value
    API Name BelowAverage

    Choice Label Below Average
    Value Data Type
    Number
    Choice Value
    2
  18. Click Done.
  19. Go back into the fourth Choice field and select VeryGood from the Choices options.
  20. Click the fifth Choice field and select +New Resource.
  21. Select Choice as the Resource Type, and fill in the details.
    Field
    Value
    API Name Poor
    Choice Label Poor
    Value Data Type
    Number
    Choice Value
    1
  22. Click Done.
  23. Click back into the fifth Choice field and select Poor from the Choices options.
  24. Click Text from the Input section of the palette on the left.
  25. For Label, enter Experience Comments. (The API Name field will default.)

You’ve got your first set of radio buttons, but don’t click Done on the screen just yet. 

Create Radio Buttons for Leadership Skills

Now that radio buttons and text screen elements for Experience are added to the flow, repeat the process for Leadership Skills.

  1. Click Radio Buttons from the Input section of the palette on the left.
  2. For Label, enter Leadership Skills. (The API Name field will default.)
  3. Set the Data Type to Number.
  4. Click into the Choice field and select #Excellent.
  5. Click +Add Choice four times.
  6. Repeat step 4 to add Very Good, Average, Below Average, and Poor to the Choice fields.
  7. Click Text from the Input section of the palette on the left.
  8. For Label, enter Leadership Skills Comments. (The API Name field will default.)

There’s one more set of radio buttons to add—don’t click Done yet.

Create Radio Buttons for Core Competencies

Repeat the process once more for Core Competencies.

  1. Click Radio Buttons from the Input section of the palette on the left.
  2. For Label, enter Core Competencies.
  3. Set the Data Type to Number.
  4. Click into the Choice field and select #Excellent.
  5. Click +Add Choice four times.
  6. Repeat step 4 to add Very Good, Average, Below Average, and Poor to the Choice fields.
  7. Click Text from the Input section of the palette on the left.
  8. For Label, enter Core Competencies Comments. (The API Name field will default.)  

Add Screen Elements

Finally, add screen elements to the flow to create a checkbox and textbox so recruiters can recommend a candidate for hire.

  1. Click Checkbox from the Input section of the palette on the left.
  2. For Label, enter Recommend for Hire. (API Name field will default.)
  3. Click Text from the Input section of the palette on the left.
  4. For Label, enter Reason Recommended. (API Name field will default.)
  5. Click Done to close the screen.

Your New Review window should look like this.  

New Review screen inputs

Set a Start Element

Now that you’ve created the flow, set its start element.

  1. Connect the Start element to the New Review Screen element by clicking and holding the Start circle and then dragging your cursor to the New Review element.
  2. You will see that the two elements are connected by a solid line.

Next add a Create Records element to the flow.

  1. Drag the Create Records element from the palette onto the flow window.
  2. For Label enter createReview, and let the API name default.
  3. For How Many Records to Create, select one.
  4. For How to Set the Record Fields select Use separate variables, resources, and literal values.
  5. For Object select Review.
  6. Under Set Field Values for the Review click the Field box, and select Job_Application_ _c.
  7. For Value, click in the box, select +New Resource, and fill in the information.
    Field
    Value
    Resource Type Variable
    API Name varJobAppId
    Data Type Text
    Available for Input Select
    Available for Output Select
  8. Click Done.
  9. Click into the Value field that aligns with the Job_Application_ _c field, and select the varJobAppId variable you just created.
  10. Click +Add Field 8 times, then map the rest of the values according to the chart below. (Hint: Type the first few letters of the Field or Value name, then click it when you see it.)
    Field
    Value
    Custom:
    Core_Competencies_Comments__c
    Screen Components:
    Core_Competencies_Comments
    Custom:
    Core_Competencies__c
    Screen Components:
    Core_Competencies
    Custom:
    Experience_Comments__c
    Screen Components:
    Experience_Comments
    Custom:
    Experience__c
    Screen Components:
    Experience
    Custom:
    Leadership_Skills_Comments__c
    Screen Components:
    Leadership_Skills_Comments
    Custom:
    Leadership_Skills__c
    Screen Components:
    Leadership_Skills
    Custom:
    Reason_Recommended__c
    Screen Components:
    Reason_Recommended
    Custom:
    Recommend_for_Hire__c
    Screen Components:
    Recommend_for_Hire

Verify that your screen looks something like this.

Map fields to their values for the Create Records component of the Flow

6. Click Done.

7. Connect the New Review screen element to the createReview element by clicking and holding the New Review circle and then dragging your cursor to the createReview element.

Add Screen Elements

Next, add a screen element to display a success message.

  1. Drag Screen from the palette onto the flow window.
  2. For Label, enter Record Created. (The API Name field will default.)
  3. Click Display Text under Display on the left.
  4. For API Name, enter RecordCreated.
  5. In the text box enter Your review record has been created successfully. Leave the Insert a resource field above the text box empty.
  6. Click Done.
  7. Connect the createReview element to the Record Created element.

Next, add a screen element to display faults for data elements.

  1. Drag Screen from the palette onto the flow window.
  2. For Label, enter Display Faults. (The API Name field will default.)
  3. Click Display Text under Display on the left.
  4. For API Name, enter Display_Fault_Message.
  5. Click the Insert a resource.. box and select SFlow under Global Variables.
  6. Next, select FaultMessage, and click Done.
  7. Connect the createReview element to the Display Faults element.
  8. Verify that your Flow looks something like this. 

Final Flow visual

  1. Click Save.
  2. For Flow Label, enter New Review.
  3. Let the Flow API Name field default.
  4. Select Screen Flow for Type.
  5. Click Save.
  6. Click Back.
  7. Click New Review under Name.
  8. Click Activate next to your Flow version.

Deploy the Flow

Now that the New Review Flow is set up, create a custom button for launching it.

  1. From Setup, click Object Manager and select Job Application.
  2. Click Buttons, Links, and Actions.
  3. Select New Button or Link.
  4. For Label, enter New Review.
  5. Select Detail Page Button as the display type.
  6. Paste this link into the text box just above the Check Syntax button:
    /flow/New_Review?varJobAppId={!Job_Application__c.Id}&retURL=/{!Job_Application__c.Id}
  7. Click Save, then click OK on the popup.

Now add the New Review button to the page layout.

  1. While still viewing Job Application in Object Manager, click Page Layouts.
  2. Click Down arrow next to Job Application Layout and select Edit.
  3. Click Buttons in the page layout editor.
  4. Drag the New Review button to the Custom Buttons section of the Job Application Detail.     Job Application page layout editor showing the New Review custom button in the Job Application Detail section.
  5. Click Save.

By setting up processes, creating an approval process, and building a flow, you’ve automated a number of tasks for the recruiting team. With less busy work to take care of, the team can spend more of their time on the important task of finding the best candidates for the open positions at AW Computing. Well done!

retargeting