# Connect your Hygraph project to Aprimo

Learn how to connect your Hygraph project to Aprimo

**Aprimo** is an AI-powered content operations platform that allows you to organize, store, retrieve, and distribute digital assets in a centralized and structured manner.

## What you can do with the Hygraph-Aprimo integration

With this app you can manage, measure, and monitor your digital assets right within your Hygraph UI.

## Prerequisites to use this integration

- You must have a **Hygraph** account. If you don't have one, you can create one [here](https://app.hygraph.com/signup).
- You must have a [Hygraph project](https://hygraph.com/docs/getting-started/quickstart#create-a-project) with at least one [model](https://hygraph.com/docs/getting-started/quickstart#create-a-model).
- You must have an **Aprimo** account. If you don't have one yet, you can book a demo [here](https://go.aprimo.com/get-a-demo-of-aprimo).
- You must get the following information from [your Aprimo account](https://developers.aprimo.com/digital-asset-management/rest-api/authorization/) and have it at hand for installation: `Tenant name`, `Client ID`, `Client secret`.

**Warning:**

**Apps are environment specific**. This means their configuration is applied per environment. Take this into consideration if you're working with a project using more than one environment.

## Install the Aprimo app

Click [here](https://hygraph.com/marketplace/apps/hygraph-aprimo-app) to install the Aprimo app on **Hygraph**, then follow these steps:

[Video](https://www.youtube.com/watch?v=6V1FK5U4Jsc)

1. Use the dropdowns to select which project and environment you want to install the app in, then click on `Install app`.
2. The permissions pop-up will display. Click on `Authorize app` to continue. You will be redirected to the configuration screen.
3. Fill in the `Tenant name`, `Client ID`, `Client secret` fields with the information your copied from your [Aprimo account](https://go.aprimo.com/get-a-demo-of-aprimo). 
4. Click on `Save config settings` to finalize the installation process. A pop-up notification on the bottom right corner of the screen will indicate that the changes have been saved.

## Add the Aprimo field to your model

[Video](https://www.youtube.com/watch?v=3-JyDEZ5_Oc)

1. Navigate to the **Schema** builder.
2. Select the model that you want to add the **Aprimo** field to and click on it.
3. Select the **Aprimo** field from the **Add fields** right sidebar.
4. Complete the `Display name` field; this will autocomplete the `API ID` field. Optionally, you can also add a `Description`.
5. This screen also allows you to control different properties of your Aprimo field: you can allow multiple values, or you can localize the field, by selecting the checkboxes in the `Field options` section.
6. Click `Add` to save.

## Use Aprimo in your Hygraph project

[Video](https://www.youtube.com/watch?v=34clsLc-fTE)

1. Navigate to the **Content** editor.
2. Select the view that you configured the **Aprimo** field for.
3. Click on the `+ Add entry` button or, alternatively, edit an existing entry by clicking on the pencil icon.
4. Locate the **Aprimo** section of the screen and click on `Add Aprimo asset`. If you haven't logged into Aprimo, you may need to enter your login credentials to continue. This opens a new screen where you can select one or more of you existing assets, depending on field configuration.
5. Select the asset you want by clicking on it. If your Aprimo field is configured for multiple assets, you can use the checkboxes to select the assets you want. Click `Select` on the top-right corner of the screen to add the selected assets to the content entry.

    **Pro Tip:**

    - If your Aprimo field is configured to select only one asset, Aprimo will let you select which rendition of the image you want to add to your entry. [Check out this section of the guide to learn how to do this](https://hygraph.com/docs/integrations/connect-aprimo#aprimo-image-renditions)
    - If you cannot view your images in the picker screen, check out our [troubleshooting section](https://hygraph.com/docs/integrations/connect-aprimo#i-cant-view-my-images).

6. After selecting the asset(s) you want and returning to the content entry, your selection will display on the list. You can optionally use the six-dots handlebar to drag and drop the assets to organize them in the order you want.
7. Finally, click `Save` or `Save & Publish` - depending on your workflow - to save your entry.

## Aprimo image renditions

If you Aprimo field is configured to allow only one value, clicking on `Add Aprimo asset` will still display the selection screen, but there will be a diference in how the process follows.

[Video: Aprimo image renditions](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/cmnn9x8u8jaqt07w5i45cmiy8)

Instead of using checkboxes to select the image you want, you will click on an image, and you will be taken to a second selection screen where you can select from a variety of image renditions.

**Note:**

Different image renditions will only be available if the images were configured to have multiple versions in Aprimo.

Select a rendition and then click `Select` to add the image to your content entry.

## Troubleshooting

### I can't view my images

If you cannot view your images in the picker screen, make sure that the images in your Aprimo account have public links.

[Video: Aprimo public links](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/cmnn9x8w6jar107w5o7jcf8p3)

To create a public link:

1. Go to **Drafts** in your Aprimo account
2. Select the image you want to give public links to
3. Scroll down to the  **Public links** section of the screen and click `Create public link...`
4. Use the checkboxes to select the renditions you want to make available and click `Create`

## Resources

- [Aprimo documentation for digital assets](https://developers.aprimo.com/docs/rest-api/dam/dam-intro)

&nbsp;
