Error
Failed to insert the COGS journal for this batch: {reason}
Why am I receiving this error?
The error will include the reason why the journal insert failed.
What do I need to do?
Find the reason in the table below for tips to troubleshoot.
Check for a journal entry in the accounting package and see if a journal was created, despite the error.
Issues with data
Reason | Troubleshooting |
Item code 'xxxxxxxx' is not valid. | Check the length of the product's ID. It may exceed Xero's 30 product ID or 50 character product description character limit. |
Account code 'xxxxx' has been archived, or has been deleted. Each line item must reference a valid account. | Wise-Sync is trying to post to an account that has been archived in Xero. Check settings and re-sync. |
The TaxType code NONE does not exist or cannot be used for this type of transaction. | Ensure that you have a correct tax code set on your invoice. |
The TaxType code EXEMPTOUTPUT cannot be used when Line Amount Types is set to NoTax. | Ensure that the tax code selected on the invoice is correct for Revenue Accounts. |
'x', hexadecimal value xxxxx, is an invalid character. Line x, position x. | Turn on detailed logging and check the XML line and position specified in the error. Replace the invalid character and re-sync. |
You cannot save this transaction using an inventory account type. | Ensure your COGS account is a Direct Cost account. You cannot post to Inventory type accounts. |
Account code 'xxxxxx' is not a valid code for this document. | The account the journal is being posted to is invalid. Check for the account code in Xero. |
The document date cannot be before the period lock date, currently set at dd-Mmm-yyyy. | The period you're trying to post the journal to is locked. Consult with your Accounting Advisor on how to correctly allocate costs into a prior period. |
Item xxxxxx: xxxxx has incorrect inventory asset account specified. | Check if the item been set in Xero as a Tracked Inventory Item. If so, change the existing item in Xero, as we cannot sync items that are tracked in Xero Inventory, the two systems conflict. |
Issues with Xero API
Reason | Troubleshooting |
Object reference not set to an instance of an object. | Database error, contact Wise-Sync Support. |
Token xxxx does not match an expected ACCESS token. | Re-connect your Xero company to Wise-Sync and attempt the sync again. |
There is an error in XML document (1, 2). | There's an issue with the XML, contact Wise-Sync Support. |
An HttpWebResponse could not be obtained from the WebException. Status was Timeout. | These errors indicate transient issue with Xero API at the time of sync. Try the sync again and if it fails with the same reason, contact Wise-Sync Support. |
Xero API returned error http code: ServiceUnavailable. | |
Xero API returned error http code: GatewayTimeout. | |
Xero API returned error http code: InternalServerError. | |
The XeroAPI returned an ApiException response: An error occurred in Xero. |