Understand Dynamic Paths
Dynamic paths retrieve values from a playbook node or event data. A dynamic path expression is of the form ${valueof(<node_number>.result.<instance>.<parameter>)}
, where <node_number> indicates the node from where the data is retrieved, and <parameter> indicates the key in a key-value pair.
The syntax of a dynamic path expression varies for different types of nodes in a playbook. For example, the following dynamic path retrieves the confidence_score from the output of a playbook node:
${valueof(2.result.fusion_instance.confidence_score)}
where:
valueof indicates communication between different nodes of a playbook. It is used to retrieve a certain value from a node execution output.
2 indicates that the data is retrieved from the output of playbook node #2.
result indicates that we are fetching the input based on the successful execution result of node #2.
fusion_instance indicates the name of the app instance used in the app-action node.
confidence_score indicates the key of the confidence_score parameter.
Note
A value provided in the input or output field of a playbook node without a dynamic path initiator ${ }
is considered a string.
Notations
The following table describes the notations that can be used in a dynamic path.
Notation | Name | Description |
| Dollar Symbol | A dynamic path begins with this indicator. Suppose the $ symbol is not used at the beginning of a dynamic path expression, then the input value is treated as a string and can result in an unexpected error during a playbook execution. Example:
|
| Curly Brackets | Curly brackets follow the $ (dollar symbol) and is used to start and end a dynamic path. Example:
|
| Square Brackets | Square brackets are used to denote an array of objects. Example:
In the above example, the default values in the array list will be used if the provided dynamic path fails to execute. |
| Asterisk | You can use * (asterisk) notation in a dynamic path to retrieve all Package IDs from values from an object list.
|
Keywords
The following table describes the keywords that you can use in a dynamic path.
Keywords | Description |
| Indicates communication between different nodes of a playbook. It is used to retrieve a certain value from a node execution output. Example:
You can also retrieve values from memory nodes.
|
| Denotes the input data of a playbook. When executing a playbook, valid input data is required to process the execution. Example: In ${pb_input(incident)}, incident is a key in the triggered event data. This retrieves the value associated with the incident key and passes it as input to the playbook or a specific node. |
| Replaces the specific app instance slug name in the dynamic path and uses the default instance of an app. Note__instance__ can be used in nodes configured with only one instance. Example:
|
| Retrieves the execution result of a playbook node. Example:
|
| Retrieves the execution error of a playbook node. Example:
|
| Retrieves the execution status of a playbook node. Example:
|
| Retrieves the metadata of a playbook such as the last playbook run, last successful run, and playbook run readable ID. Example:
|
| Retrieves values from a persistent list storage. Example:
|
| Retrieves the data and time value from the system. Example:
|
| Provides a None input to a playbook node. Example:
|
| Used to define input in JSON format. Example:
NoteIf you provide a dynamic path in the format $JSON(${<dynamic_path>}), the result will be $JSON(the evaluated result of the dynamic path). The $JSON part is considered a string. For example, if you define a list as sample = ['h', 'e', 'l', 'l', 'o'] and use the dynamic path $JSON(${sample[0]}) to retrieve an element from the list, the resulting output will be $JSON(h). |
| Used to specify a list of values as input to a playbook node. If you need an app-action to iterate over the provided list of values to execute the action for each item, then you can specify a list of values as an input. Example:
NoteBy default, the elements inside a list are treated as integers. Therefore, you have to pass the element inside quotes ("") or the str function to make the element a string. |
| Used to specify a default value as an input to a playbook node. The defined default value will be used only if the dynamic path validation fails and the playbook node is unable to fetch the defined input value using the dynamic path expression. Example:
|
| Retrieves all the key-value pairs from a previously executed memory node. Example: ${memory_variable()} |