Skip to main content

Build the Orchestration

Learning Objectives

After completing this unit, you’ll be able to:

  • Build a simple orchestration using Flow Orchestration.
  • Assign flows to a step.
  • Assemble steps to create a stage.

Follow Along with Trail Together

Want to follow along with an expert as you work through this step? Take a look at this video, part of the Trail Together series.

(This clip starts at the 41:56 minute mark, in case you want to rewind and watch the beginning of the step again.)

Let’s Build the Orchestration

All our flows are built. We’ve identified our steps and stages. Now it’s time to put our orchestration together!

To create this orchestration:

  1. From Setup, enter Flows in the Quick Find box, then select Flows.
  2. Click New Flow.
  3. Select All + Templates.
  4. Select Flow Orchestration.
  5. Select Record-Triggered Orchestration.
    We chose this option because we want the orchestration to start when the position record is created.
  6. Click CreateGraphic representation of building the orchestration
  7. From the canvas, click Edit on the Start element.
  8. For Object, select Position.
  9. For Trigger the Orchestration When, select A record is created.
  10. For Condition Requirements, select All Conditions Are Met (AND).
  11. For Field, select Status__c.
  12. For Operator, select Equals.
  13. For Value, select New.The completed Start screen corresponding to the previous steps
  14. Click Save.
  15. For Orchestration Label, enter Recruiting Orchestration - Exercise.
  16. For Description, enter Candidate recruiting process from initial screening to offer of employment.
  17. Click Save.

Add a Stage

Next, we add our first stage, Recruiter Screening.

  1. On the path after the Start element, hover over Add Element and click Add Element.The Add Element menu, with the Stage and Decision options
  2. Click Stage.
  3. For Label, enter Recruiter Screening. The API Name is automatically updated to Recruiter_Screening.
  4. For Description, enter Recruiter screening including entering the job application, scheduling and conducting the recruiter phone screen.
  5. For Set Exit Condition, select When all steps have been marked Complete the stage is marked Complete.
    The completes new Stage screen corresponding to the previous steps
  6. Click Save and click back on the canvas.Graphic depiction for the preceding steps

Add the First Step to the Stage

