Page 1 of 1

XML (or CSV) Import - allocate SOH for serialized items

PostPosted: Thu Sep 08, 2022 1:17 pm
by DannyC
I've got a client who imports sales orders. Pretty sure they come in via XML.

Some items are serialized and those items always come in as backordered. I get that - I suspect it is because there's no GUI to display the serial selection dialog.
But they want Jiwa to assign any SOH available to the order without serialized stock displaying as backordered.

I know there is a setting e_SalesOrderSerialStockSelectionFIFO but I can't find an XML tag to define that setting - assuming that is the setting I need to define?

For CSV imports the import is all programmable via the file watcher plugin so I can add in e_SalesOrderSerialStockSelectionFIFO into the plugin.
But XML imports via file watcher don't have that level of programmability.

Can anything be done for XML imported orders to auto-assign serialized stock?

Re: XML (or CSV) Import - allocate SOH for serialized items  Topic is solved

PostPosted: Thu Sep 08, 2022 1:41 pm
by Mike.Sheen
DannyC wrote:I've got a client who imports sales orders. Pretty sure they come in via XML.

Some items are serialized and those items always come in as backordered. I get that - I suspect it is because there's no GUI to display the serial selection dialog.
But they want Jiwa to assign any SOH available to the order without serialized stock displaying as backordered.

I know there is a setting e_SalesOrderSerialStockSelectionFIFO but I can't find an XML tag to define that setting - assuming that is the setting I need to define?

For CSV imports the import is all programmable via the file watcher plugin so I can add in e_SalesOrderSerialStockSelectionFIFO into the plugin.
But XML imports via file watcher don't have that level of programmability.

Can anything be done for XML imported orders to auto-assign serialized stock?


The legacy XML for the sales order line has an optional property : SalesOrderSerialStockSelectionType. Set that to e_SalesOrderSerialStockSelectionFIFO or 1 per line to make it use FIFO when importing.

Re: XML (or CSV) Import - allocate SOH for serialized items

PostPosted: Thu Sep 08, 2022 1:45 pm
by Mike.Sheen
Oh, and you could also have a plugin change the behaviour on XML import as well - so if you couldn't have the XML provided modified to include the SalesOrderSerialStockSelectionType per line, you could add an event handler for the SalesOrder DeserialiseStart event, and in there add handlers to manipulate the sales order business logic or lines as you need.

Re: XML (or CSV) Import - allocate SOH for serialized items

PostPosted: Thu Sep 08, 2022 2:44 pm
by DannyC
The legacy XML for the sales order line has an optional property : SalesOrderSerialStockSelectionType


Almost. Your suggestion gave me a hint...I went to JustDecompile and searched for SalesOrderSerialStockSelectionType.
And what I found was that adding in a tag SalesOrderSerialStockSelectionTypes (note plural) worked.

So this will assign FIFO serial numbers
Code: Select all
<Line>
<SalesOrderSerialStockSelectionTypes>e_SalesOrderSerialStockSelectionFIFO</SalesOrderSerialStockSelectionTypes>
<PartNo>MySN_Item</PartNo>
<QuantityThisDel>2</QuantityThisDel>
</Line>