What is your goal?
To get an additional invoice row generated that does not exist in order data from before.
I get a new order in from Airtable and generate a new invoice into a finance system with it. The order can have multiple products that are Linked Records in Airtable. In the current setup I run the output from the Airtable Get Order module into an Iterator (iterates on price), then that output into an Array Aggregator, which output I store in a Set Variable module. These are then combined with other data to generate a new invoice with n invoice rows in the finance system.
If the order has a discount sum, I’d need to insert a new product row with the negative sum to be discounted. Thereby the invoice first lists all product rows with normal prices, then the last row says “Discount per agreement: -100 euros”.
What is the problem & what have you tried?
I thought of replicating the Get Order output into a JSON module where I could add data dependent on something like if(discount_sum;add row;do nothing), but can’t figure out how to do that.
Or could I add another Array Aggegator after the first one, and somehow insert the new row there? But I would need to “write” the new row hard coded, since it cannot be fetched from any previous order data.
Any thoughts on how to achieve this?
Rgds,
Björn