Now that we have our stage, it’s time to add our steps. In the previous unit, we identified three steps for this stage.

  • Enter the job application
  • Schedule the phone screen
  • Conduct the phone screen
  1. In the Stage element, click Add Step.The Add Step element is added to the canvas
  2. Click Interactive Step.
  3. For Label, enter Create a job application. The API Name is automatically updated to Create_a_job_application.
  4. For Description, enter Screen flow to create a job application.
  5. For Set Entry Condition, select When the stage starts, the step starts.
  6. Click in the Flow field and select the Enter Job Application flow.
  7. For Set Input Values, click in VarPositionId to select $Record > Id (the field automatically updates to {!$Record.Id}.
    Use values from earlier in the flow to set the input variables for the referenced flow. Here we’re retrieving the Position ID for the job application we're creating.
  8. Click in Specify Record Page to select $Record > Record Id.
    We use this setting to link the specified record page to all assigned users. Work is completed in the Orchestration Work Guide component on the specified record page.
  9. In the Specify Assigned User section, click in Assignee Type field to select User Resource.
    Select User Resource to specify a resource that contains a user’s username when the orchestration runs.
  10. Click in User Resource to select $Record > Owner (User) > Username.
    When you use the Username option, you'll see a list of available users in the org. This ensures that the user creating the Position record is identified as the recruiter. They will be assigned the appropriate work item immediately after the record is created. You want to avoid using hard coded user names in any automation.
  11. For Set Exit Condition, select When the assigned user has completed the screen flow, the step is marked Complete.
    The completed Add Step screen corresponding to the previous steps
  12. Click on the canvas.

Add the Second Step to the Stage

  1. Click Add Step.
  2. Select Background Step.
  3. For Label, enter Notify candidate. The API Name is automatically updated to Notify_candidate.
  4. For Description, enter Notify candidate of screen.
  5. For Set Entry Condition, select When another step is marked Complete, the step starts.
  6. Select Create a job application as the Step Name.
  7. Click in the Flow field and select the Interview Email Notification flow.
  8. Under Set Input Values, click in varCandidateId to select Create_a_job_application > Outputs >varCandidateId.
    This uses a variable from a previous step (Create_a_job_application) as an input for the current step (Notify_candidate) to link the job with the phone screen.
    The completed Add Step screen corresponding to the previous steps
  9. Click the canvas.

Add the Third Step to the Stage

  1. Click Add Step.
  2. Select Interactive Step. This step is going to ensure that the screen flow shows up in the work guide for the Recruiter.
  3. For Label, enter Recruiter phone screen. The API Name is automatically updated to Recruiter_phone_screen.
  4. For Description, enter Screen flow to screen candidate.
  5. For Set Entry Condition, select When another step is marked Complete, the step starts.
  6. Select Notify candidate as the Step Name.
  7. Click in the Flow field and select the Interview Screen flow.
  8. Under Set Input Values, click in jobApplicationId to select Create_a_job_application > Outputs > VarJobApplicationId.
  9. Click in Specify Record Page to select $Record > Id.
  10. In the Specify Assigned User section, click in Assignee Type field to select User Resource.
  11. Click in User Resource to select $Record > OwnerID (User) > Username.
    The completed Add Step screen corresponding to the previous steps
  12. For Set Exit Condition, select When the assigned user has completed the screen flow, the step is marked complete.
  13. Click on the canvas.

The Recruiter Screening stage is complete! The completed first stage with three steps

Add a Decision

Now it’s time to add the decision. This element performs the equivalent of an if-then statement. IF something is true, THEN take action; otherwise check if something ELSE is true. So, IF the candidate’s score is under 3, THEN they will not proceed in the hiring process. IF the score was greater than or equal to 3, THEN the candidate will be scheduled for an interview with the hiring manager.

  1. Between the Initial Screening Stage and the End element, hover over Add Element and click Add Element.
  2. Click Decision.The Decision screen corresponding to the next steps
  3. For Label, enter Go to next round The API Name is automatically updated to Go_to_next_round.
  4. For Description, enter Will the candidate advance to the next round.
  5. For Label under OUTCOME DETAILS, enter Yes. The API Name is automatically updated to Yes.
  6. For Condition Requirements to Execute Outcome, select All Conditions Are Met (AND).
  7. Click in Resource to select Recruiter_phone_screen > Outputs > #varReviewScore.
  8. For Operator, select Greater Than or Equal.
  9. For Value, enter 3.The candidate will advance if their score is greater than or equal to 3.
  10. You do not need to make any changes to Default Outcome as no conditions are needed.
  11. Click the canvas.

The decision is added to the orchestration.

Note

Click on Default Outcome if you want to change the label to something more descriptive. Enter your desired name in the Label field.

The completed decision as it appears on the canvas

Completed Orchestration

After creating the decision, you add two additional stages: Hiring Manager Interview and Candidate Rejected. The decision element determines which stage is executed. 

Numbered sections of the completed orchestration corresponding to the descriptions that follow.

Hiring Manager Interview Stage (1)

This stage contains two steps. The candidate advances to the hiring manager interview if their overall score from the initial screening is greater than or equal to 3 out of 5. An interview is then scheduled with the Hiring manager (Notify candidate of hiring manager interview Background Step). Now it's up to the hiring manager to conduct the final interview (Hiring Manager review Interactive Step). They also use a screen flow to give their feedback.

Decision (2)

When the rating is submitted, the decision (Make offer) is fired to check if the manager wants to recommend this candidate for hire. 

Candidate rejected Stage (3)

This stage contains only one step. If the candidate is rejected, a background step (Thank you for your interest Background Step) is run to create an automated email. The candidate is informed that their application won’t advance in the hiring process.

Note

When building your orchestration you can avoid process bottlenecks by assigning an interactive step to queue or public group rather than a specific user. All queue or public group members receive an email when the associated work item is created.

Activate the Orchestration

You can have multiple versions of an orchestration in Salesforce, but only one version can be active at a time. 

To activate:

  1. In Flow Builder, open the orchestration version.
  2. On the button bar, click Activate.

If there’s a previous version already activated, it’s deactivated automatically.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities