# Optimizely

![Optimizely_Logo.svg](https://assets.relyanceuat.xyz/images/docs/12027451529485/12028648120333.svg)
Optimizely is an online Digital Experience Platform (DXP) software as a service. It provides A/B testing and multivariate testing tools, website personalization, and feature toggle capabilities, as well as web content management and digital commerce.

In order to integrate Optimizely with Relyance AI you will need an **Access Token**.

#### In Optimizely:

1. Login to your Optimizely account.
2. Click **Profile** on the bottom left hand corner of the navigation tree.
3. Select the **API Access** tab.
4. Click **Generate New Token**.
5. In the pop-up dialog, provide a meaningful name (e.g. Relyance Scan) and click **Create**.
6. Copy the newly generated **Access Token** to be used in Relyance.

![Optimizely-3.png](https://assets.relyanceuat.xyz/images/docs/12027451529485/12029182129037.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 **Optimizely** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **Access Token** into its respective field.

![Optimizely-1.png](https://assets.relyanceuat.xyz/images/docs/12027451529485/12029159643149.png)

The **Authentication** step asks for:

- **Access Token**: required; held as a secret.

9. Click **Authenticate**.
10. At this point, you should see the following result on the **Vendor** Integrations page:

![Optimizely-2.png](https://assets.relyanceuat.xyz/images/docs/12027451529485/12029182125709.png)

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

<!-- 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`.

```hcl
resource "relyance_integration_connection" "optimizely" {
  vendor = "optimizely"
  name   = "<your connection name>"

  auth = {
    method = "access-token"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      access_token = var.optimizely_access_token
    }
    secrets_wo_version = 1
  }

  scans = { "property-inspection" = { enabled = true } }
}
```

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