dstj
dstj

Reputation: 5220

What is the standard cXML way of sending shipment method in a purchase order?

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

Answers (2)

dstj
dstj

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

MrGadget
MrGadget

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

Related Questions