PLANNED- see the Workarounds section below.
Converger is a counterpart of the Router module. It enables you to merge several routes into one:
In some cases, the routes after the Router module might contain completely identical sequences of modules - a common sequence:
In this case, you could use the Converger module to merge the two (or more) routes into one and connect the common sequence after it:
Until the Converger module is released, you may use one of the following workarounds to avoid the duplication of the common sequence.
- Add an extra filter-free route to the Router to connect the common sequence (the one you would put after the Converger module).
- Add Data store > Add/replace a record modules at the end of each Router's route (except the new extra route) to store the data outputted by the modules on the route that should be passed to the common sequence. The Data store would contain just one record, the record's key can be e.g. "MyKey".
- Add Data store > Get a record module at the beginning of the common sequence to obtain the previously stored data.
If you wish to avoid the use of the Data store you can:
- Instead of the Data store > Get a record module use JSON > Create JSON module followed by Tools > Set variable to store the resulting JSON in a variable (e.g. "MyBundle").
- Instead of the Data store > Get a record module use Tools > Get variable to obtain the previously stored variable followed by JSON > Parse JSON.
Please note that if no route is executed, the JSON > Parse JSON will throw the following error:
To avoid this, you may employ the
ifempty() function as show below:
If it is just a single value that you need to pass to the common sequence (e.g. ID), you can employ only the Tools > Set variable and Get variable modules.
A separate new scenario
You may also place the common sequence to a separate new scenario and then:
- Employ HTTP > Make a request module at the end of each route to pass the data to the new scenario.
- Employ Webhooks > Custom webhook module at the beginning of the new scenario to receive the data.