# Linking Coupa as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

**Alpha source**

The Coupa source is currently in **alpha**. If you run into issues, please let us know.

The Coupa connector syncs spend management data from your Coupa instance into PostHog, including invoices, purchase orders, requisitions, suppliers, contracts, expense reports, users, and approvals.

## Prerequisites

Before linking Coupa, you need an OIDC client set up in your Coupa instance:

1.  In Coupa, go to **Setup** > **Integrations** > **OAuth2/OpenID Connect Clients**.
2.  Create a new OIDC client using the **client credentials** grant type.
3.  Grant it read scopes for the objects you want to sync:

| Table | Required scope |
| --- | --- |
| Invoices | core.invoice.read |
| Purchase orders | core.purchase_order.read |
| Requisitions | core.requisition.read |
| Suppliers | core.supplier.read |
| Contracts | core.contract.read |
| Expense reports | core.expense.read |
| Users | core.user.read |
| Approvals | core.approval.read |

You only need to grant scopes for the tables you plan to sync. If your Coupa instance doesn't support per-object scopes, PostHog falls back to a scope-less token request that uses whichever scopes the admin granted the OIDC client.

## Linking Coupa

1.  Go to the [Data pipeline page](https://app.posthog.com/data-management/sources) and the **Sources** tab in PostHog.
2.  Click **\+ New source** and select Coupa.
3.  Provide your Coupa instance URL (e.g., `https://myorg.coupahost.com`). Only HTTPS URLs are accepted.
4.  Provide the **Client ID** from your OIDC client.
5.  Provide the **Client secret** from your OIDC client.
6.  *Optional:* Add a prefix to your table names.
7.  Click **Next**.

The data warehouse then starts syncing your Coupa data. You can see details and progress in the [data pipeline sources tab](https://app.posthog.com/data-management/sources).

## Sync behavior

All Coupa tables support incremental syncing using Coupa's `updated_at` filter. On incremental syncs, PostHog only fetches records modified since the last sync, which keeps sync times short and reduces API usage.

If a sync is interrupted, it resumes from where it left off rather than starting over.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| Instance URL | text | Yes |
| Client ID | text | Yes |
| Client secret | password | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| invoices | A supplier invoice submitted for payment in Coupa. | Incremental, Full refresh | updated_at | — |
| purchase_orders | A purchase order issued to a supplier in Coupa. | Incremental, Full refresh | updated_at | — |
| requisitions | A purchase requisition requesting goods or services in Coupa. | Incremental, Full refresh | updated_at | — |
| suppliers | A supplier (vendor) that goods or services are purchased from in Coupa. | Incremental, Full refresh | updated_at | — |
| contracts | A contract governing terms with a supplier in Coupa. | Incremental, Full refresh | updated_at | — |
| expense_reports | An employee expense report submitted for reimbursement in Coupa. | Incremental, Full refresh | updated_at | — |
| users | A user account within the Coupa instance. | Incremental, Full refresh | updated_at | — |
| approvals | An approval step recorded against a document in a Coupa approval chain. | Incremental, Full refresh | updated_at | — |

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better