I have data with multiple bundles, each containing an array with one or more collections.
The bundles are keyed by CustomerEmail, and each bundle must create a new Wave Invoice for the matching customer. Then each collection from inside that bundle must be a new line item on that invoice.
What is the problem & what have you tried?
I can create an invoice with the Wave create invoice module, add one or more line items, but since the number of line items varies, I need to find a way make number of line items dynamic in each invoice.
The source of your line items should output 1 or more bundles.
Use an Array Aggregator after the module that produces the bundles,
set the source of the bundles as the source of your aggregator,
then be sure the Wave module is attached somewhere after the Array Aggregator,
then in the Array Aggregator you should be able to select an option from the Wave module in the Data Structure dropdown.
In this way the Array Aggregator will form your line items into Wave’s expected line item format.
Here, in your Array Aggregator which has the Wave module connected after it, the dropdown highlighted here, you should have the option for Wave Line Items
Thanks Donald. That’s exactly what I needed. In the Create Invoice module i was mapping each line item as well, but the fix was to map the entire array.