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. Click the App Launcher (App Launcher).
  2. In the Search apps and items box, enter auto and then select Automation.
  3. In the Flows panel, click New.
    The New Automation window with the Search automations field highlighted.
  4. In the Search automations box, enter orch.
  5. Select Record-Triggered Orchestration.
    We chose this option because we want the orchestration to start when a Position record is created.
    The orchestration’s Start element on the canvas.
    From the canvas, you will automatically be in edit mode for 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.
  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, click in varPositionId and 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. Select User Resource to specify a resource that contains a user’s username when the orchestration runs.
  9. Click the User Resource field and 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.
    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.
  11. For Select When to Complete the Action, select When the assigned user has completed the action, 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. For Step Name, select Create a job application.
  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, click in varCandidateId and 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. For Step Name, select Notify candidate.
    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, 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 action, the step is marked Completed.
    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. Under OUTCOME DETAILS, for Label, 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 and select Recruiter Screening > 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. Under OUTCOME ORDER, click Default Outcome.
  11. For Label, enter No.
  12. Click the X in the upper right corner to close the edit mode for this step.
  13. Click Save. You may see warnings that pop-up, you can close these for now.
  14. Click Activate.
    This button makes the orchestration available to the Work Guide component, which you configure in the next unit.

The completed decision as it appears on the canvas

Completed Orchestration

Great job so far! There’s a lot more to do in order to have a complete working orchestration. We’ve already done that work for you in the orchestration called Recruiting Orchestration.

But before you dive into the hands-on challenge, let’s look at that additional work. After creating the decision, we added 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) checks 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) runs 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. So if you’ve made changes to your orchestration, follow these steps.

  1. Click Save As New Version.
  2. Click Save.
  3. Click Activate on the button bar.

The Activate button activates the current version and automatically deactivates any previous version that’s already activated.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires