When an integrated invoice is sent to Unimarket the document is validated to ensure that all the required elements are included, the summary totals match the calculated totals of the lines, there is a matching purchase order and matching lines. Providing this validation step is successful the invoice will be processed based on the customers settings. If the validation fails then an error response is sent back.
Below are some examples of errors you might receive when an invoice fails validation and suggested solutions on how to fix them.
INVOICE integration is not enabled
Failed to authenticate for CXML message: The site or user credentials are invalid
Invalid credentials. Problems were: [CommunitySite with DUNS [XXXXX] does not exist]
Invalid credentials. Problems were: [CommunitySite with UUID [XXXXX] does not exist]
Invalid credentials. Problems were: [CommunitySite with code [XXXXX] does not exist]
Invalid credentials. Problems were: []
Invoice Detail must have an order id
No order exists in [Customer] for [Supplier] with the order number: 'XXXXX'
An invoice with invoice number 'XXXXX' has already been processed
'null' is not a valid long (InvoiceDetailItem/lineNumber)
InvoiceDetailRequestHeader/invoiceDate: Could not parse XXXXX
Each line does not have a 'InvoiceDetailItemReference/ItemID/SupplierPartID' element
'InvoiceDetailLineIndicator/@isTaxInLine' is set to '' but some lines have a 'Tax' element
'InvoiceDetailOrder/InvoiceDetailItem/UnitPrice/Money' must be a number
The supplied value (XXX) does not have the same currency (XXX) as this
The order with the order number: 'XXXXX' cannot be invoiced at this time
Invalid Unit Of Measure [XXXXX] on line [X] of Invoice [XXXXX]
Could not find order item in order 'XXXXX' at line 'X'
Could not find order item in order 'XXXXX' with the sku 'XXXXX'
Subtotal in summary (XXX XXX.XX), does not match subtotal of lines (XXX XXX.XX)
Tax in summary (XXX XXX.XX), does not match tax of lines (XXX XXX.XX)
Gross amount (XXX XXX.XX) should be subtotal + tax + shipping + special handling (XXX XXX.XX)
Invoice Message Accepted
<Status code="201" text="Invoice Message Accepted"/>
This shows that the invoice has passed validation, matches successfully with a purchase order and lines.
Solution
No further action is required.
INVOICE integration is not enabled
<Status code="400" text="INVOICE integration is not enabled."/>
The inbound integration has not been enabled for your supplier store. This needs to be enabled before any invoices will be processed.
Solution
Contact Unimarket Support via support@unimarket.com to request this be enabled for your supplier store.
Failed to authenticate for CXML message: The site or user credentials are invalid
<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.
Solution
Contact Unimarket Support via support@unimarket.com to confirm the credentials for the cXML Header From, To and Sender elements. Please include the customer this relates to. cXML Header Credentials are explained here: cXML Header (Credentials).
Invalid credentials. Problems were: [CommunitySite with DUNS [XXXXX] does not exist]
<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 with any customers.
Solution
Contact Unimarket Support via support@unimarket.com to confirm the credentials for the cXML Header To element. Please include the customer this relates to. cXML Header Credentials are explained here: cXML Header (Credentials).
Invalid credentials. Problems were: [CommunitySite with UUID [XXXXX] does not exist]
<Status code="400" text="Invalid credentials. Problems were: [CommunitySite with UUID [XXXXX] does not exist]"/>
The unimarket-id identifier in the cXML header To element does not match with any customers.
Solution
Contact Unimarket Support via support@unimarket.com to confirm the credentials for the cXML Header To element. Please include the customer this relates to. cXML Header Credentials are explained here: cXML Header (Credentials).
Invalid credentials. Problems were: [CommunitySite with code [XXXXX] does not exist]
<Status code="400" text="Invalid credentials. Problems were: [CommunitySite with code [XXXXX] does not exist]"/>
The unimarket-code identifier in the cXML header To element does not match with any customers.
Solution
Contact Unimarket Support via support@unimarket.com to confirm the credentials for the cXML Header To element. Please include the customer this relates to. cXML Header Credentials are explained here: cXML Header (Credentials).
Invalid credentials. Problems were: []
<Status code="400" text="Invalid credentials. Problems were: []"/>
The credentials supplied in the cXML header are invalid. This is typically caused by an invalid cXML Header credential domain being used like "NetworkID".
Solution
Ensure you are sending a valid cXML Header Domain as explained here: cXML Header (Credentials)
Country code must not be blank cxmlPostalAddress=CXMLPostalAddress: name=null, deliverTo=null, street1=XXXXX, street2=null, street3=null, city=XXXXX, state=null, postcode=XXXXX, countryName=XXXXX, countryCode=null"
<Status code="400" text="Country code must not be blank cxmlPostalAddress=CXMLPostalAddress: name=null, deliverTo=null, street1=XXXXX, street2=null, street3=null, city=XXXXX, state=null, postcode=XXXXX, countryName=XXXXX, countryCode=null"/>
The billTo Contact must have a valid isoCountryCode attribute that is not null.
Solution
Ensure you are sending a valid isoCountryCode attribute in the billTo Contact as shown in the example here: cXML Request
Invoice Detail must have an order id
<Status code="400" text="Invoice Detail must have an order id"/>
The InvoiceDetailOrderInfo element is missing from the InvoiceDetailOrder element. This includes the OrderReference element which matches this invoice to the purchase order.
Solution
Ensure you are sending the InvoiceDetailOrderInfo element as explained here: InvoiceDetailOrder
No order exists in [Customer] for [Supplier] with the order number: 'XXXXX'
<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 purchase order raised by the customer with the supplier.
Solution
Contact the customer to ensure the purchase order number is a valid Unimarket purchase order number.
An invoice with invoice number 'XXXXX' has already been processed
<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.
Solution
If the original invoice has not been matched or has been rejected you may be able to cancel the invoice. To do this log into the supplier portal, search for the invoice and select the invoice number. When viewing the invoice, in the top right hand corner click More Actions and select Cancel, provide a reason and click OK. You can now re-send this invoice.
If the original invoice has been accepted or downloaded then invoices with the same number will be rejected as duplicates. Please use a unique invoice number.
'null' is not a valid long (InvoiceDetailItem/lineNumber)
<Status code="400" text="'null' is not a valid long (InvoiceDetailItem/lineNumber)"/>
The lineNumber attribute is not found or contains an invalid number.
Solution
Ensure you are sending the lineNumber Attribute as explained here: InvoiceDetailItemReference
InvoiceDetailRequestHeader/invoiceDate: Could not parse XXXXX
<Status code="400" text="InvoiceDetailRequestHeader/invoiceDate: Could not parse XXXXX"/>
The invoiceDate attribute is not a valid date.
Solution
Ensure you are sending the invoiceDate attribute as explained here: InvoiceDetailRequestHeader
Each line does not have a 'InvoiceDetailItemReference/ItemID/SupplierPartID' element
<Status code="400" text="Each line does not have a 'InvoiceDetailItemReference/ItemID/SupplierPartID' element"/>
The SupplierPartID element is not found in every line.
Solution
Ensure you are sending all the required elements of the InvoiceDetailItem as explained here: InvoiceDetailItem
Argument for @NotNull parameter 'unitOfMeasure' of com/unimarket/invoicing/domain/InvoiceLineItemImpl.<init> must not be null
<Status code="400" text="Argument for @NotNull parameter 'unitOfMeasure' of com/unimarket/invoicing/domain/InvoiceLineItemImpl.<init> must not be null"/>
The unitOfMeasure element is not found in every line.
Solution
Ensure you are sending all the required elements of the InvoiceDetailItem as explained here: InvoiceDetailItem
Unit Of Measure [XX] on line [X] of Invoice [XXXXXX] does not match the one on the corresponding Order line [XX]
<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 Order line.
Solution
Ensure you are sending the correct Unit Of Measure as shown on the Order. To avoid this in the future you may want to update your catalogue to ensure the current Unit Of Measure is available.
'InvoiceDetailLineIndicator/@isTaxInLine' is set to '' but some lines have a 'Tax' element
<Status code="400" text="'InvoiceDetailLineIndicator/@isTaxInLine' is set to '' but some lines have a 'Tax' element"/>
Tax elements have been found at the line level in the InvoiceDetailItem element however the isTaxInLine attribute has not been set in the InvoiceDetailLineIndicator element.
Solution
Ensure you are sending all the required elements of the InvoiceDetailRequestHeader as explained here: InvoiceDetailRequestHeader
'InvoiceDetailOrder/InvoiceDetailItem/UnitPrice/Money' must be a number
<Status code="400" text="'InvoiceDetailOrder/InvoiceDetailItem/UnitPrice/Money' must be a number."/>
The Money element is not found or contains an invalid number.
Solution
The UnitPrice/Money element must not contain any special characters. Only numbers and a single decimal character. Do not use a thousand separator. The UnitPrice element is explained here: UnitPrice
The supplied value (XXX) does not have the same currency (XXX) as this
<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 different to other currency attributes.
Solution
Ensure you are sending a consistent currency for all lines and summary totals in the invoice.
This money instance [XXX XXXXX.XX] does not have the same currency as the supplied instance [XXX XXXXX.XX]
<Status code="400" text="This money instance [XXX XXXXX.XX] does not have the same currency as the supplied instance [XXX XXXXX.XX]"/>
The invoice contains a different currency to the purchase order currency.
Solution
Contact your customer to ensure you have raised the invoice in the expected currency.
The order with the order number: 'XXXXX' cannot be invoiced at this time
<Status code="400" text="The order with the order number: 'XXXXX' cannot be invoiced at this time"/>
The purchase order number that is referenced in the invoice has been closed. This means no actions can be processed against it, including: editing, cancelling or receiving lines on the order as well as Invoices and Credits will no longer be accepted.
Purchase orders that have been paid via Credit Card or Stripe will be automatically closed and any invoice raised against those orders will be rejected for the same reason.
Solution
Contact your customer to understand why the order is now closed. If the customer re-opens the order then you can re-send this invoice.
Invalid Unit Of Measure [XXXXX] on line [X] of Invoice [XXXXX]
<Status code="400" text="Invalid Unit Of Measure [XXXXX] on line [X] of Invoice [XXXXX]"/>
The UnitOfMeasure provided on the invoice line does not match the Unit Of Measure for the purchase order line.
Solution
Ensure you are sending the correct UnitOfMeasure value that matches what was on the purchase order line as explained here: UnitOfMeasure
Could not find order item in order 'XXXXX' at line 'X'
<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.
Solution
Ensure you are only invoicing lines that appear on the purchase order. Contact your customer to discuss how to invoice for lines that are in addition to the original purchase order lines. This might require an additional purchase order to be generated.
Could not find order item in order 'XXXXX' with the sku 'XXXXX'
<Status code="400" text="Could not find order item in order 'XXXXX' with the sku 'XXXXX'"/>
Unimarket couldn't match an invoice line to the purchase order line based on the SupplierPartID.
Solution
Ensure you are only invoicing lines that appear on the purchase order. Contact your customer to discuss how to invoice for lines that are in addition to the original purchase order lines. This might require an additional purchase order to be generated.
Subtotal in summary (XXX XXX.XX), does not match subtotal of lines (XXX XXX.XX)
<Status code="400" text="Subtotal in summary (XXX XXX.XX), does not match subtotal of lines (XXX XXX.XX)"/>
The calculated sum of the subtotal for each line does not match the SubtotalAmount in the InvoiceDetailSummary.
Solution
Ensure the SubtotalAmount is the calculated sum of the subtotal for each line as explained here: SubtotalAmount
Tax in summary (XXX XXX.XX), does not match tax of lines (XXX XXX.XX)
<Status code="400" text="Tax in summary (XXX XXX.XX), does not match tax of lines (XXX XXX.XX)"/>
The calculated sum of the tax for each line does not match the Tax in the InvoiceDetailSummary.
Solution
Ensure the Tax is the calculated sum of the tax for each line as explained here: Summary Tax
Gross amount (XXX XXX.XX) should be subtotal + tax + shipping + special handling (XXX XXX.XX)
<Status code="400" text="Gross amount (XXX XXX.XX) should be subtotal + tax + shipping + special handling (XXX XXX.XX)"/>
The calculated sum of the Subtotal, Tax, Shipping and Special Handling does not match the GrossAmount in the InvoiceDetailSummary.
Solution
Ensure the GrossAmount the calculated sum of the Subtotal, Tax, Shipping and Special Handling as explained here: GrossAmount
Internal Server Error
<Status code="500" text="Internal Server Error"/>
An error has occurred trying to validate and process the invoice.
Solution
Contact Unimarket Support via support@unimarket.com to investigate this error further. Please also provide a copy of the cXML invoice to help with troubleshooting.