How do i setup array of collections

I have an array of collections,

I would like to route based on the Ticket Type (different actions depending on ticket type), but then use the
Ticket ID (as part of the action but changes each time)

I’ve tried using a simple set variable with a map, and using an itterator, but I’m getting a little lost

[
    {
        "id": 16366530311,
        "associations": {
            "tickets": [
                {
                    "id": "16280272913",
                    "type": "ticket_to_ticket"
                },
                {
                    "id": "16330611038",
                    "type": "ticket_to_ticket"
                },
                {
                    "id": "16330611038",
                    "type": "order_connectivity"
                },
                {
                    "id": "16280272913",
                    "type": "order_flock_connectivity"
                }
            ]
        },
        "__IMTLENGTH__": 1,
        "__IMTINDEX__": 1
    }
]
1 Like

Hi @Ryan_Whitaker,

You can achieve this by using the map function with filters to filter out the tickets using the ticket type.

Here is an example :







Best regards,

Msquare Automation
Platinum Partner of Make
@Msquare_Automation

Hi @Msquare_Automation

Thank you greatly for your reply, typically, as you responded I managed to find the solution to what I was doing wrong, it turned out I was incorrectly configuring the set variable map function,

My solution was to use a single module of set multiple variables (essentially the same as what you provided) but then use a filter on the connection between modules,


Please accept my appologies for you having to spend time on this

1 Like

Hi @Ryan_Whitaker,

We are always here to help with your automation needs. The Make.com community is a great place to share knowledge.

Best regards,

Msquare Automation
Platinum Partner of Make
@Msquare_Automation