Engage Voice | Using the Branch tool

The Branch tool allows you to create conditional workflows within your script. This means that if you need to display different options to agents based on their selections earlier in the script, you can use the Branch tool to outline your  conditions, set up alternate workflows for the agents to choose from, and configure the triggers that put them into action. 
 
Now, in order to set up branching, you must have two or more sets of conditional workflows you wish to implement.

Using branching in a script

Say you’re a seller that offers different services to customers based on their geographical location, and you segment these locations into East Coast, West Coast, and central regions. 
 
An agent on a call with a lead might get through the preliminary actions on a script, then ask the lead where they’re located. You can then have them input that information into the script however you prefer — let’s say they select a region via a set of checkboxes or from a dropdown menu. 
 
At this point, you’d want the agent to refine their sales pitch according to the lead’s location. This is where the Branch tool comes in. You can create three pages of product options — one for each region — and then place the Branch tool right before them.
 
Configure the Branch tool to switch to the appropriate page depending on any condition — or data point — you choose. In this case, you’d use custom tags that reference the region the agent selected earlier in the script via that checkbox or dropdown menu. 

You can create a case of branching statements that contains one or more conditions, beginning with an If statement and ending with a Then statement. A simple, single conditional statement in a case might read:

If {{model.lead.state}} Equals {{model.model.region1}}

Then, go toPage_2

But let’s say you want to add an extra comparison-based condition to this statement. 
 
What if you only want to proceed to the region-based page if the lead has expressly consented to continuing the sales call? Perhaps you had the agent click a button earlier in the script that recorded the lead’s consent (or lack thereof). 

You can use the Add comparison feature located at far right to add an and/or condition to your case. Following the example above, you’d use the and option to add an additional consent-based conditional statement to the case. Now the statement might read something like this:

If {{model.lead.state}} Equals {{model.model.region1}} 

and

{{model.model.consent}} Equals {{model.model.consent#yes}} 

Then, go toPage_2

You can add additional cases, remove existing cases, or even use custom JavaScript to hardcode your own conditions into the script. 
 
Let’s get you started on your own branching with these steps below:
1. Drag the Branch tool from the toolbar onto the canvas 
2. Connect the Branch tool to the appropriate tools (please note that certain subsequent options will not appear until this step is completed) 
3. Click Edit to enter the Branch tool’s configuration window
4. Name your tool using the Tool Name field at upper right
5. Create a conditional If statement using the supplied logic functions:

a. Choose a tag for the beginning of your If statement

b. Select an equal or unequal value from the Equals dropdown menu

c. Choose a tag for the end of your If statement

6. Click the Add comparison setting at far right if you wish to add an and/or comparison to the If statement you just created

a. Select if you want to make your comparison an and or an or statement

b. Choose a tag for the beginning of your and/or comparison statement

c. Select an equal or unequal value from the Equals dropdown menu

d. Choose a tag for the end of your and/or comparison statement

e. Repeat if additional comparisons are desired

7. Choose an action for your Then statement (using the Then, go to setting at bottom left). Please note that you will not see any options here until you connect your tool to the pages/tools you wish to direct users to, as noted above in Step 3
8. If desired, add a new case using the Add Case setting at far right and repeat the steps above as needed
9. Be sure to connect your Branch tool to the appropriate tools that follow it (your alternate workflows, as discussed above)
10. Don’t forget to preview your script and save your changes!
If you prefer to hardcode your branching conditions yourself, toggle on the Show Advanced Mode button (located at bottom left) and use the JavaScript editor to enter your code. Please note that when you open the editor there will already be some sample code pre-populated — feel free to insert your own variables into the existing code or alter as needed.
© 1999-2022 RingCentral, Inc. Tous droits réservés.
Thanks!
We've sent you a link, please check your phone!
Please allow a full minute between phone number submissions.
There was an issue with SMS sending. Please try again. If the issue persists, please contact support.