Artisan SVG > Branch (branch) (hierarchy-1)

Branch
1.3

Set multiple branches based on multiple outcomes with the Branch core connector

Overview
Copy

There will be times when using the simple yes/no logic of a Boolean connector will not suffice, and you will need to set multiple pathways depending on the results being picked up from your data.

This is where the Branch connector comes in!

Please be aware that the Branch connector is not a parallel processing connector!

If you want to set up asynchronous parallel processing to increase workflow efficiency, please see the guide to using callable workflows in our 'Processing data and scaling' section

Example - creating branches depending on support ticket type
Copy

The below workflow illustrates an example whereby you have received a support ticket as a trigger:

Step 1 - set the Value to Test
Copy

You will see that the Value to Test for the Branch connector is set as $.steps.trigger.body.info.task_type

Note that the value you are checking for here will depend on the data that is sent by the webhook / trigger / service connector. It could, for example, be $.steps.trigger.body.info.ticket_type or $.steps.trigger.body.data.task-category etc.

Step 2 - name the branches
Copy

You will also see that the branches are named according to the different types that the ticket might be - new, escalate, resolve, deescalate.

You can then set each branch to take the appropriate action according to the ticket type. In the above example, as well as creating an SF task for every ticket, the escalate and resolve ticket types also include a notification to Slack - to replicate the idea that you want to make sure people are notified immediately.

Below is a sample output for the trigger, from which you can see that the resolve value was picked from the $.steps.trigger.body.info.task_type jsonpath, thus triggering the resolve branch:

1
{
2
"method": "post",
3
"path": "/",
4
"body": {
5
"info": {
6
"ticket_requester_name": "Ron Jackson",
7
"ticket_organization_name": "Acme",
8
"ticket_title": "Replacement Widgets",
9
"ticket_requester_email": "rjackson@acme.com",
10
"task_type": "resolve",
11
"urgency": "",
12
"ticket_requester_org_id": "3345234554",
13
"ticket_id": "4567",
14
"service_plan": "plan_inactive",
15
"ticket_account": "Central Command",
16
"ticket_url": "http://centralcommand.zendesk.com/agent/tickets/4567",
17
"pd_incident_id": ""
18
},
19
"query": {},
20
"headers": {
21
"x-real-ip": "10.x.xxx.x5",
22
"user-agent": "Zendesk URL Target (centralcommand)",
23
"accept": "*/*",
24
}
25
}