4. Create a Backed Invoice with Custom Fields
Task
Now that you've created simple backed and unbacked invoices, it's time to get a bit more complicated. For the purchase order you retrieved in Scenario 1, create an invoice that includes header custom fields, but don't worry about adding multiple lines.
Using the API
Use the API to post this sample cXML invoice to Coupa: cXML Invoice not PO Backed (with Header Custom Field).
Using Flat File
Use the background loader to deliver this this sample file to Coupa: 04-invoice_incoming-single-line-header-tax-and-custom-field.csv.
Testing
Create a PO-backed invoice with header tax and custom fields. 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 valid Coupa POlineNumber
matches the Coupa PO lineUnitOfMeasure
matches the Coupa PO line
Open the Invoice in Coupa and ensure all fields including header level tax and custom fields data appear as expected.