I am trying to set up flow to calculate the total product cost of each order and add it to an order metafield. I have attached a screenshot of the flow below:
The problem is I seem to only receive the costing of the last item in the lineitem loop. I think the problem is that the metafield isn’t updating quickly enough for the flow, but have no idea on how to workaround this, as you cannot add a ‘wait’ to for loops??
For future reference, and for anybody who has the same issue. As Paul suggested, I solved the issue with option 2 by writing some javascript in ‘Run Code’ to do the calculations.