Understand Dynamic Paths
You can use dynamic paths to retrieve values from a Playbook node or event data. A dynamic path expression is of the form ${_node_number::parameters}
, where <_node_number> indicates the node from where the data is fetched, and <parameters> 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 Playbook node:
${_2::result::fusion_instance::confidence_score}
where:
_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 field confidence_score
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 | Description |
| A dynamic path begins with this indicator. If 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 follow the $ (dollar symbol) and is used to start and end a dynamic path. Example: |
| Square brackets contain the input data when LIST and JSON keywords are used in a dynamic path. Example:
|
| A double colon separates the nested keys in a dynamic path expression. It also determines the depth of the key-value pair to be retrieved using a dynamic path. Example:
|
| Underscore is used as the prefix of a Playbook node number. Example: _1 denotes Node #1 of a Playbook. |
| Asterisk is used to iterate over all the elements of a list and return a list of required values. You can use the following notations to retrieve a specific value from a list: • Use 0 to retrieve the first element from a list • Use 1 to retrieve the second element from a list, and so on Example: You can use * (asterisk) notation in a dynamic path to retrieve all Package IDs from a Packages List:
You can use 0 (zero) notation in a dynamic path to retrieve a Package ID from index 0 of Packages List:
|
Keywords
The following table describes the keywords that you can use in a dynamic path.
Keywords | Description |
__instance__ | _instance_ replaces the specific app instance slug name in the dynamic path and uses the available app instance. Note__instance__ can be used in nodes configured with only one instance. Example: |
result | result keyword retrieves the execution result of a Playbook node. Example: |
io | io keyword retrieves the user input provided in a Playbook input node. Example: |
const | const keyword retrieves the data from a Playbook Memory node. Example: |
$NONE | $NONE keyword provides a None input to a Playbook node. Example: |
$JSON | $JSON keyword can be used to define input in a JSON format. Example: |
$LIST | $LIST can be 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: |