Skip to main content
Free Agentforce workshops and AI Certifications: Learn more. Terms and conditions apply.

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. Make sure Start from Scratch is selected, and click Next.
  4. Select Record-Triggered Orchestration.
    We chose this option because we want the orchestration to start when the position record is created.
  5. Click Create
    Graphic representation of building the orchestration
    From the canvas, you will automatically be in edit mode for the Start element. You will see the options on the right side. If not, click Edit on the Start element.
  6. For Object, select Position.
  7. For Trigger the Orchestration When, select A record is created.
  8. For Condition Requirements, select All Conditions Are Met (AND).
  9. For Field, select Status__c.
  10. For Operator, select Equals.
  11. For Value, select New.
    The completed Start screen corresponding to the previous steps
  12. Click Save.
  13. For Orchestration Label, enter Recruiting Orchestration - Exercise.
  14. For Description, enter Candidate recruiting process from initial screening to offer of employment.
  15. Click Save.

Add a Stage

Next, we add our first stage, Recruiter Screening.

  1. On the path after the Start element, click Add Element.

The Add Element menu, with the Stage and Decision options

  1. Click Stage.
  2. For Label, enter Recruiter Screening.
    The API Name is automatically updated to Recruiter_Screening.
  3. For Description, enter Recruiter screening including entering the job application, scheduling and conducting the recruiter phone screen.
  4. For Select When to Complete the Stage, select When all steps have been marked Complete, the stage is marked Completed.
    The completed new Stage screen corresponding to the previous steps.
  5. Click Save and then click the X in the upper right corner to close the Edit window for the stage.
    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 when clicked, shows three options 1.Background Step, 2. Interactive Step, and 3. MuleSoft Step.
  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 Select When to Start the Step, select When the stage starts, the step starts.
    Shows the Label, API Name, Description, and Condition fields filled in with the information above.
  6. For Select an Action to Run, click in the Action field and select the Enter Job Application flow.
  7. For Set Input Values for the Selected Action, click in varPositionId to select Triggering Position__c > 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.
    Shows the Action and varPositionId fields filled in with the information above.
  8. In the Select Someone to Complete the Action section, click the Assignee Type field and select User Resource.
    You use User Resource to specify a resource that contains a user’s username when the orchestration runs.
  9. Click the User Resource field to select Triggering Position__c > Owner ID (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.
    Shows the Assignee Type and User Resource fields filled in with the information above.
  10. In the Select Where to Complete the Action section, click the Related Record ID field and select Triggering Position__c > Record ID.
    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.
  11. For Select When to Complete the Step, select When the assigned user has completed the screen flow, the step is marked Completed.
    Shows the Related Record ID and Condition fields filled in with the information above.
  12. Click the X in the upper right corner to close the edit mode for this step.

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 Select When to Start the Step, select When another step is marked Complete, the step starts.
  6. Select Create a job application as the Step Name.
  7. In the Select an Action to Run section, click the Action field and select the Interview Email Notification flow.
  8. Under Set Input Values for the Selected Action, click in varCandidateId to select Recruiter Screening > 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 Background Step screen corresponding to the previous steps.
  9. Click the X in the upper right corner to close the edit mode for this step.

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 Select When to Start the Step, click the Condition field and select When another step is marked Complete, the step starts.
  6. Select Notify candidate as the Step Name.
    Shows the Label, API Name, Description, Condition and Step Name fields filled in with the information above.
  7. In the Select an Action to Run section, click the Action field and select the Interview Screen flow.
  8. Under Set Input Values for the Selected Action, click the jobApplicationId field and select Recruiter Screening > Create a job application > Outputs > varJobApplicationId.
    Shows the Action and jobApplicationId fields filled in with the information above.
  9. In the Select Someone to Complete the Action section, click the Assignee Type field and select User Resource.
  10. Click the User Resource field and select Triggering Position__c > Owner ID (User) > Username.
  11. In the Select Where to Complete the Action section, click the Related Record Id field and select Triggering Position__c > Record ID.
  12. In the Select When to Complete the Step section, click the Condition field and select When the assigned user has completed the screen flow, the step is marked complete.
    Shows the Assignee Type, User Resource, Related Record ID, and Condition fields filled in with the information above.
  13. Click the X in the upper right corner to close the edit mode for this step.

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 Recruiter Screening Stage and the End element, 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 X in the upper right corner to close the edit mode for this step.
  12. Click Save. You may see warnings that pop-up, you can close these for now.

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

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback