I have a scenario that has a few modules before a router. I do not need these modules to repeat, simply exist once and be referenced by the rest of the scenario. However, they repeat A LOT of times, which uses up credits and also creates an error because the app I am using limits requests. Help?
this is a custom integration between Bloomerang and Xero. Blueprint attached. I’m hoping there is some direction i can insert between the first array aggregator and the first router so that it doesn’t keep coming back to module 187 and looping.
Bloomerang, Xero - LT USA.blueprint.json (748.4 KB)
Hey Alexa,
Can you shar screenshots of what a run looks like and what output the modules are producing?
Hi Stoyan - This is an extremely large scenario. The outputs are all working correctly, I’m just wondering how to prevent it from looping back to the beginning after the first router. I simply need to reference the outputs in the first few modules without it doubling the number of credits needed.
Can you show at least some screenshots of the modules in question?
From your explanation it sounds like you have a search module or an iterator or something producing extra bundles causing additional executions.
Sure thing - yes, there is an Iterator, but I believed it was necessary to generate the information I need in the first place. Perhaps that’s not right?
This first image is the part before the first router that really only needs to happen once.
This is the entire scenario.
What is the first module returning as output?
Thanks so much for your patience with me & your willingness to help - here is the output of the first module. I’m also including outputs for the next 3 (that first section before the router) in case that is helpful as well.
Bloomerang trigger, first module: OutputBloomerangModule.txt (22.0 KB)
The second module in the scenario, Xero Search Tracking Categories, only needs to run a single time but is looping through.
OutputXeroSearchTrackingModule.txt (27.2 KB)
The third module I’m skipping because it’s a sleep module.
The fourth is the iterator that is perhaps causing issues?
OutputIterator.txt (6.4 KB)
Final module in that string: array aggregator.
Outputarrayaggregator.txt (6.0 KB)
Hello it looks like perhaps you may not need an iterator. Make automatically iterate through each output bundle on its own. Unless there is an array within each output bundle that you want iterated through you probably do not need an additional iterator as that will keep running through each bundle, then move onto the next one.
Perhaps you need to limit the number of bundles returned which would cut down on the repeats.
You may need a specific filter between the Xero app and the next module that would only continue if a specific condition is met.
Thanks for this! I have removed the iterator, and my scenario is working the same way without it, so that is good news. However, it behaves the same way - repeating the first scenarios unnecessarily. Because the number of bundles is not consistent, I do not want to limit those. Is it truly not possible to add some kind of module that says “stop repeating here”?
Hello, this might be possible. You could add a variable module; what I would like to do is add a “Set Variable” module before the iteration steps begin or more importantly when you get the number of times you want the steps to iterate. Then after that add a filter between the next steps that references the output from the variable that you set to determine if the current iteration is less than the number you want it to stop at. Then after your filter have the steps as usual.
This is roughly how you can control the number of iterations as a variable, the key is to get a value that you want the iteration to stop at and save it as a variable then compare that with the number of iterations. Though if the number you want to be counting is different from the current bundle being processed you may need another set of “Set Variable”, “Get Variable” or use Set and Get multiple Variables to create an additional counter to compare your filter against.
I hope this helps solve your issue.
That may help! The only thing is that I am not looking for a specific variable, just the list of tracking categories in Xero, which are finite but sometimes change if one is added or removed. I’m not sure how to get it to just pull those names, then move on. Would a set variable module help in this case?
Hello,
It seems your issue may be how you setup your Boomerang trigger. It may keep repeating because it keeps running and going over the categories. Can you change the trigger to be manual or schedule it for a specific time/day, you may not need any repeaters at all.
It is already set to run at a specific time every morning. I do not want any repeaters and do not have any in my scenario, but it is still repeating.
The first module executes and produces a bunch of bundles as output. For each bundle generated, the second module will execute. So on and so on. From your explanation it sounds like you are expecting something different. Most likely, like Anthony said - your initial trigger is misconfigured and returning too many results.
Thank you for your help with this - the first module is configured correctly, and is returning the exact number of results I am looking for. It seems like there is no other way to fetch the data than the way it is currently configured. It simply sends over all of the sales from the previous day. It does this in one single operation, I think, unless I am misinterpreting the “1” there?
It seems like it is actually the second module that keeps repeating. The issue is that after one run, it finds all the data I need. I’m not sure why it repeats. Is it because it is the input to the aggregator here?
You are misinterpreting it yeah. That’s how many times the module executed, not how many output bundles it produced.
Okay. I do need all of the output bundles it produces. There are no additional settings on the Bloomerang module that would allow me more flexibility. Is there anything that can be done to stop modules pictured above from repeating? The second, third, and fourth modules continue to execute for as many bundles are produced by the first (if I’m understanding you correctly)?
That depends entirely on what the flow is and what you want to get out of it?
You can add an aggregator and combine them in an array. Then the following modules will run only once. But then you will need to do something with the array to access the bundles again.
I’m trying to generate paid invoices to use to reconcile against deposits in Xero. It is currently achieving what I want, I simply do not want it to continue to repeat itself at all before the router, which is the next step before a router that then sends the data to Xero. That half of the module is working perfectly.
When you say I should add an aggregator, is that in addition to the one that is already there? Would it be helpful to re-upload the Scenario Blueprint?
What is the Xero module searching? Is it dependent on the different outputs of the boomerang module?
If it is - then change the source of the current aggregator to the boomerang module.
And if it’s not, then add a new aggregator after the boomerang module.