Template Syntax

There are many input fields on actions that allow for including data from the current state of the process data. This makes it possible to apply specific values from the process data to logs, actions, and reports. Use the "${}" syntax to insert a value from the process data into the field. Most action fields make use of this template syntax. Typing "$" into an action field will cause a typeahead selector to appear which shows all the possible lookup keys that are available at that point in the data flow.

Consider a data flow which begins with a LISTEN action. Suppose that this endpoint will be called thousands of times per hour. If the action has a generic label like "Process Record" it will be impossible to find any individual inbound request log for debugging purposes. Instead, it would be more useful to use a template on the label which references the process data of each request. Use the template "Process Record: ${record.id}" as the label to tell the processor to look at the data submitted to the endpoint for an object called "record" and find a property on that record called "id".

Template Examples

Simple Syntax

# process data
{"value": "BIRD"}

# template
this is the ${value}, sir

# output
this is the BIRD, sir

Look up a path using dot notation

# process data
{"a": {"b": {"c": "CHERRY" } } }

# template
this is the ${a.b.c}, sir

# output
this is the CHERRY, sir

Look up a path using bracket syntax

# process data
{"a": {"b": {"c": "APPLE" } } }

# template
this is the ${a[b][c]}, sir

# output
this is the APPLE, sir

Look up a path where the keys have unusual characters

# process data
{"thing:a": {"thing%b": {"thing@#$c": "SOUP" } } }

# template
this is the ${thing:a.thing%b.thing@c}, sir

# output
this is the SOUP, sir

Multiple keys can be referenced in the same template

# process data
{"a": "HAPPY", "b": "DAYS" }

# template
I anticipate ${a} ${b} are in your future.

# output
I anticipate HAPPY DAYS are in your future.