Docs
Sign in

Coupa

Coupa is a spend management system where companies raise purchase requests, send orders to suppliers, receive supplier invoices and approve spend, and this connector lets TAO read that data, act on approvals and, with a person's approval, close or cancel orders.

Screenshot to add: The Coupa card on the My Connectors page, with the Add button.

What you can do

Illustrative examples.

  • "Which Coupa purchase orders are open with Acme?"
  • "What is waiting for my approval in Coupa?"
  • "Which supplier invoices are unpaid?"
  • "Approve that requisition." (A person confirms it first.)

Before you connect

Coupa signs TAO in with what it calls a client. A client is a pair of codes (a client ID and a client secret) that works like a username and password for a program. Coupa uses the OAuth2 "client credentials" method. In plain words, TAO signs in as the program itself, and no person has to log in or click Allow.

You need a Coupa administrator to:

  1. Create an OAuth2/OpenID Connect client under Setup > Integrations > OAuth2/OpenID Connect Clients in Coupa.
  2. Keep the client secret. Coupa shows it only when the client is created. If it was not saved, generate a new one.
  3. Note the client's scopes. A scope is one permission, such as core.purchase_order.read. Coupa grants access scope by scope, and the list differs per Coupa instance. Your instance lists its own at /oauth2/scopes.
  4. Make sure the client holds scopes for the data you want. A token asked for no scopes can look valid and still read nothing.
Field in TAOWhat to enter
Secret box (OIDC client id and secret)The client ID, a colon, then the client secret, in the form clientId:clientSecret. Both must come from the same client.
Coupa instance URL (required)The address you sign in to, for example https://acme.coupahost.com. Nothing after it, and no /api. TAO adds the API path itself.
OAuth scopes (space-separated) (required)The scopes the client was granted, for example core.purchase_order.read core.supplier.read core.approval.write.

Your platform administrator must also switch the connector on under Admin > Platform Config > Connectors. It is added switched off.

Connect it

  1. Open the connector list

    Go to Settings > Connectors (the My Connectors page) and find Coupa.

  2. Click Add

    A window opens for the connection.

  3. Paste the client ID and secret

    Enter them joined by a colon: clientId:clientSecret. Without the colon, Coupa returns a general "invalid client" error that does not say which half is wrong.

  4. Enter the instance URL and scopes

    Fill in Coupa instance URL and OAuth scopes (space-separated). Both are required. An empty scope list is refused rather than treated as "everything".

  5. Save, then check

    Click Save. If Coupa later answers "forbidden", ask TAO to run coupa_describe_granted_scopes. It tells you whether a missing scope or a Coupa user permission is the cause.

Tools

This connector has 17 tools: 12 reads, 3 changes that wait for human approval, and 2 changes that wait for approval and cannot be undone.

Tool nameWhat it doesRead or Write
coupa_list_purchase_ordersLists purchase orders. Filter by status, supplier, PO number or update date.Read
coupa_get_purchase_orderReads one purchase order by its numeric id.Read
coupa_list_requisitionsLists purchase requisitions. A requisition is the request that comes before a purchase order.Read
coupa_list_invoicesLists invoices received from suppliers (money the company owes).Read
coupa_list_suppliersLists suppliers. Inactive suppliers are included unless you filter them out.Read
coupa_get_supplierReads one supplier by id.Read
coupa_list_supplier_sitesLists a supplier's sites, the places goods and services are ordered from.Read
coupa_list_supplier_addressesLists the addresses on file for a supplier. The result carries a caveat: read each address's own purpose, because this is not a guaranteed payment (remit-to) address list.Read
coupa_list_pending_approvalsLists approvals still waiting for a decision. Start here before approving or rejecting.Read
coupa_list_contractsLists contracts. Filter by status, supplier, end date or name.Read
coupa_search_resourceReads any other Coupa resource (for example expense reports or payment terms). Read-only.Read
coupa_describe_granted_scopesChecks what this connection can actually reach, by comparing declared scopes with the ones Coupa granted.Read
coupa_approveApproves one pending approval, using the approval's id (not the document's id).Write (approval)
coupa_rejectRejects one pending approval. Pass a reason, or the requester sees none.Write (approval)
coupa_attach_linkAttaches a web link to a Coupa record. It cannot upload a file.Write (approval)
coupa_cancel_purchase_orderCancels (voids) a purchase order. Coupa has no un-cancel. TAO must confirm the PO number, read from the order.Write (approval, cannot be undone)
coupa_close_purchase_orderCloses a purchase order. Coupa has no re-open, and nothing more can be received or invoiced. TAO must confirm the PO number.Write (approval, cannot be undone)

Total: 17 tools.

Limits and good to know

  • Fifty rows at a time. Coupa silently caps each page at 50 records. TAO reads on through the pages and reports how it paged and whether the list is complete.
  • Filters are checked. Coupa may ignore a filter it does not understand and return everything. TAO reports whether each filter was applied, and tells you to treat a result as unfiltered when it was not.
  • No delete, and no generic write. Coupa's API does not allow deleting. This connector also has no way to deactivate a supplier. Cancel and close are the only order-ending actions.
  • Cancel and close wait for people. Each needs a confirmation on the PO number and a human approval. A chat set to skip approvals cannot skip these.
  • Rate limits are not published. The code says Coupa states none, so TAO names no wait time in its error message.
  • Short wait after sign-in. The connector waits at least 5 seconds between getting a token and first using it. The code says Coupa requires this.
  • Not yet tested live. The product notes describe the connector as built and gated, with no run against a real Coupa instance recorded.