# Constant Contact

![ConstanctContact-logo.svg](https://assets.relyanceuat.xyz/images/docs/7508185897997/7507971036173.svg)
Constant Contact is an online and easy-to-use email marketing tool that enables business owners to create email marketing templates, automate and manage campaigns, and build contact lists. It provides a range of intuitive marketing applications designed to help businesses and nonprofits expand their customer bases and nurture relationships.

In order to integrate Constant Contact with Relyance AI you will need a **Client ID** and **Client Secret**.

#### In Constant Contact:

1. Login to your Constant Contact account.
2. Go here to create a new App: [https://app.constantcontact.com/pages/dma/portal/](https://app.constantcontact.com/pages/dma/portal/)
3. Ensure you're on the **My Applications** tab.
4. Click **New Application**.
5. Provide a name for the new application and click **Save**.
6. Once saved, you should be brought into the App Details.
7. Copy the **API Key** to be used as the **Client ID**.
8. In the App Details, set the **Redirect URI** to: [https://root.relyance.ai/api/oauth2](https://root.relyance.ai/api/oauth2)
9. Click **Generate Secret** (and again in the pop-up box).
10. Copy the secret to be used in Relyance AI.  This secret will only be shown once.
11. Click **Save** to finish creating your app.

![ConstantContact-1.png](https://assets.relyanceuat.xyz/images/docs/7508185897997/7508667034637.png)

![ConstantContact-2.png](https://assets.relyanceuat.xyz/images/docs/7508185897997/7508728180109.png)

![ConstantContact-3.png](https://assets.relyanceuat.xyz/images/docs/7508185897997/7508728115981.png)

#### 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 **Constant Contact** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Oauth2 / App Token**.
8. Paste the **Client ID** and **Client Secret** into their respective fields.

![ConstantContact-5.png](https://assets.relyanceuat.xyz/images/docs/7508185897997/7508728024589.png)

9. Click **Authenticate**.
10. Once saved, you'll be brought to Constant Contact to allow Relyance AI permissions.
11. Click **Allow Access**.
12. At this point, you should see the following result on the **Vendor** Integrations page:

![ConstantContact-6.png](https://assets.relyanceuat.xyz/images/docs/7508185897997/7508728026509.png)

13. Congratulations, you are now connected to **Constant Contact**.

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

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **Authorised, then empty.** The connection carries an authorisation, not a password: it stops returning data if the account that granted it loses access, its own permissions narrow, or the grant is revoked at the vendor. None of that reports an error here -- the connection keeps its last status until the next scan.
2. **A credential rotated at the vendor is not picked up here.** **Client Secret** is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

<!-- failure-modes: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`.

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 constant_contact/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

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