Map attributes to parameters

We have made connections between units in the pipeline, but we still need to map data between the units. We use the Mapping editor to make these mappings.

Mapping between Request and findVariantById

We first map the value of variant_id in the Request unit to a path parameter in the data source findVariantById.

Click the findVariantById unit to open the Mapping editor. Notice two columns. On the left is the available attributes n the source unit, in this case the Request unit. On the right are available parameters in the destination unit, in this case the findVariantById unit.

To make the mappings, simply drag variant_id from the Request unit to the Set formula button under the path object variant_id in the destination unit.

First mapping

Notice the Data Sample preview window. This shows the mapping to be a reference path.

request.path.variant_id

Click Done to save the changes and close the Mapping editor.

Mapping between findVariantById and findEngineById

Next we map the vehicle variant vehicle_id in the data source findVariantById to the engine IDengine_id in findEngineById.

The body attributes for the findVariantById unit are within an object indicated by the curly braces { }. Within this object is an extras array indicated by square brackets [ ]. The data types of the remaining attributes are indicated by <string>. <integer> and <number>.

Search in the list of attributes for engine_type_id and drag it to the Set formula button under the path object containing engine_id.

The findEngineById unit shows only one empty field for a path parameter. It expects an input value for the path parameter engine_id.

Second mapping

Notice the Data Sample preview window. This shows the mapping to be a reference path.

findvariantbyid.body.engine_type_id

Click Done to save the mapping and close the Mapping editor.

Mapping between findVariantById and findModelById

We now map the attribute model_idin the findVariantById unit to the parameter model_id in findModelById unit.

Search in the list of attributes for model_id and drag it to the Set formula button under the path object containing model_id.

The findModelById unit shows only one empty field for a path parameter. It expects an input value for the path parameter engine_id.

Third mapping

Notice the Data Sample preview window. This shows the mapping to be a reference path:

findvariantbyid.body.model_id

Click Done to save the mapping and close the Mapping editor.

Next step
Next step

To continue, see Map parameters to endpoint.