Sum values from multiple operations

Hi everyone,

I’m running into a bit of a roadblock with a Make scenario I’ve been working.

Scenario:
blueprint (1).json (129.7 KB)

I’m building a scenario that:

  1. Queries my API to retrieve a list of teams a specific user belongs to.
  2. Each team has an associated price, but this price is split across multiple operations in the scenario.
  3. I want to calculate the total price for all the teams and send this aggregated value to another application.

The Problem:

Because the price is divided across multiple operations, I can’t use a simple numeric aggregator to calculate the total. I’ve attached a screenshot of my current scenario for reference.

What I’ve Tried:

  • Using multiple numeric aggregators: I’ve tried using multiple numeric aggregators, but this only gives me the sum of each individual operation, not the overall total.
  • Creating a custom module: I’ve considered creating a custom module to perform the calculation, but I’m not sure if this is the most efficient approach.

Questions:

  1. Is there a specific module or function within Make that can be used to aggregate values across multiple operations?
  2. Are there any workarounds or alternative approaches that I might be overlooking?

Any suggestions or insights would be greatly appreciated. Thanks in advance for your help!

1 Like

Hi @RaulGenially
You can set the source module as iterator.

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation

Thank you for your answer @Msquare_Automation

What do I achieve with that? In the iterator I don’t have the prices

1 Like

Hi @RaulGenially

You can map the price from the module you used earlier. Changing the source module can sum the values without splitting the result in separate operations. We set the source module as the iterator because it’s being split into multiple operations by the iterator.

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation

1 Like

Hi @Msquare_Automation

I still don’t understand you. If I set the iterator as source, I don’t have any fields to SUM, could you explain it in more detail please? I see that there are many users with the same problem, but nobody has received an answer.

1 Like

Welcome to the Make community!

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!