1

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>

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
dstj
  • 4,800
  • 2
  • 39
  • 61

2 Answers2

0

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.

MrGadget
  • 1,258
  • 1
  • 10
  • 19
  • Thanks, The `TransportInformation.Route` values are limited to `air`, `rail` `motor` and `ship`, so we cannot really use that either. – dstj Apr 14 '16 at 16:05
0

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>

dstj
  • 4,800
  • 2
  • 39
  • 61