Issue Summary: I am trying to aggregate freestock
values across multiple HTTP responses for the same EAN
(product code) in my Make scenario. My goal is to calculate the total freestock
for each unique EAN
by summing the values received in multiple HTTP responses. Currently, I am encountering difficulties in accumulating these values correctly due to the sequential nature of the HTTP responses and the limitations of the Numeric Aggregator
in this context.
Current Flow (see attached image):
- Repeater: Repeats the process as needed.
- HTTP: Makes a request to retrieve records containing
EAN
andfreestock
values. - JSON Parse: Parses the JSON response from the HTTP request.
- Iterator: Iterates over each record returned in the JSON response.
- Set Multiple Variables (Tools): Sets variables for
EAN
andfreestock
for each record. - Numeric Aggregator (Tools): Attempts to aggregate
freestock
values, but the aggregation isn’t working as expected across multiple operations.
Problem Description: The Numeric Aggregator
is not summing the freestock
values correctly because the freestock
values are received in separate HTTP responses and processed in different iterations. I want to store all freestock
values for each unique EAN
in an array and then calculate the total freestock
for each EAN
.
What I’ve tried:
- Setting up an array to collect
freestock
values perEAN
, but I am having trouble appending newfreestock
values to the existing array. - Using the
Numeric Aggregator
to sumfreestock
values, but it doesn’t seem to aggregate correctly across multiple operations due to the separate HTTP requests.
Desired Solution:
- Initialize an array (e.g.,
freestock_values
) for each uniqueEAN
to store allfreestock
values across different HTTP responses. - Append each
freestock
value to thefreestock_values
array for the correspondingEAN
on each HTTP response. - Use the
Numeric Aggregator
(or another method) to calculate the sum offreestock
values for each uniqueEAN
. - Output the final aggregated
freestock
value for eachEAN
so it can be updated to an Excel Google Sheet.
Questions:
- Is there a recommended approach to dynamically append values to an array per unique
EAN
in Make? - Can you provide guidance on configuring the
Numeric Aggregator
or suggest an alternative solution to sumfreestock
values across multiple HTTP responses?
Attachment: I’ve attached an image of my current flow for reference.
Thank you for your assistance!