---
category: [Homepages & Self-Service Sites, Platform and Product Extensions, Platform and Product Extensions/Home Experience, Administration & Integrations, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Orchestration, Orchestration Builder]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Example: Branch On Engagement Score Status
layout: subsection
---

### Scenario

<a id="context_N10045_N10042_N10001"></a>
You want to determine whether the manager's team has an engagement score. If there’s a score, you want to display it. If not, you want to end the orchestration.

### Steps

1.  <a id="step_N10285_N1002C_N1001E_N10001"></a>From the <b>Components</b> panel, drag <b>Branch on Conditions</b> and drop it below the last <b>Create Values</b> component in the <b>IF</b> flow. Select the <b>Branch on Conditions</b> component you just dropped and:
    1.  Double-click <b>BranchonConditions</b> to rename the step to <i>Branch On Engagement Score Status</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>branchOnEngagementScoreStatus</i>.

2.  <a id="step_N10093_N1004E_N10042_N10001"></a>Select <b>IF</b> and enter a <b>Reference Name</b> of <i>ifEngagementScoresOK</i>.
3.  <a id="step_N100A8_N1004E_N10042_N10001"></a>Click <b>Edit Properties</b> to set up the component.
    1.  Delete the existing `true` boolean.
    2.  Click the <b>Add condition for value</b> icon and enter these values:

<table><thead></thead><tbody><tr><td><b>Value</b></td><td>Click the <b>+</b> icon and select <b>Data from Orchestration Steps</b> &gt; <b>CREATE VALUES createEngagementStatus</b> &gt; <b>engagementStatus</b>.</td></tr><tr><td><b>Condition</b></td><td>Select <b>Is equal to</b>.</td></tr><tr><td><b>Value</b></td><td>Click the <b>+</b> icon and type <i>ok</i>, then select <b>Add string "ok"</b>.</td></tr><tr><td><b>If conditions are true</b></td><td>Click the <b>+</b> icon and type <i>true</i>, then select <b>Add boolean true</b>.</td></tr><tr><td><b>If conditions are false</b></td><td>Click the <b>+</b> icon and type <i>false</i>, then select <b>Add boolean false</b>.</td></tr></tbody></table><br/>


4.  <a id="step_N1015E_N1004E_N10042_N10001"></a>Click <b>Save</b>.
5.  <a id="step_N1016B_N1004E_N10042_N10001"></a>Click <b>Save Changes</b>, then click <b>Close</b>.
6.  <a id="step_N10130_N1005E_N10042_N10001"></a>From the <b>Components</b> panel, drag <b>Create Values</b> and drop it into the <b>IF</b> flow of the <b>Branch On Engagement Score Status</b> component. Select the <b>Create Values</b> component you just dropped and:
    1.  Double-click <b>CreateValues</b> to rename the step to <i>Create Engagement Score</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>createEngagementScore</i>.
    3.  Click <b>Edit Properties</b>.

7.  <a id="step_N1016E_N1005E_N10042_N10001"></a>Enter these values:

<table><thead></thead><tbody><tr><td><b>Type</b></td><td>Number</td></tr><tr><td><b>Key</b></td><td><i>engagementScore</i></td></tr><tr><td><b>Value</b></td><td><ul><li>    Click the <b>+</b> icon and select <b>Data from Orchestration Steps</b> &gt; <b>SEND HTTP REQUEST getEngagementStatus</b> &gt; <b>response</b>.
</li><li>    Hover over <b>getEngagementStatus.response</b>, click the <b>fx</b> icon, and select <b>numberAtJsonPath</b>.
</li><li>    Click the <b>+</b> icon in the <b>numberAtJsonPath</b> function and enter <code>$.data.attributes.scores.mean</code>.
</li><li>    Hover over <b>numberAtJsonPath</b>, click the <b>fx</b> icon, and select <b>toString</b>.
</li><li>    Hover over <b>toString</b>, click the <b>fx</b> icon, and select the <b>substring</b> function that has both a start and end parameter.
</li><li>    In the <b>substring</b> function, hover over <b>start</b>, click the <b>+</b> icon, enter <i>0</i>, and select <b>Add number 0</b>.
</li><li>    In the <b>substring</b> function, hover over <b>end</b>, click the <b>+</b> icon, enter <i>4</i>, and select <b>Add number 4</b>.
</li><li>    Hover over <b>substring</b>, click the <b>fx</b> icon, and select <b>toNumber</b>.
</li></ul></td></tr></tbody></table><br/>

