Hi
I have a schema that contains the details for an order. Within the schema, I have a collection of line items containing details of each item within the order. Schema is similar to the following structure.
Order
SaleItems
SaleItem
OrderID
Price
Quantity
etc.
I have a requirement that if the Quantity within SaleItem is more than 1, that another line item should be created and the price be divided between the line items, so for example:
Order
SaleItems
SaleItem
OrderID 1234
Price 99
Quantity 3
Should result in the following being created in the output:
Order
SaleItems
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
Could any of you Biztalk guru's advise one the best way to accomplish this? I don't know if it would be best to do it in a map with some of the functiods and if so what to put in the map, or in an orchestration with some custom to do the IF Quantity > 1 logic. Maybe I'm missing something very simple here, but any help would be gratefully recieved.
Richard