# Sage

![Sage_logo.svg](https://assets.relyanceuat.xyz/images/docs/12757605489293/12757170237197.svg)
Sage is a web-based online accounting software that allows business owners to track their income and expenses, track inventory, and manage invoices. It offers accounting, customer relationship management (CRM), human resource management, and a number of other financial modules.

In order to integrate Sage with Relyance AI you will need to follow an OAuth2 flow.

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Sage** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Oauth2 / App Token**.
8. Click **Authenticate**.
9. This will bring you to Sage to authorize Relyance. Follow the authorization flow.
10. At this point, you should see the following result on the **Vendor** Integrations page:

![Sage-1.png](https://assets.relyanceuat.xyz/images/docs/12757605489293/12757409248525.png)

![Sage-2.png](https://assets.relyanceuat.xyz/images/docs/12757605489293/12757437395341.png)

11. Congratulations, you are now connected to **Sage**.

<!-- auth-methods:begin (generated from the integration catalog; do not hand-edit) -->

## Authentication methods and fields

Pick one of these under **Authentication Method** on the connection wizard's **Authentication** step. This table is generated from the integration catalog, so it always matches what the form actually asks for.

| Method | Required | Optional |
| --- | --- | --- |
| **Oauth2 / App Token** | — | — |
| **DSR Oauth2 / App Token** | — | — |

<!-- auth-methods:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

### OAuth (browser authorization)

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example sage/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

### OAuth (browser authorization) — DSR Oauth2 / App Token

The **OAuth (browser authorization) — DSR Oauth2 / App Token** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example sage/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
