Help Swapping Square Category # to Name for WooCommerce Import

:bullseye: What is your goal?

I want to use Make.com to import (and eventually sync) Items from Square to WooCommerce while retaining the Category (sometimes multiple categories) assigned in Square.

:thinking: What is the problem & what have you tried?

I’ve used HTTP Post, Square’s API, and an Iterator to successfully retrieve Items from Square. The problem is for the Item’s category Square gives you a Category ID# instead of the category name.

No problem, I used a separate scenario and HTTP Post to get the Square ID# and match them to their name and store it in a Data Store.

The problem: Taking that Category ID#, Looking it up in the Data Store, and swapping it for the matching name (or names) before passing it to WooCommerce to create the Product and assign it the category on WooCommerce as well.

I’ve been testing a Test Product that has 3 categories in it

My flow goes like this:
HTTP Post (Gets All Returns Single Bundle)
Iterator (Puts All Items into Separate Bundle)
Iterator #2 (Pulls all Categories Out of an Item, Returns Category ID’s in 3 Bundles - one for each category assigned)
Data Store (Looks Up Category ID #s - Returns Name)
This is where the problem happens I think - it does an operation for each Bundle, and then I can’t aggregate across those operations into one new Array)
Aggregator (Should Take all three category names and aggregate then into a Product’s structure as returned by the first Iterator. Instead, it’s doing 3 seperate operations and Just returning a single category under the product ID)

Screenshots and public scenario attached, open to any thoughts! Been working on this for days!

:clipboard: Error messages or input/output bundles

Successfully returning proper category name, but not aggregating let alone aggregating multiple

:link: Create public scenario page

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

The source for your aggregation is wrong. You always aggregate a module that produces extra bundles, in your case the iterator.

Thanks I’ll give it a shot

So, that did succesfully aggregate category ID #s into an array with collections. But the actual problem is passing that to the Data Store. At the moment it will only look up the first Category ID number, pass that as output and call it a day. It wont look up all 3 category ID #'s

Below is a screenshot of the aggregator out put. Followed by when I pass that to Data Store - Get a Record

Lmk any following thoughts

Sorry I just opened your scenario to dig deeper. Your data store lookup is in the wrong place after the aggregation and you mapped only the first item from the array to be checked inside. It needs to be in the middle after the categories are being iterated.

Hmmm if Im not mistaken that’s how I had it originally in the OP screenshot - after the category iteration.