IBM Support

How to use confirmShipment API to confirm only the required ShipmentLines out of multiple ShipmentLines available in the Shipment in Sterling Order Management

Question & Answer


Question

How do you use confirmShipment API to confirm only the required ShipmentLines out of multiple ShipmentLines available in the Shipment in Sterling Order Management

Answer

Example Scenario:
The sales order has 2 OrderLines and the shipment is created for the release containing these 2 OrderLines such that the created shipment contains 2 ShipmentLines corresponding to these 2 OrderLines.
Now, when this shipment is confirmed by passing only the details of one shipment line in the confirmShipment API then both the shipment lines are getting confirmed even though only one shipment line is passed as a input to confirmShipment API.


Steps to resolve:
In order to achieve the expected results for the above mentioned scenario while calling the confirmShipment API, Replace="Y" attribute needs to be passed for ShipmentLines node in the input xml, as explained below with example.


input xml:
Consider that shipment is created by using below input xml with createShipment API :


<Shipment Action="Create" DocumentType="0001" EnterpriseCode="DEFAULT" ShipNode="DEFAULT_NODE">
<ShipmentLines>
<ShipmentLine DocumentType="0001" OrderNo="Y100000014" PrimeLineNo="1" SubLineNo="1" ReleaseNo="1" Quantity="5"/>
<ShipmentLine DocumentType="0001" OrderNo="Y100000014" PrimeLineNo="2" SubLineNo="1" ReleaseNo="1" Quantity="5"/>
</ShipmentLines>
</Shipment>


Now, only one shipment line needs to be confirmed out of the two shipment lines, which can be achieved by making use of Replace="Y" attribute on ShipmentLines node as shown in below input xml of confirmShipment API :


<Shipment Action="Modify" DocumentType="0001" EnterpriseCode="DEFAULT" ShipNode="DEFAULT_NODE" ShipmentKey="2014032116100630391">
<ShipmentLines Replace="Y">
<ShipmentLine DocumentType="0001" OrderNo="Y100000014" PrimeLineNo="2" SubLineNo="1" ReleaseNo="1" ShipmentLineNo="2" Quantity="5"/>
</ShipmentLines>
</Shipment>

By using this attribute, only the shipment line passed in the confirmShipment API gets to shipped status and the remaining ShipmentLines goes to earlier released status.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Distributed Order Management","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.2.1;9.2;9.1;9.0;8.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21674033