Creating collections with parameter

Hey guys!! :hugs:
I have an aggregator array that returns 5 items, but from these 5 items I need other collections to be created according to the category number indicated. In this example, all items that have category = 1 will go to one collection and all items that are in category = 2 need to be in another collection.

Does anyone know what I can do in this case?

Thank you very much in advance! :blush:

Would a router work? Add 5 paths, and 5 filters to check if category=1, category=2, etc?

1 Like

The problem is that we have more than 100 categories, we want to keep the flow as small as possible

It depends on the specifics of the collection that you’re talking about to select based on category.
Based on the little information we have, there are two options that comes to mind at this moment.
One is you could use a data store where you can create records for each category and the corresponding collection they should go to.
This would keep the workflow neat.

Another options is using a custom coded script with python which will do the filtering based on category. Then you can connect the script to your workflow with a ssh command. If you need help with this setup, I will be happy to assist.

You would have to create a lookup-and-assign script to programmatically go through business logic for > 100 category values.

1 Like

You can aggregate by group. Just expand the array aggregator advanced settings, and insert the category variable there.

2 Likes