This method allows you to establish a relationship between two consignments, by associating a parcel in an 'inner' consignment with a parcel in an 'outer' consignment. This facilitates 'parent'/'child' tracking (refer to Cartonisation ('Parent' and 'Child')).
Note
A 'child', inner consignment can only ever have one 'parent', 'outer' consignment.
It is assumed that you have worked through Creating your first Request to a Service and are familiar with the Properties needed to Call or Create a Consignment.
How to submit a request
Proceed as follows:
If you have not already done so, open a new project using the WSDL
ConsignmentService.xml
.Create a new request under
addInnerToOuter
,Enter the authorisation for the request.
-
The Consignment Code (starting with DMC) of the 'inner' consignment (i.e. the
innerConsignmentCode
).The number of the parcel in the 'inner' consignment to be linked to the 'outer' consignment (i.e. the
innerParcelNumber
).The Consignment Code of the 'outer' consignment (i.e. the
outerConsignmentCode
).The number of the parcel in the 'outer' consignment with which the specified parcel in the 'inner' consignment is to be linked (i.e. the
outerParcelNumber
).
-
Click
to submit the request.
If the input is valid, then the 'inner' consignment becomes a 'child' of the 'outer', 'parent' consignment, and
true
is returned, as in the example below. If you wish to link a further 'child' consignment, repeat from step 4, changing the information at steps a) and b) as required, but leaving steps c) and d) as they are.
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="urn:DeliveryManager/services">
<soapenv:Header/>
<soapenv:Body>
<ser:addInnerToOuter soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<innerConsignmentCode xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">DMC4BY1V6XXS</innerConsignmentCode>
<innerParcelNumber xsi:type="xsd:int">1</innerParcelNumber>
<outerConsignmentCode xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">DMC4BY1V6TP9</outerConsignmentCode>
<outerParcelNumber xsi:type="xsd:int">1</outerParcelNumber>
</ser:addInnerToOuter>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:addInnerToOuterResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DeliveryManager/services">
<addInnerToOuterReturn xsi:type="xsd:boolean">true</addInnerToOuterReturn>
</ns1:addInnerToOuterResponse>
</soapenv:Body>
</soapenv:Envelope>
If you wish to confirm the association, then, use one of the following ConsignmentSearchService
methods to find the 'child' consignments: findConsignmentByConsignmentCode, findConsignmentsByCartonId, findConsignmentsByOrderReference, findConsignmentsByCarrierConsignmentCode.
If you look in the parcels
array that is returned from any of the methods, you will see the outerConsignmentCode
and outerParcelNumber
identifying the 'parent' consignment, e.g.
<outerConsignmentCode xsi:type="soapenc:string">DMC4BY1V6TP9</outerConsignmentCode> <outerParcelNumber xsi:type="xsd:int">1</outerParcelNumber>