8. Create PO-backed Credit Memo

Revised: 04 May 2016

Task

One of the great things about Coupa is its flexibility. You have two ways of creating a a credit:

  1. A standard invoice with negative quantity or unit price, but not both
  2. 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

  1. Is Credit Note - Set this to ‘Yes’
  2. Original Invoice Number - Set this to the original Invoice number against which credit memo would be created
  3. Original 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 PO
  • lineNumber matches the Coupa PO line
  • UnitOfMeasure matches the Coupa PO line