Reputation: 5220
In cXML, was is the correct and expected way to specify the requested shipping method and carrier for a purchase order? For example, how would I request USPS Priority Mail?
It seems to require a mixture of ShipTo > CarrierIdentifier
and Shipping > Description
. But even the official user guide seems to have a mismatch (UPS and FedEx 2-day)...
<OrderRequestHeader>
...
<ShipTo>
<Address>
...
</Address>
<CarrierIdentifier domain="companyName">UPS</CarrierIdentifier>
</ShipTo>
...
<Shipping>
...
<Description xml:lang="en-US">FedEx 2-day</Description>
</Shipping>
...
</OrderRequestHeader>
Upvotes: 1
Views: 456
Reputation: 5220
I ended up adding two <CarrierIdentifier>
nodes, with two different domain attributes. I believe it to be the correct implementation as the DTD supports multiple <CarrierIdentifier>
in the <ShipTo>
node.
<ShipTo>
<Address>
...
</Address>
<CarrierIdentifier domain="carrier">USPS</CarrierIdentifier>
<CarrierIdentifier domain="shipMethod">Priority</CarrierIdentifier>
</ShipTo>
Upvotes: 0
Reputation: 1268
To some degree, we can't answer this, because it will have to be decided between you and your trading partner.
That said, the Shipping block is a money item...the Description can be anything, but typically has something to express how the amount was determined, in your example the amount represents what would be charged for FedEx 2-day. In your ShipTo, that's where you specify the carrier you want to be used. Some trading partners have a specific set of codes they're expecting in the domain or element value or both...ask them.
Finally, note that within ShipTo you also have a TransportationInformation element that you and your trading partner might find useful.
Upvotes: 0