We have a export sourcing setup where once customer orders are placed for external customer based on the sourcing of item/primary supplier from other site corresponding internal PO/CO are generated.
In order to have visibility of the internal CO generated at the source customer order level we are trying to call the supply_order_analysis_api.generate_tree procedure from an event action.
However the procedure is only generating the first 2 nodes of the tree Parent Customer Order and Internal Purchase Order. It is not creating the last node Internal Customer Order.