# Emporix Contentful App

The Emporix Contentful App allows you to visually select your store's products from Emporix and reference them in Contentful entries.

## Prerequisites

To use the Emporix Contentful App, you need:

* A [Contentful content type](https://www.contentful.com/help/contentful-101/#step-3-create-the-content-model). It needs to include at least one field with its type set to either `Short text` or `Short text, list`.

Emporix credentials for integrating with Contentful:

* Search API Key
* Index Name

## Installing the Emporix app on Contentful

1. Log in to [Contentful](https://be.contentful.com/login).
2. Navigate to **Apps** -> **Manage** apps.
3. Select the **Emporix app** and click **Authorize access**.
4. Fill out the Emporix app fields with your Algolia credentials.\
   a. Paste your Search API Key in the **Search Key** field.\
   b. Paste your **Index Name** in the **Index name** field.\
   c. Paste your **Application Id** in the **Application id** field. This field is optional. If **Algolia Application** is provided by Emporix then this field should be empty. If custom **Algolia Application** is used then this field should be provided.
5. Mark checkboxes next to the fields for which you would like to install the Emporix app.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-f7707717ef2e1c2092e4b866a686f041c6c778d7%2Fcontentful_fields.png?alt=media" alt=""><figcaption></figcaption></figure>

6. Click **Install**.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-56ebb5bd72fb2eae6f0dc3de581b14acc2d357b1%2Fcontentful_install.png?alt=media" alt=""><figcaption></figcaption></figure>

## Using the product picker to select products

1. Navigate to the **Content** tab.
2. Select or create a new entry of the content type for which you installed the app.
3. Find the field and click **Select products**.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-d48e8b5c49791b513a4efb007ee947bc2b260f19%2Fcontentful_select.png?alt=media" alt="" width="247"><figcaption></figcaption></figure>

4. Use the search bar to search for products by name.
5. Select the products and click **Save products**.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-c6974ed99d7effcf4bb29f480b4973aa06fd796c%2Fcontentful_products.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

6. Selected products should now appear in the content editor.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-8748a5f79e6877ae52399d6904be7f769b3993df%2Fcontentful_selected_products.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
To facilitate finding relevant products, the products that have not been published yet are tagged with the `[UNPUBLISHED]` label. It helps you differentiate whether you select the right items. The information whether a product is published or not comes from the configured search index provider.
{% endhint %}

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-8eee7065947d65a65d5d1be78d103a26c1b085f8%2Fcontentful_unpublished.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/ce/extensibility-and-integrations/add-ons/emporix-contentful-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
