Create purchase orders from multi-level bills of material
Recipe ToolsData ParserMarketingUtilities
What it does
When a function call arrives with bill of material data, this automation parses the structure and creates purchase orders. It evaluates parent records, parts, and instructions to determine order creation, then links child items back to their parents.
Who it's for
Procurement teams who need to automate purchase order creation from complex, nested bill of material data.
Apps used
How teams use this
Create orders from nested bills
Process a multi-level bill of material where each parent item may have child parts and accessories. The automation creates separate purchase orders for accessories and links all child records to their parent orders automatically.
Skip window items in order creation
When a bill of material contains window items, the automation skips purchase order creation for those items but continues processing other parts and child records in the structure.
Filter accessories against a custom list
Extend the automation to check accessories against a custom list before creating separate purchase orders. Only items matching the list are grouped into a dedicated accessory order.
Notify teams when orders are created
Include a notification step that alerts the procurement team when purchase orders are created from the bill of material, with details on parent and child item counts.
How it works
- Receive the function call. A function call arrives in real time with bill of material data that includes parent IDs, parts, instructions, and nested child items to process.
- Parse the document structure. The Xml Parser extracts the bill of material hierarchy, parent identifiers, parts lists, and instructions from the incoming payload so the automation can evaluate each level.
- Evaluate conditions and create orders. Check if a parent ID exists and the item is not a window type. Create a purchase order when conditions are met. For items with parents and parts, create a separate order for accessories and link child items to the parent.
- Process child items recursively. For each child in the multi-level bill of material, repeat the evaluation and purchase order creation logic, then update the parent order detail with the child inventory ID and quantity.
- Return the result. Send back the created purchase orders and their linked child records to the caller so the system has the complete order hierarchy.