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.
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.