--- title: Index using Optimizely Connect Platform slug: pbp90022 canonical_url: https://docs.coveo.com/en/pbp90022/ collection: coveo-for-optimizely source_format: adoc --- # Index using Optimizely Connect Platform You can index your Optimizely content in Coveo using the Optimizely Connect Platform (OCP). This method involves creating a custom data sync destination app in OCP. The custom app manages the data transfer from Optimizely to a Coveo [source](https://docs.coveo.com/en/246/) using the Coveo Push or Stream API. After configuring the data sync in the OCP Sync Manager, the first sync automatically loads all your Optimizely content to Coveo. Subsequent syncs only transfer new or updated content following the sync schedule you define. ## Prerequisites * An Optimizely account with access to the OCP. * A [Coveo organization](https://docs.coveo.com/en/185/). * A Coveo Push or Catalog source, depending on the nature of your Optimizely content: ** For non-product content, use a [Push source](https://docs.coveo.com/en/1546/). ** For product content, use a [Catalog source](https://docs.coveo.com/en/n8of0593/). * [Coveo fields](https://docs.coveo.com/en/1833#add-a-field) to map your Optimizely content to. > **Tip** > > Use the same field names as in Optimizely to simplify field mapping in the OCP Sync Manager. * A [custom API key](https://docs.coveo.com/en/1718#create-a-custom-key) with the privileges to: ** [Push items](https://docs.coveo.com/en/1546#api-key) to your Coveo source. ** (Optional) Retrieve your list of Coveo fields, that is, the **Content** > **Fields** > **View** privilege. > **Note** > > This privilege is only required if you set up a dynamic schema in your [OCP destination app](#build-the-coveo-ocp-destination-app). ## Data synchronization architecture and flow The diagrams below illustrate the architecture and data flow when indexing Optimizely content using OCP and a Coveo custom data sync destination app. **Flow diagram for non-product content** [%collapsible%open] #### {empty} ![Data sync architecture and flow for Push source | Coveo](https://docs.coveo.com/en/assets/images/coveo-for-optimizely/indexing-optimizely-using-push-and-ocp-destination-app.png) #### {empty} **Flow diagram for product content**
Details {empty} ![Data sync architecture and flow for Catalog source | Coveo](https://docs.coveo.com/en/assets/images/coveo-for-optimizely/indexing-optimizely-using-stream-and-ocp-destination-app.png)
## Set up the architecture components The following sections guide you through the steps to replicate the architecture and configure each component. ### Build the Coveo OCP destination app The indexing process uses a custom Coveo destination app in the OCP Sync Manager. Coveo doesn't provide a prebuilt destination app. You must [build one](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/data-sync-destination) yourself or [engage Coveo Professional Services](https://www.coveo.com/en/services/professional-services) to build it for you. The destination app includes: * A [destination declaration](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/data-sync-destination#declare-destinations-in-the-app-manifest-file). * The [schema](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/data-sync-destination#declare-the-schema) which defines the Coveo fields which can accept data from Optimizely. In an OCP Sync Manager data sync configuration, the fields defined in the schema are displayed as available destination fields when adding field mappings. > **Note** > > If you set up a dynamic schema, your custom API key must include the [privilege to retrieve your list of Coveo fields](#prerequisites). > Getting the list of fields requires a POST request to the `fields/search` endpoint for your deployment region: > > * US: `+https://platform.cloud.coveo.com/rest/organizations/{organizationId}/fields/search+` > > * EU: `+https://platform-eu.cloud.coveo.com/rest/organizations/{organizationId}/fields/search+` > > * AU: `+https://platform-au.cloud.coveo.com/rest/organizations/{organizationId}/fields/search+` > > * CA: `+https://platform-ca.cloud.coveo.com/rest/organizations/{organizationId}/fields/search+` > > For more information, see [List fields](https://docs.coveo.com/en/8/api-reference/field-api#tag/Fields/operation/getFields). * The [implementation logic](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/data-sync-destination#implement-the-logic) which handles the data transfer from Optimizely to Coveo using the [Push API](https://docs.coveo.com/en/68/) or [Stream API](https://docs.coveo.com/en/p48b0322/). ### Validate, publish, and install the destination app Follow the [OCP documentation](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/build-an-app-ocp2#validate-prepare-publish-and-install-the-app) to validate, publish, and install your custom Coveo destination app in your OCP account. ### Define the app settings OCP apps include a **Settings** tab that you can access after you install the app. The [settings form](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/build-an-app-ocp2#define-the-app-settings-form) for your Coveo destination app should include input elements for the following parameters: * The target Coveo [organization ID](https://docs.coveo.com/en/n1ce5273/). * The target Coveo [source ID](https://docs.coveo.com/en/3390#copy-a-source-name-or-id). * The custom API key created in the [prerequisites](#prerequisites). > **Leading practice** > > Use the [`secret`](https://docs.developers.optimizely.com/optimizely-connect-platform/docs/form-elements-ocp2#secret) form element type for sensitive information. ### Set up the data sync in the OCP UI Follow the [OCP documentation](https://support.optimizely.com/hc/en-us/articles/37409653497101-Create-a-data-sync) to create a data sync configuration in the OCP Sync Manager using your app as the destination. Add the necessary field mappings to map your Optimizely content to the appropriate Coveo fields and define your sync schedule. ![Data sync configuration in OCP](https://docs.coveo.com/en/assets/images/coveo-for-optimizely/data-sync-configuration.png)