Amazon Invoice Error

Created by Dawn Stevens, Modified on Fri, 8 Mar, 2024 at 4:07 PM by Dawn Stevens

ABOUT:  This article has the instructions for fixing the Amazon Invoice Error.


FILTER EXAMPLE IN MAP: Amazon Invoice Number 000000000229483 is Missing for Stock Code 45031


Run SQL Script.

 

update a
Set a.UserDef = c.LINE_NO
from SorDetailRep AS a
inner join SorMasterRep AS b
on a.Invoice = b.InvoiceNumber
inner join WS_EdiCustomerPO_Details c
on b.CustomerPoNumber = c.PurchaseOrder
where a.StockCode = c.WSI_StockCode
and a.Invoice = '000000000229483'

 

 

Update EOD_Proc to null.  SQL Lite will let you right click on this field and set as null.

Select * from WS_EdiOutboundDoc where EOD_Proc = 'N' order by EOD_DocKey DESC

 

A screenshot of a computer

Description automatically generated

 

If this works, this means that the PO Line number is missing in the Syspro Invoice Table which is needed due to the source using it as Foreign key to turn around correct number.  Very crucial that Amazon uses this due to sending same item numbers in one PO.  

If it doesn’t work, then look into other issues.   Maybe the PO Line number is missing altogether in the TAT tables (turnaround) also.  Add that one in that table via EDI PO then run the beginning script again.  See next page.

 

Running the below script shows that the last stock code is missing.  This is due to the PO having a condition to ignore this item and exclude it from the PO and customer support placing it back in the order.  Get the failed PO#, find in Transactions in Biz and download.   Rerun the PO through Mapper only.

Script showing missing Line No.

select StockCode, UserDef from SorDetailRep where Invoice = '000000000229872'

 

A screenshot of a computer

Description automatically generated

 

Get PO# from Failed Operation, Actions Tab.

Map Name:   IB-850-4010_Amazon_v5

The map will replace the turn around table information by clearing them and reposting the items.  Download the PO and run in Test tab of Mapper and then rerun the big script.   See screen shot on next page.

A screenshot of a computer

Description automatically generated

 

Run this script again to update the invoice table with Turn Around Tables Line number.

update a

Set a.UserDef = c.LINE_NO

from SorDetailRep AS a

inner join SorMasterRep AS b

on a.Invoice = b.InvoiceNumber

inner join WS_EdiCustomerPO_Details c

on b.CustomerPoNumber = c.PurchaseOrder

where a.StockCode = c.WSI_StockCode

and a.Invoice = '000000000229872'

 

 

After running the script above, it is now available in field.  

A screenshot of a computer

Description automatically generated

 

Run this script below and change the EOD_Proc to Null, so it will retrigger.  Resolve the Failed Operation from first error.  

Select * from WS_EdiOutboundDoc where EOD_Proc = 'N' order by EOD_DocKey DESC

 

A screenshot of a computer

Description automatically generated

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article