cXML Invoice Integration Troubleshooting Guide

  • Updated

When an integrated invoice is sent to Unimarket, it undergoes a validation process. If the validation fails, an error response is sent back with a status code and text. Below are examples of common error messages and their suggested solutions.

 

Successful Status Code

Status CodeDescriptionSolution
<Status code="201" text="Invoice Message Accepted"/>The invoice has passed validation and successfully matches a purchase order and its lines.No further action is required.

 

Common Error Codes and Solutions

Error MessageOccurrence/CauseSolution
<Status code="400" text="INVOICE integration is not enabled."/>The inbound integration has not been enabled for your supplier store.Contact Unimarket Support via support@unimarket.com to request this feature be enabled for your store.
<Status code="401" text="Failed to authenticate for CXML message: The site or user credentials are invalid."/>The credentials supplied in the cXML header are invalid.Contact Unimarket Support via support@unimarket.com to confirm the correct credentials for the cXML Header From, To, and Sender elements. Please include the customer this relates to.
<Status code="400" text="Invalid credentials. Problems were: [CommunitySite with DUNS [XXXXX] does not exist]"/>The DUNS identifier in the cXML header <To> element does not match any connected customer.Contact Unimarket Support via support@unimarket.com to confirm the correct credentials for the cXML Header <To> element.
<Status code="400" text="Invalid credentials. Problems were: []"/>The credentials supplied in the cXML header are invalid, often due to an invalid cXML Header domain being used (e.g., "NetworkID").Ensure you are sending a valid cXML Header Domain as defined in the integration documentation.
<Status code="400" text="Country code must not be blank..."/>The BillTo Contact is missing a valid isoCountryCode attribute.Ensure you are sending a valid isoCountryCode attribute in the BillTo Contact element.
<Status code="400" text="Invoice Detail must have an order id"/>The InvoiceDetailOrderInfo element is missing, which is required for matching the invoice to a purchase order via OrderReference.Ensure you are sending the InvoiceDetailOrderInfo element.
<Status code="400" text="No order exists in [Customer] for [Supplier] with the order number: 'XXXXX'"/>The orderID provided in the invoice did not match a valid Purchase Order raised by the customer with the supplier.Contact the customer to ensure the purchase order number is a valid Unimarket PO number.
<Status code="400" text="An invoice with invoice number 'XXXXX' has already been processed"/>The invoice number has already been processed for the customer and supplier (a duplicate).If the original invoice was not matched or was rejected, log into the supplier portal, find the invoice, select More Actions $\to$ Cancel, and then re-send the invoice. Otherwise, use a unique invoice number.
<Status code="400" text="'null' is not a valid long (InvoiceDetailItem/lineNumber)"/>The lineNumber attribute is not found or contains an invalid number.Ensure you are sending the lineNumber Attribute with a valid numerical value.
<Status code="400" text="InvoiceDetailRequestHeader/invoiceDate: Could not parse XXXXX"/>The invoiceDate attribute is not a valid date format.Ensure you are sending the invoiceDate attribute in the correct date format.
<Status code="400" text="Unit Of Measure [XX] on line [X] of Invoice [XXXXXX] does not match the one on the corresponding Order line [XX]"/>The Unit Of Measure provided on the invoice does not match the Unit Of Measure for the corresponding Order line.Ensure the Unit Of Measure sent matches exactly what is on the Purchase Order.
<Status code="400" text="The supplied value (XXX) does not have the same currency (XXX) as this"/>The currency attribute of a <Money> element is inconsistent across the invoice (e.g., line item currency differs from summary currency).Ensure you are sending a consistent currency for all lines and summary totals in the invoice.
<Status code="400" text="The order with the order number: 'XXXXX' cannot be invoiced at this time"/>The referenced Purchase Order has been closed (e.g., automatically closed after Credit Card payment).Contact your customer to understand why the order is closed. If the customer re-opens the order, you can re-send the invoice.
<Status code="400" text="Could not find order item in order 'XXXXX' at line 'X'"/>Unimarket couldn't match an invoice line to the Purchase Order line based on the line number.Ensure you are only invoicing lines that appear on the Purchase Order. Contact your customer to discuss invoicing items in addition to the original PO lines.
<Status code="400" text="Subtotal in summary (XXX XXX.XX), does not match subtotal of lines (XXX XXX.XX)"/>The calculated sum of the line item subtotals does not match the SubtotalAmount in the InvoiceDetailSummary.Ensure the SubtotalAmount in the summary is the exact calculated sum of the subtotal for each line.
<Status code="400" text="Tax in summary (XXX XXX.XX), does not match tax of lines (XXX XXX.XX)"/>The calculated sum of the line item taxes does not match the Tax in the InvoiceDetailSummary.Ensure the Tax in the summary is the exact calculated sum of the tax for each line.
<Status code="400" text="Gross amount (XXX XXX.XX) should be subtotal + tax + shipping + special handling (XXX XXX.XX)"/>The calculated sum of Subtotal, Tax, Shipping, and Special Handling does not match the GrossAmount in the InvoiceDetailSummary.Ensure the GrossAmount is the exact calculated sum of the component amounts.
<Status code="500" text="Internal Server Error"/>An unexpected error occurred while validating and processing the invoice.Contact Unimarket Support via support@unimarket.com to investigate. Please provide a copy of the cXML invoice for troubleshooting.

For resolution of errors related to credentials or integration being disabled, please email support@unimarket.com and include the customer and error message.