Skip to main content

 

 

Coupa Success Portal

3.7 Modify a Lookup Value

Using API

  1. Change a Lookup Value's details in the Finance / Procurement system.
  2. The ERP Connector platform should trigger an API call to Coupa using the Lookup Value GET API to query the Lookup Value’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 Lookup Value in Coupa using the Lookup Value <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 Lookup Value's details are modified correctly in Coupa.

Sample API

In this example, a Lookup Value is queried based on the Lookup Value's name (Sub1); then the API response Coupa Lookup Value <id> is used to update the Coupa Lookup Value with a new name.

GET

https://<instance_url>/api/lookup_values ?name=Sub1

Payload

<?xml version="1.0" encoding="UTF-8"?>
<lookup-values type="array">
  <lookup-value>
    <id type="integer">6</id>
    <created-at type="dateTime">2013-12-06T20:50:56Z</created-at>
    <updated-at type="dateTime">2013-12-06T21:33:09Z</updated-at>
    <active type="boolean">true</active>
    <name>Sub1</name>
    <description>Sub1</description>
    <external-ref-num nil="true" />
    <external-ref-code>Sub1</external-ref-code>
    <parent-id nil="true" />
    <lookup-id type="integer">4</lookup-id>
    <depth type="integer">0</depth>
    <account-type nil="true" />
    <is-default nil="true" />
  </lookup-value>
</lookup-values>

Take the Lookup Value's <id> from the response payload (<id>6</id>).

PUT

https://<instance_url>/api/Lookup Values/6

Payload

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

Using CSV

  1. Change a Lookup Value'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/Lookup Values folder on the Coupa sFTP site.
  4. Once the scheduled job picks up and processes the file, validate that the Lookup Value's details are updated correctly in Coupa.

Sample CSV

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

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