Action iteration for array

Looking at the sage intacct action - add or update vendor.

If I wanted to pass in an array of values, I would need to mark the checkbox for iterate action for it to run through each row and process, correct?

Hi Brent,

That is correct:

Also note that the setting is not appropriate for actions that need to process “inner arrays”, like invoices with line items.

correct. it would just handle single rows and iterate through each.

Have a follow up question to this.

Currently I have an automation that runs daily at 6 am. there are 3 actions.

  1. pulls project data from intacct.
  2. retrieves the reference ID from salesforce for each project.
  3. updates projects in salesforce

So as it currently sits 1 is pulling a series of projects and data behind them all from intacct. 2 is looking up the ID in salesforce for each project. 3 is taking each project and updating the same in salesforce.

1 works fine. 2 works fine if there is only one project but if there is multiple it fails. I need to change the action to iterate for each array value. My real question is for action 3. If I change 2 to iterate and 3 to iterate, how does the system know that each iteration of 2 is pulling the id for the respective project so that the correct ID from 2 is used for the correct project from 1?

Hope that all makes sense.

Sorry, I don’t understand. Would need to see sample data and what you are trying to do.

Trigger date time daily
Action 1 retrieves GL Detail all filtered by project ID from intacct
Action 2 uses the project ID from action 1 to retrieve the workorderID from salesforce
Action 3 uses the project ID and GL detail from 1 and the ID from 2 to update each workorder in salesforce.

action 1 works fine. pulls multiple projects and all the necessary detail

action 2 fails if there is more than 1 project as it tries to run all the project IDs at once in the query. I know I need to iterate this action so it pulls them properly

action 3 works if there is one but obviously fails if more than 1 before it gets to this point.

Question - If I iterate action 2 and action 3, will the system be smart enough to know that each run of action 3 is supposed to pair action 2 (retrieving the salesforce id) with its respective project ID from action 1.

OR (I thought about this over the weekend) should I be pulling project ID in the trigger and running each action side as a single project ID?

The system is not designed to have one action emit multiple data rows that later actions then process. It can be done, but you lose the ability for row-by-row error handling, auto-retry, etc.

Triggers are supposed to emit data rows to be processed by actions. So convert action #1 into a trigger.

ok. after thinking about it this weekend i realized that was probably the solution.

Thanks