What can we help you find?
Products
Total Spend Management Platform
Integration Playbooks and Resources
Other Integration Playbooks
ERP Integration Adapters
Integration Scenarios
5. Payment (Invoice) Integration Scenarios
5.1 Create Payment in ERP and Update Coupa
5.1 Create Payment in ERP and Update Coupa
Using API
- Create a Payment for an Invoice previously created during integration in ERP.
- The ERP Connector platform should trigger an API call to Coupa using GET API to query Coupa for the Invoice's
<id
>. The call should query for the Supplier and Invoice number combination (that makes a unique match). - Ensure that you get a 200 API response and it is logged in your ERP Connector platform logging engine. If you get a different API response (for example, 400) error, the API error (returned on API response
<errors><error>
tag(s)) must be logged in the ERP connector platform logging engine and a notification must be sent to the relevant person. - The ERP Connector platform should trigger an API call to Coupa using POST API to update an Invoice with Payment.
- Ensure that you get a 201 API response and it is logged in your ERP Connector platform logging engine. If you get a different API response (for example, 400) error, the API error (returned on API response
<errors><error>
tag(s)) must be logged in the ERP connector platform logging engine and a notification must be sent to the relevant person. - Validate that the Invoice is updated correctly in Coupa.
Sample API
GET
https://<instance>/api/invoices?invoice-number=test1234536&supplier[name[=12345
Response
<invoice-header> <id type=”integer”>106</id> ... ... <invoice-number>test1234536</invoice-number> ... <supplier> <name>12345</name? </supplier> </invoice-header>
POST
https://<instance>/api/invoices/<invoice id> (<invoice id>=”106)
Payload
<?xml version="1.0" encoding="UTF-8"?> <invoice-header> <paid type="boolean">true</paid> <payment-date type="datetime">2016-06-23T00:00:00-08:00</payment-date> <payment-notes>ADAMTEST|#10|USD|1.00|FULLY PAID|</payment-notes> <payments> <payment> <amount-paid>1.00</amount-paid> <notes>10</notes> <payment-date>2016-06-23</payment-date> </payment> </payments> </invoice-header>
Using CSV
- Create a Payment for an Invoice previously created during integration in ERP.
- The ERP Connector platform generates a CSV flat file from your ERP Connector platform. (The file must have at least the mandatory fields populated.)
- The ERP Connector platform places the CSV file to the
/Incoming/Invoice Payments
folder on the Coupa sFTP site. - Once the scheduled job picks up and processes the file, validate that the Invoice is updated with the Payment information correctly in Coupa.
Sample CSV
Place the CSV file to the/Incoming/Invoice Payments
folder, where the file is picked up and processed in 5 minutes, and validate that the Invoice's details are updated.
For a sample file, see create_invoice_payment.csv.
The CSV flat file upload is monitored in Coupa at https://<instance>/data_sources
. Coupa sends a notification to Coupa Admin on an upload failure, and Coupa Admin needs to investigate further.