Set up routes in a chain

Hi! I have made two routes to get first manufacturers from A to B, and then products from A to B (which are related by the manufacturer IDs). Is there a way to “chain” these routes so they go together? Or what is the best practice for this type of scenario?

Hi @kjetil

Welcome to the Alumio forum.

It depends on the number of entities of both manufacturers and products. However, in my experience, the below approach would work.

You can create a route to sync the manufacturers (from system A to system B) and it also stores the manufacturers’ data in a storage. Then create another route to subscribe to the storage and fetches all products related to each storage entity (manufacturer) from system A and send it to system B.

I hope the above approach is clear to you. Feel free to let us know if you have any further questions.

Welcome to the forum @kjetil !

Gugi’s approach with a storage subscriber will work.
Another option is to use a HTTP Transformer to send data between systems in one route.

With a HTTP Transformer combined with conditional transformer you could check if ‘manufacturer X’ exists, if yes continue with transferring the product.
If no create ‘manufacturer X’ and then transfer the product.

A request with a HTTP Transformer will not count towards the consumed tasks which is a nice benefit.

Example

This shared afas configuration has a transformer that uses the explained principle for customers: AFAS Profit [Sales Order, Customer]