> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bloomreach CMS integration

> Connect with Bloomreach CMS

Connect Voucherify resources and Bloomreach documents for easier CMS management related to the promotion offers, like coupons, cart-level promotion, etc. Create and manage the connection from the Bloomreach document by selecting available Voucherify resources. 

Once the connection is set up in Bloomreach, it is also visible in Voucherify. The information about the related Bloomreach document ID(s) is stored in Voucherify’s resource metadata.

A single Bloomreach document can be linked with multiple Voucherify resources and vice versa — a single Voucherify resource can be linked with multiple Bloomreach documents.

Currently supported resources are:

* [Discount coupons](/build/discount-promotion-overview),
* [Gift vouchers](/build/gift-card-overview),
* [Referral code](https://support.voucherify.io/category/388-referral-campaigns)
* [Promotion tiers](/api-reference/promotions/promotion-tier-object),
* [Earning rules](/build/loyalty-campaign-overview#earning-rules) (within a [loyalty program](/build/loyalty-campaign-overview)).

**The integration with Bloomreach CMS uses [API limits](/guides/limits#api-limits) for downloading campaigns**.

## Integration configuration

Follow these steps to integrate Bloomreach CMS with Voucherify.

### Voucherify

To connect Bloomreach with Voucherify, you need to generate new integration keys.

1. Go to **Project Settings** and in the **General** tab, scroll down to **Integration Keys**.
2. Click the plus button on the right.
3. Fill in the **Name** for your key.
4. Choose your role from the **Role** drop-down list.
5. Choose **Bloomreach** from the **Integration** drop-down list.
6. Click **Create Integration API Key** button.

<Warning>
  <Badge color="yellow">Integration credentials are hidden after saving</Badge>

  When you configure an external integration, API tokens and secret keys are only shown during setup.
  After you save the integration, these values are masked and cannot be viewed again in the Dashboard.

  This reduces the risk of exposing sensitive credentials through the user interface.

  Save your keys securely before closing the window.
</Warning>

You can also use the **User** role in the integration keys configuration (as it has Bloomreach permission selected by default). However, Voucherify recommends creating [a new custom role](https://support.voucherify.io/article/40-how-does-the-access-control-work-in-voucherify#custom-roles) only for integration purposes.

Once the Bloomreach integration key is generated, it can be found in the **Integration Keys** section.

### Bloomreach

To connect Bloomreach and Voucherify, you need to define a new custom integration in Bloomreach. Select from the left menu **Setup**, then **Integrations**, and **Add** a new **Custom integration.**

In the **Custom integration** configuration:

1. Fill in the **Name** field.
2. Fill in the **Application URL** field to proper address, e.g.: `https://eu1.cms-integrations.voucherify.io/frontend/bloomreach/`

The address above is for the EU cluster. It can be different for shared or dedicated clusters. If you are not sure what your Voucherify cluster is, contact our Support Team.

3. Set **Configuration** to **stringified JSON** with your Voucherify integration credentials (the ones generated in the [step above](#voucherify)) and desired resource types as follows:

```json theme={null}
{
  "appId": "YOUR_APPLICATION_ID",
  "appToken": "YOUR_SECRET_KEY",
  "resourceTypes": [
    "campaigns",
    "earningRules",
    "promotionTiers"
  ]
}
```

4. Set **Height(px)** to a proper value. We recommend 50-60 px per resource type, so if you want to use all three available resource types (campaigns, earning rules, promotion tiers), you can set it to 180 px.

5. Set **CSP** property to **frame-src** and \*\*\*\*.

Once the Voucherify integration is set up, you can define the content type.

Select from the left menu **Content**, then choose **Content types** from the drop-down in the left column and select a **New document type** in the **brxsaas** folder.

Then, fill in the **Name** and choose the required layout and build the desired layout. To include Voucherify integration, choose the **Field extension** option from **Primitive Field** list and use the **Voucherify** custom integration created in the previous steps in the **Integration** field.

To allow your new content type, you need to add it to the document allowed content.

In the **Content** section, choose **Documents**, then select the **Edit allowed content** from the folder options list. In the next window, select the content type created in the previous step.

Once it is done, you can now create a new document.

## Use guide

To get details about connected data, click the **Connected \<Resource type>** button to see the connected data details.

This window shows up to 10 elements per page. In the bottom right corner, you can see the total number of elements and you can change the page. You can also search resources by name with the search button in the top right corner.

Once the Bloomreach document is connected with a Voucherify resource, it is also visible in Voucherify in the object **Metadata** tab.

## Adding a connection

To add a connection:

1. Go to document **Edit** mode in Bloomreach and click **Manage Connected \<Resource type>.**

2. In the new modal, click **+ Add \<Resource type>**.

3. Find a resource that you want to connect and click **Add**.

4. Click the **Yes** button to confirm your action in the new window.

## Removing a connection

Deleting a connection is very similar to adding a new one.

1. Go to document **Edit** mode in Bloomreach and click **Manage Connected \<Resource type>.**
2. In the new modal, find the resource whose connection you want to remove and **Delete** it.
3. Click **Yes** to confirm your action in the new window.

If you delete a Bloomreach document that is connected to a Voucherify resource, that connection will not be deleted in Voucherify and vice versa — if a resource in Voucherify is deleted, the connection to the Bloomreach document will not be removed.