8.  <a id="step_N1029A_N1004E_N10042_N10001"></a>Click <b>Save Changes</b>, then click <b>Close</b>.
9.  <a id="step_N102B5_N1004E_N10042_N10001"></a>Drag the <b>Workday Home Card</b> component to the bottom of the <b>IF</b> flow. Select the <b>Workday Home Card</b> component and:
    1.  Double-click <b>CreateWorkdayHomeCard</b> to rename the step to <i>Peakon Manager Engagement Card</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>peakonManagerEngagementCard</i>.
    3.  Click <b>Edit Properties</b>.

10. <a id="step_N102EF_N1004E_N10042_N10001"></a>Enter these values:

<table><thead></thead><tbody><tr><td><b>Source</b></td><td><i>Peakon</i></td></tr><tr><td><b>Title</b></td><td><ul><li>    Click the <b>+</b> icon and enter <i>Your team's most recent Peakon Engagement Score is:</i>.
</li><li>    Click the <b>+</b> icon and select <b>Data from Orchestration Steps</b> &gt; <b>CREATE VALUES createEngagementScore</b> &gt; <b>engagementScore</b>.
</li><li>    Click the <b>+</b> icon and enter <i>!</i>.
</li></ul></td></tr><tr><td><b>Subtitle</b></td><td>Enter a space and select <b>Add string " "</b>.</td></tr><tr><td><b>Link</b></td><td><i>https://app.peakon.com/dashboard</i></td></tr><tr><td><b>Link Text</b></td><td><i>Review Your Manager Dashboard Here</i></td></tr></tbody></table><br/>

11. <a id="step_N10387_N1004E_N10042_N10001"></a>Click <b>Save Changes</b>, then click <b>Close</b>.
12. <a id="step_N103A6_N1004E_N10042_N10001"></a>From the <b>Components</b> panel, drag <b>Treat as JSON</b> and drop it below <b>Create Workday Home Card</b> in the <b>IF</b> flow. Select the <b>Treat as JSON</b> component you just dropped and:
    1.  Double-click <b>TreatasJSON</b> to rename the step to <i>Manager Engagement JSON</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>managerEngagementJSON</i>.
    3.  Click <b>Edit Properties</b>.

13. <a id="step_N103E8_N1004E_N10042_N10001"></a>Enter these values.
    1.  Click the <b>+</b> icon and select <b>Data from Orchestration Steps</b> &gt; <b>Create Workday Home Card</b> &gt; <b>card</b>.
    2.  Click <b>Save Changes</b>, then click <b>Close</b>.

14. <a id="step_N1017A_N1004E_N10042_N10001"></a>From the <b>Components</b> panel, drag <b>Create Values</b> and drop it into the <b>ELSE</b> flow. Select the <b>Create Values</b> component you just dropped and:
    1.  Double-click <b>CreateValues</b> to rename the step to <i>End Flow If No Score</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>endFlowIfNoScore</i>.
    3.  Click <b>Edit Properties</b>.

15. <a id="step_N101B8_N1004E_N10042_N10001"></a>Enter these values:

<table><thead></thead><tbody><tr><td><b>Type</b></td><td>String</td></tr><tr><td><b>Key</b></td><td><i>endIfNoScore</i></td></tr><tr><td><b>Value</b></td><td>Click the <b>+</b> icon and enter a single space, then select <b>Add string " "</b>.</td></tr></tbody></table><br/>

16. <a id="step_N104B1_N1004E_N10042_N10001"></a>Click <b>Save Changes</b>, then click <b>Close</b>.
17. <a id="step_N10220_N1004E_N10042_N10001"></a>From the <b>Components</b> panel, drag <b>Treat as JSON</b> and drop it below <b>CREATE VALUES</b> in the <b>ELSE</b> flow. Select the <b>Treat as JSON</b> component you just dropped and:
    1.  Double-click <b>TreatasJSON</b> to rename the step to <i>End Flow If No Score JSON</i>.
    2.  On the <b>Properties</b> panel, enter a <b>Reference Name</b> of <i>endFlowIfNoScoreJSON</i>.

18. <a id="step_N10262_N1004E_N10042_N10001"></a>Click <b>Edit Properties</b>.
    1.  Click the <b>+</b> icon and select <b>Data from Orchestration Steps</b> &gt; <b>Create Values endFlowIfNoScore</b> &gt; <b>endIfNoScore</b>.
    2.  Click <b>Save Changes</b>, then click <b>Close</b>.



### Result

<a id="result_N103E4_N10042_N10001"></a>
If a team has no engagement score, the orchestration ends. If the team has an engagement score, display it on a custom Workday Home Card.

