Skip to content

Input mapping

Scenarios are data centric. Either incoming event serves as an input to a scenario, or steps can fetch data from external systems and then pass the data to next steps.

image.png

Input of each step consists of mapped values along with standard fields. Standard fields include results of previous steps, along with current/previous step metadata, scenario inputs, and scenario metadata. We call it “Step Context”.

A list of standard fields is shown in the table below.

Field nameDescription
steps[‘step-id’]an object containing information about step with the given ID
**steps[‘step-id’].**inputsinputs of the previous step
steps[‘step-id’].outputsoutputs of the previous step
steps[‘step-id’].labellabel of the previous step
steps[‘step-id’].typetype of the previous step
scenarioan object containing scenario metadata
scenario.instance_idID of the current scenario instance
scenario.inputsinputs of the current scenario instance

👉 Template syntax is based on Jinjava: https://github.com/HubSpot/jinjava

Steps may have input parameters. Input parameters values are defined by input mappings. Input mapping is a JSON Schema, which determines how values from the step context are mapped into step input fields.

For example, the following input mapping:

{
"message_body": "{{steps['81e91f5f-f6ea-4d11-b504-bba0627b0c0e'].outputs.name}}"
}

Tells the platform to take attribute “name” from the given step and use it as a value for the “message_body” input parameter of the current step.

Default interpolation result when nothing else can’t be inferred is string.

So this means the following mapping:

{
"message_body": "hello"
}

And this one:

{
"message_body": "\"hello\""
}

Will return the same value.