AnsweredAssumed Answered

Sales Order with multiple Order Lines fails to create multiple Items

Question asked by kszczurowski527877 on Mar 1, 2017
Latest reply on Mar 6, 2017 by Sjaak Overgaauw

Hello All, 

I am having trouble loading Sales Orders (SO) with multiple order lines.

My source is MS SQL, so I am using simple tsql query to get Sales Orders. The source does not have a separate table for Order Headers and Order Lines (there are just Order Lines). 

I have PONumber on each line and DocumentNumber (Invoice Number) on each line. Those two are the same respectively, across multiple lines. I am mapping DocumentNumber as externalId of the Sale Order record, and I am mapping unique SKU Number to Item in ItemList.

 

When I try to load SO with multi lines, first lines is loaded fine and the second line, instead adding additional Item Line, it overrides existing line (more than likely coz of the same DocumentNumber/external Id). 

Now, I've loaded number of SOs with only one (1) line but I need to find a way to append the rest of the missing lines per each SO.

I can easily identify missing lines per SO, does anybody know how to trigger creation of new Item (inside ItemList) when SO already exists?

I have spoken with Support and they asked to set repleaceAll (in ItemList/Item) to false. This worked but only for brand new SOs. When I already have existing line, it duplicates the existing line instead of adding missing line. 

 

I hope this makes sense and thank you for all suggestions on this.

Kris

Outcomes