Need help converting single Sales Order into multiple Purchase Orders using Iterator and Array Aggregator

Hi there, I am trying to create the following scenario but I can’t seem to make it work properly.

In Knack, I have a form that allows a sales order to be created. The sales order can include multiple line items (products) from multiple different vendors who will then drop ship the products to the customer.

When a sales order is created, I would like to use MAKE to then compile line items into groups by vendors. Once that has happened, then I need to create a new Purchase Order record (in Knack) for each of the vendors.

For example:

Sales Order:
Qty 2 – Product A – Vendor #1
Qty 1 – Product B – Vendor #1
Qty 1 – Product C – Vendor #1
Qty 6 – Product D – Vendor #2
Qty 3 – Product E – Vendor #2
Qty 1 – Product F – Vendor #2

The above sales order would produce two Purchase Orders:

Purchase Order #1 (Vendor #1):
Qty 2 – Product A
Qty 1 – Product B
Qty 1 – Product C

Purchase Order #2 (Vendor #2):
Qty 6 – Product D
Qty 3 – Product E
Qty 1 – Product F

My scenario is currently structured to be triggered when a new record (Sales Order) is updated as “confirmed”. Each Sales Order is connected to multiple line items for each product that is ordered.

What I would like to do is automate the creation of multiple new records in a third data table called “Purchase Orders”. In the example above I would need to create two Purchase Order records, one for Vendor #1 and one for Vendor #2. In Knack, these Purchase Orders then need to be connected to the original Sales Order.

I have used a search function to pull the sales order line items that match the new sales order, and then an array aggregator to group the line items by vendor. I then have a module that creates a purchase order new record for each vendor.

I have successfully created a record for each vendor, however I am unable to write any data to the records. I think it has something to do with how I have used the array aggregator. I am also unclear how to configure the create record module.

Any thoughts?

PS. I have tried to get help from the Make tech support team, however that hasn’t been successful and they are extremely slow to respond.

Hey @Peter_Burton ,

You most likely are on the good path but missing something. However, since this is a community we can not look within your scenarios.
Some screenshots with how you have your modules configured will help understand what you are doing.

1 Like

Thanks for the response, is there any way I can provide you with access to this particular scenario?

Het @Peter_Burton ,
If you would like support you can always contact our team at hello@drivn.agency
We will pick it up and then you could provide the team access if you like.

If you like the community to help you out, screenshots is the way to go.

1 Like