# Coupa

Coupa is a cloud procurement platform for managing purchasing, suppliers, invoices, and spend. Connecting Coupa to Duvo lets your assignments read procurement data directly — pulling purchase orders, supplier records, invoices, contracts, and expense reports without manual exports.

## Setup

This is a credential-based connection. You provide your Coupa instance URL and OAuth2 client credentials so Duvo can authenticate against your Coupa REST API.

### Prerequisites

* A Coupa administrator account (or access to someone with one) to create an OAuth2 client.
* Your Coupa instance must be accessible over the internet (most Coupa Cloud instances are by default).
* An OAuth2/OpenID Connect client registered in Coupa with the **Client Credentials** grant type. To create one, go to **Setup > Integrations > OAuth2/OpenID Connect Clients**, click **Create**, and select **Client Credentials** as the grant type.
* The OAuth2 client must have read scopes enabled for the resources your assignments need. Duvo requests the following scopes: `core.common.read`, `core.accounting.read`, `core.approval.read`, `core.supplier.read`, `core.supplier_sites.read`, `core.user.read`, `core.business_entity.read`, `core.purchase_order.read`, `core.purchase_order_only.read`, `core.purchase_order.assignment.read`, `core.purchase_order_change.read`, `core.purchase_order_change.assignment.read`, `core.invoice.read`, `core.invoice.assignment.read`, `core.payables.invoice.read`, `core.requisition.read`, `core.requisition.assignment.read`, `core.contract.read`, `core.contract_party_role.read`, `core.contracts_template.read`, `core.expense.read`, `core.payables.expense.read`. Enable all of these on the OAuth2 client to avoid authentication errors. You can review available scopes at `https://{your-instance}/oauth2/scopes`.

### Connection Fields

| Field             | Description                                                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Instance URL**  | Your Coupa instance URL (for example, `https://your-org.coupacloud.com`). This can end in `.coupacloud.com` or `.coupahost.com` depending on your deployment. |
| **Client ID**     | The OAuth2 client identifier, found in Coupa under **Setup > Integrations > OAuth2/OpenID Connect Clients** after saving the client.                          |
| **Client Secret** | The OAuth2 client secret for authentication, shown alongside the client identifier after saving. Copy and store it securely.                                  |

### Third-Party Documentation

* [OAuth 2.0 Getting Started with Coupa API](https://compass.coupa.com/en-us/products/total-spend-management-platform/integration-playbooks-and-resources/integration-knowledge-articles/oauth-2.0-getting-started-with-coupa-api) — step-by-step guide for creating an OAuth2 client and generating credentials.
* [OpenID Connect Clients](https://compass.coupa.com/en-us/products/product-documentation/integration-technical-documentation/the-coupa-core-api/oauth-2.0-and-oidc/openid-connect-clients) — reference for managing OAuth2/OIDC clients in Coupa, including scope configuration.

## Capabilities

* **Purchase orders** — List, filter, and retrieve purchase orders and their line items, including status, amounts, and supplier details.
* **Invoices** — Look up invoices by date, supplier, status, or amount for reconciliation and audit workflows.
* **Suppliers** — Search and retrieve supplier profiles, contact information, addresses, and compliance status.
* **Requisitions** — Access purchase requisitions and their approval status to track the request-to-order pipeline.
* **Contracts** — Retrieve contract records for compliance checks, renewal tracking, and spend-against-contract analysis.
* **Expense reports and lines** — Pull expense report data and individual line items for policy compliance reviews and spend analysis.
* **Approvals** — Check approval status across procurement documents to identify bottlenecks.
* **Users** — Look up Coupa user profiles, roles, and account groups.
* **Accounts and organizational data** — Query chart of accounts, business entities, departments, and commodity categories for reporting context.
* **Flexible querying** — Filter by any field, sort results, select specific columns, and paginate through large datasets.

## Key Benefits

* **Direct procurement access** — Assignments read from your Coupa instance in real time, eliminating manual data exports and copy-paste workflows.
* **Secure OAuth2 authentication** — Uses the standard Client Credentials grant with scoped permissions, so access is limited to exactly what you authorize.
* **Broad data coverage** — Covers the core procurement lifecycle from requisitions through purchase orders, invoices, contracts, and expenses.
* **Read-only by design** — The connection only reads data from Coupa. It does not create, modify, or delete any records.

## Works Well With

* **Google Sheets or Microsoft Excel** — Pull Coupa spend data, purchase order summaries, or supplier lists into spreadsheets for financial analysis and stakeholder reporting.
* **Gmail or Microsoft Outlook** — Retrieve procurement records and include them in automated approval notifications, spend summaries, or vendor communication.
* **Slack or Microsoft Teams** — Post purchase order status updates, invoice alerts, or spend threshold notifications to relevant channels.
