I’m currently integrating Xero and Shopify. The intention is to run a daily inventory sync, that queries Xero and then updates Shopify with the current inventory levels.
One problem I’ve encountered is Xero wants to return ALL the inventory items back to me in a single API call, which is over 6000 items in a single array. Make is parsing it, which is fine. However, I need to break this into smaller groups of 250 items per group. Then I can use the Shopify GraphQL to send only 24 API calls to update all the inventory for all products.
I’ve tried a lot of ways to approach it but I cannot seem to find a way to slice the array, then be able to iterate through each slice and feed into a Shopify module.