8. Create PO-backed Credit Memo
Task
One of the great things about Coupa is its flexibility. You have two ways of creating a a credit:
- A standard invoice with negative quantity or unit price, but not both
- A credit memo invoice with positive quantity and unit price, referencing the original invoice number
Using the API
Use the API to deliver this sample file: Sample cXML Credit Memo.
Using Flat File
For flat file integration, pass the following fields along with other fields to create a credit memo
Is Credit Note
- Set this to ‘Yes’Original Invoice Number
- Set this to the original Invoice number against which credit memo would be createdOriginal Invoice date
- Set this to the original Invoice date
Use the background loader to deliver this this sample file to Coupa: 08-credit-memo-sample.csv.
Test case
Create a credit invoice for invoice created in Scenario 5. Your credit invoice can use type standard
or creditInvoice
.
If standard, either the quantity or unit price must be negative. Both cannot be negative. If a credit memo, quantity and unit price must be positive values, and you must pass the original invoice number that the invoice is crediting.
Make sure your cXML invoice file passes Coupa validations by ensuring the following:
- Line 2 references
InvoiceDetail.dtd
- Header credentials match the set up in Coupa
DocumentReference payloadID
is a Coupa POlineNumber
matches the Coupa PO lineUnitOfMeasure
matches the Coupa PO line