After the future removal of the classic playbook editor, your existing classic playbooks will continue to run, However, you will no longer be able to visualize or modify existing classic playbooks.
For details, see:
Use decisions to send artifacts to a specific downstream action with the classic playbook editor
Use a Decision block to change the flow of artifacts by performing IF, ELSE IF, or ELSE functions. When an artifact meets a True condition, it is passed downstream to the corresponding block in the playbook flow. If none of the Decision block conditions are met, the playbook run fails.
In this example, IP addresses found in artifacts are compared against some specific IP address ranges:
- If an IP address is in the 192.168.* range, perform an IP reputation lookup, ELSE IF
- The IP address is in the 172.16.* range, grant access to the user, ELSE
- If the IP address doesn't fall into either of the previous categories, perform a
geolocate ip
action.
The first time an artifact meets a condition, it is passed along to the corresponding downstream block. The artifact is no longer available for evaluation by other ELSE IF or ELSE statements, and cannot be passed to other downstream blocks. You can only perform one action on an artifact based on the condition that is matched first.
Unlike Filter blocks, no named datasets are created for reference later on in the playbook.
Create a Decision block in your playbook
To create Decision block, perform the following tasks:
- Drag the half-circle icon attached to any existing block in the editor.
- Select Decision from the list of block types.
- Click the Select Parameter field and select the parameter you want to compare. Parameters are made available to the Decision block by upstream blocks.
- Click the == field and select an operator for the decision.
- Click the Select Value field and select the value you want to match. See Example of creating decisions for multiple downstream actions for an example of how these fields all work together.
- (Optional) Click Add Else If to create another matching condition for the decision.
- Click Add Else to create the final branch for the decision.
Example of creating decisions for multiple downstream actions
Decision blocks control the program flow based on comparisons of artifact data, notable properties, date functions, and action results. Create if
and else if
conditions to branch to multiple downstream blocks as a results of the comparisons.
In the following example, start with a Decision block that checks to see if any artifacts are in the notable. The image shows a decision block in the playbook editor.
- Drag the half-circle icon attached to any existing block in the editor.
- Select Decision from the list of block types.
- In the If field, click the Select Parameter field and select a parameter to evaluate. You can choose from the properties provided by the container, event data, date and time options, and custom lists.
- Select container properties from the list of options, and then click artifact_count as the property you want to evaluate.
- Select > as the operator, and enter 0 in the Select Value field.
The blue circle next to the If section corresponds with the blue connector dot on the side of the decision block. All data is passed on to the next block.
Example of creating decisions with multiple statements
You can create more complex decision blocks with up to five statements. For example, you can perform a geolocate ip
action on a source IP address and block the IP if the country is from North Korea. Otherwise, you can perform an ip reputation
action on the IP address, as shown in the following screenshot:
Each subsequent statement and downstream block is color coded: blue marks the path of the If statement, and red marks the path of the Else statement. Each statement has its own and only one downstream block.
Use filters to separate artifacts before further processing with the classic playbook editor | Customize the format of your playbook content using the classic playbook editor |
This documentation applies to the following versions of Splunk® SOAR (On-premises): 5.1.0, 5.2.1, 5.3.1, 5.3.2, 5.3.3, 5.3.4, 5.3.5, 5.3.6, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.3.0
Feedback submitted, thanks!