Skip to main content

 

 

Coupa Success Portal

3.2 Modify an Account

Using API

  1. Change an Account's details in the Finance / Procurement system.
  2. The ERP Connector platform should trigger an API call to Coupa using the Account GET API to query the Account’s <id> or <name> that you need to update (based on “name”, for example, but any queryable field/tag can be used depending on business scenario).
  3. The ERP Connector platform should trigger a Coupa PUT API to update the Account in Coupa using the Account <id>.
  4. 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 to investigate.
  5. Validate that the Account's details are modified correctly in Coupa.

Sample API

In this example, an Account is queried based on the Account's name (Test1-Test2-Test3); then the API response Coupa Account <id> is used to update the Coupa Account with a new name.

GET

https://<instance_url>/api/accounts ?name=Test1-Test2-Test3

Payload

<?xml version="1.0" encoding="UTF-8"?>
<accounts type="array">
  <account>
    <id type="integer">1086</id>
    <created-at type="dateTime">2016-09-08T07:10:18Z</created-at>
    <updated-at type="dateTime">2016-09-08T07:10:18Z</updated-at>
    <name>Test1-Test2-Test3</name>
    <code>Test1-Test2-Test3</code>
    <active type="boolean">true</active>
    <segment-1>Test1</segment-1>
    <segment-2>Test2</segment-2>
    <segment-3>Test3</segment-3>
    <segment-4 nil="true" />
    <segment-5 nil="true" />
    <segment-6 nil="true" />
    <segment-7 nil="true" />
    <segment-8 nil="true" />
    <segment-9 nil="true" />
    <segment-10 nil="true" />
    <segment-11 nil="true" />
    <segment-12 nil="true" />
    <segment-13 nil="true" />
    <segment-14 nil="true" />
    <segment-15 nil="true" />
    <segment-16 nil="true" />
    <segment-17 nil="true" />
    <segment-18 nil="true" />
    <segment-19 nil="true" />
    <segment-20 nil="true" />
  </account>
</accounts>

Take the Account's <id> from the response payload (<id>1086</id>).

PUT

https://<instance_url>/api/accounts/1086

Payload

<?xml version="1.0" encoding="UTF-8"?>
<Account>
  <name>SubWay-New-101</name>
</Account>

Using CSV

  1. Change an Account's details in the Finance / Procurement system.
  2. The ERP Connector platform generates a CSV flat file containing the changes that you want to see in Coupa.
  3. The ERP Connector platform places the CSV file to the /Incoming/Accounts folder on the Coupa sFTP site.
  4. Once the scheduled job picks up and processes the file, validate that the Account's details are updated correctly in Coupa.

Sample CSV

Place the CSV file to the/Incoming/Accounts folder, where the file is picked up and processed in 5 minutes, and validate that the Account's details are updated.

For a sample, see row 2 in modify_account.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.

  • Was this article helpful?