Passthrough
The Passthrough feature enables data to be reused along an integration flow. In general every step in a flow has input data and output data. The output data from each step may be very different from the input. At the end of a complex flow the data may look vastly different how it started. When the Passthrough feature is used, the changing data continues to be passed through the flow, but the Input data for each step is also "passed through" unchanged. This means that at any step, you can choose to use any previously sent data in addition to the default input data for that step.
For example, data received by Step 4 will contain the message sent by Step 3, and a special section with the messages received by Step 1, Step 2 and Step 3.
Using the passthrough feature
The ability to access the full data set for a flow on different steps and combine them into one outgoing message is an important advantage for many integration use-cases. Here are some scenarios where the passthrough feature makes a significant difference:
-
Retrieving data from multiple external resources and combining it into one outgoing message for storage.
-
Retrieving related data from the same source that cannot be retrieved by a single trigger due to limitations of the third party API abilities.
In both examples, without the Passthrough feature you would need to use multiple integration flows and somehow synchronize the information between them.
A good example of this is seen when you look at the process of created Salesforce order from Amazon MWS order data:
-
When we query the list of orders (
listOrders
) from Amazon MWS we get information about orders such as IDs, the total amount of orders, shipping information, etc. But this answer does not include information about specific items included in those orders (listOrderItems
). -
To get the items (
listOrderItems
) we need to store the order IDs and then use them to query the items belonging to those orders. -
Then we need to combine both: orders (
listOrders
) and items (listOrderItems
) together to store this information into Salesforce. But, without having the order IDs, we can not get item IDs.
Using the Passthrough feature we can get the listOrders
and listOrderItems
in two separate steps and then merging the data sets.
Let’s take a look at how to build this flow:
-
Get a list of orders.
-
Split the list by order:
-
Get items for the orders:
-
Use the Passthrough feature to access the orders retrieved in Step 2 by update date:
-
Use the Passthrough feature to get the order items retrieved in Step 3 and adds on the scheduled delivery date, shipping date, item price and quantity of ordered items: