Post cXML ASN to Coupa
- Decide on the supplier you want to test and make sure the supplier's record, under Invoicing, the suppliers credentials are populated since they're also used for cXML ASNs.
- Create an order within Coupa for the supplier by submitting a req and approving it.
- Modify the sample payload (below) so it's updated with the proper supplier credentials (from the supplier record, above) and order details (from the Orders tab).
- Use your favorite REST API client to POST your modified payload the following URL:
https://{customer_instance_name}/cxml/ship_notice_request
. - Within Coupa, to go Spend History > ASNs at
https://{customer_instance_name}/user/asn_headers
and make sure that the<ShipmentIdentifier>
from the payload is listed in the Tracking # column.
Sample Payload
You'll need to update this example cXML with the details of your supplier and order before posting.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.020/Fulfill.dtd"> <cXML payloadID="i-am-a-payload-id" xml:lang="en-US" timestamp="2000-10-14"> <Header> <From> <Credential domain="sSDzdfxfg"> <Identity>fgsdhgjh</Identity> </Credential> </From> <To> <Credential domain="sgdf"> <Identity>sdfdafdfg</Identity> </Credential> </To> <Sender> <Credential domain="sSDzdfxfg"> <Identity>fgsdhgjh</Identity> <SharedSecret>abcde</SharedSecret> </Credential> <UserAgent>Random HTTP Agent</UserAgent> </Sender> </Header> <Request deploymentMode="production"> <ShipNoticeRequest> <ShipNoticeHeader shipmentID="Unique ID" noticeDate="Creation date of cXML ASN" shipmentDate="SHIPMENT START DATE" deliveryDate="SHIPMENT DELIVERY DATE"> <!-- Date format:YYYY-MM-DD --> <!-- Get the Ship From details from CSP Legal Entity --> <Contact role="shipFrom" addressID="Optional unique code given for address in CSP Legal Entity"> <Name xml:lang="en-US">NAME OF LEGAL ENTITY</Name> <PostalAddress> <Street /> <City /> <State /> <PostalCode /> <Country isoCountryCode="US">United States</Country> </PostalAddress> </Contact> <Comments xml:lang="en-US">Got it all into one shipment.</Comments> </ShipNoticeHeader> <ShipControl> <CarrierIdentifier domain="SCAC">USPS</CarrierIdentifier> <CarrierIdentifier domain="companyName">US Postal Service</CarrierIdentifier> <!-- Example Carrier Company names: USPS/UPS>FedEx etc --> <ShipmentIdentifier>1234567890 1234567890 1234577890</ShipmentIdentifier> </ShipControl> <ShipNoticePortion> <!-- Get the OrderID/PayloadID from PO in Coupa enterprise --> <!-- OrderID and PayloadID refer to OrderID in Enterprise. Both are same --> <OrderReference orderID="2883"> <DocumentReference payloadID="2883" /> </OrderReference> <!-- Get the line number that we want to provide the ship notice along with the line quantity --> <ShipNoticeItem lineNumber="1" quantity="1"> <!-- PO Line Unit of Measure --> <UnitOfMeasure>EA</UnitOfMeasure> </ShipNoticeItem> </ShipNoticePortion> </ShipNoticeRequest> </Request> </cXML>