I have requirement, Sales Order (Standard Order Type)with product line(non-shippable line type) will be created in an ERP system.
Once the order created and booked, the order information will be send to third party tool for fulfillment/shipment. Once the order is shipped in third party tool the shipment information will be sent back to ERP system, along with shipment information, Freight information will also sent back to ERP system.
Now the requirement is ,I need to apply Freight Amount (which is received from the third party tool ) to the sales order's product line.
Please let me know is there any standard API which is used to apply the Freight Charge on the existing Sales order line.
Appreciate your help.
You should use the same Process Order API only to update Freight Charges to the order. Make sure you only pass the Freight Charge details in the P Line Adj Table parameter (list_line_type_code='FREIGHT_CHARGE',operand=<whatever charge amount>,list_header_id= header_id of the Modifier with 'Freight and Special charge List' ) and keep everything else the same. Pre-requisite for this change is that the CALCULATE_PRICE_FLAG in the sales order line should be 'P' beforehand for Partial price, that allows you to update only the freight charge to the order after the order is imported.
Let me know if this helped.