The OrderRequest payload sends a PO request to your eCommerce platform. For standard integrations that receive cXML payloads, the TradeCentric platform transforms the buyer's PO into our standard cXML format. Then, our platform delivers the payload to your endpoint so that you can process the PO and create a sales order.
To receive POs as expected, your eCommerce platform must accept our standard cXML format. As a best practice, your platform should also return a success or error response. This article describes the standard cXML request and response formats.
Jump to:
Request payload (from TradeCentric)
The code block below shows an example OrderRequest payload in our standard cXML format:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="93369535150910.10.57.136" timestamp="2022-11-18T10:57:13-05:00" version="1.2.045">
<Header>
<From>
<Credential domain="NetworkID">
<Identity>TEST_CORP</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>SUPPLIER_INC</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>TEST_CORP</Identity>
<SharedSecret>password</SharedSecret>
</Credential>
<UserAgent>Storefront Integration v1.0</UserAgent>
</Sender>
</Header>
<Request deploymentMode="production">
<OrderRequest>
<OrderRequestHeader orderID="PO-123" orderDate="2022-11-18" type="new">
<Total>
<Money currency="USD">142.09</Money>
</Total>
<ShipTo>
<Address addressID="TN.04" isoCountryCode="US">
<Name xml:lang="en">Test Corp. - Nashville Branch</Name>
<PostalAddress>
<DeliverTo>Contact Name</DeliverTo>
<Street>123 Test St.; Suite A</Street>
<City>Nashville</City>
<State>TN</State>
<PostalCode>37011</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-9876</Number>
</TelephoneNumber>
</Phone>
</Address>
</ShipTo>
<BillTo>
<Address addressID="TN.04" isoCountryCode="US">
<Name xml:lang="en">Test Corp. - Nashville Branch</Name>
<PostalAddress>
<DeliverTo>Contact Name</DeliverTo>
<Street>123 Test St.; Suite A</Street>
<City>Nashville</City>
<State>TN</State>
<PostalCode>37011</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-9876</Number>
</TelephoneNumber>
</Phone>
</Address>
</BillTo>
<Shipping>
<Money currency="USD">10.09</Money>
<Description xml:lang="en">FedEx 2Day</Description>
</Shipping>
<Tax>
<Money currency="USD">8.64</Money>
<Description xml:lang="en">Sales tax - 7% Tennessee</Description>
</Tax>
<Contact role="buyer">
<Name xml:lang="en">Contact Name</Name>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-1234</Number>
</TelephoneNumber>
</Phone>
</Contact>
</OrderRequestHeader>
<ItemOut quantity="3" lineNumber="101" requestedDeliveryDate="2022-12-25">
<ItemID>
<SupplierPartID>45L017</SupplierPartID>
<SupplierPartAuxiliaryID>CART12-ITEM123</SupplierPartAuxiliaryID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="USD">41.15</Money>
</UnitPrice>
<Description xml:lang="en">Item Description from storefront if provided</Description>
<UnitOfMeasure>EA</UnitOfMeasure>
<Classification domain="UNSPSC" />
</ItemDetail>
</ItemOut>
</OrderRequest>
</Request>
</cXML>
Request element details
A standard OrderRequest cXML payload has a root element, a Header element, and a Request element. The subsections below explain each element and its fields.
cXML root
Applies identifying information to the entire payload
<cXML payloadID="93369535150910.10.57.136" timestamp="2022-11-18T10:57:13-05:00" version="1.2.045"> ... </cXML>
Header
Identifies the organizations involved in the transaction
<Header>
<From>
<Credential domain="NetworkID">
<Identity>TEST_CORP</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>SUPPLIER_INC</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>TEST_CORP</Identity>
<SharedSecret>password</SharedSecret>
</Credential>
<UserAgent>Storefront Integration v1.0</UserAgent>
</Sender>
</Header>
Request
Provides the PO details, which are described in the subsections below
PO identification
Provides identifying information about the PO
<Request deploymentMode="production">
<OrderRequest>
<OrderRequestHeader orderID="PO-123" orderDate="2022-11-18" type="new">
Total values
Provides total values for the entire PO
<Total> <Money currency="USD">142.09</Money> </Total> <Shipping> <Money currency="USD">10.09</Money> <Description xml:lang="en">FedEx 2Day</Description> </Shipping> <Tax> <Money currency="USD">8.64</Money> <Description xml:lang="en">Sales tax - 7% Tennessee</Description> </Tax>
Shipping and billing addresses
Provides shipping and billing addresses for the PO
<ShipTo>
<Address addressID="TN.04" isoCountryCode="US">
<Name xml:lang="en">Test Corp. - Nashville Branch</Name>
<PostalAddress>
<DeliverTo>Contact Name</DeliverTo>
<Street>123 Test St.; Suite A</Street>
<City>Nashville</City>
<State>TN</State>
<PostalCode>37011</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-9876</Number>
</TelephoneNumber>
</Phone>
</Address>
</ShipTo>
<BillTo>
<Address addressID="TN.04" isoCountryCode="US">
<Name xml:lang="en">Test Corp. - Nashville Branch</Name>
<PostalAddress>
<DeliverTo>Contact Name</DeliverTo>
<Street>123 Test St.; Suite A</Street>
<City>Nashville</City>
<State>TN</State>
<PostalCode>37011</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-9876</Number>
</TelephoneNumber>
</Phone>
</Address>
</BillTo>
Buyer contact
Provides details about the buyer contact for the overall PO
<Contact role="buyer">
<Name xml:lang="en">Contact Name</Name>
<Email>contact@buyer.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="" />
<AreaOrCityCode />
<Number>888-555-1234</Number>
</TelephoneNumber>
</Phone>
</Contact>
Items
Provides details about each of the line items in the PO
Note: We'll repeat the ItemOut element for each line item. Some fields are specified as “Required” or “Typically required” to indicate the minimum requirements across most TradeCentric integrations. Your integration may have additional required fields depending on the needs of your organization and your buyer.
<ItemOut quantity="3" lineNumber="101" requestedDeliveryDate="2022-12-25">
<ItemID>
<SupplierPartID>45L017</SupplierPartID>
<SupplierPartAuxiliaryID>CART12-ITEM123</SupplierPartAuxiliaryID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="USD">41.15</Money>
</UnitPrice>
<Description xml:lang="en">Item Description from storefront if provided</Description>
<UnitOfMeasure>EA</UnitOfMeasure>
<Classification domain="UNSPSC" />
</ItemDetail>
</ItemOut>
Response payload (to TradeCentric)
Once your eCommerce platform processes the OrderRequest payload, it should return a cXML response payload. This payload should indicate whether you accepted the PO.
The code block below shows an example response in our standard cXML format:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.0xx/cXML.dtd">
<cXML xml:lang="en-US" payloadID="93369535150910.10.57.136-response" timestamp="2022-11-18T10:57:14-05:00">
<Response>
<Status code="200" text="OK">Order accepted</Status>
</Response>
</cXML>
Response element details
A standard cXML response has a root element and a Response element. The subsections below explain each element and its fields.
cXML root
Applies identifying information to the entire response payload
<cXML xml:lang="en-US" payloadID="93369535150910.10.57.136-response" timestamp="2022-11-18T10:57:14-05:00"> ... </cXML>
Response
Indicates that your eCommerce platform either accepted or rejected the PO
<Response> <Status code="200" text="OK">Order accepted</Status> </Response>