---
title: Commercetools
description: The Commercetools app adds a field type for referencing products and categories from a connected commercetools project.
url: https://www.storyblok.com/docs/apps/commercetools
---

# Commercetools

The Commercetools app adds a field type for selecting products and categories from a connected [commercetools](https://commercetools.com/) project and referencing them in Storyblok content. The selection is part of the API response.

Read more about connecting a store in the [e-commerce concept](/docs/concepts/e-commerce).

## Features

-   Select commercetools products and categories in the Visual Editor.
-   Read product data in a specific locale.
-   Limit how many items an editor can select.
-   Restrict the field to products only or categories only.

## Setup

1.  In commercetools, [create an API client](https://docs.commercetools.com/getting-started/create-api-client) and note its client ID and client secret. Pick the endpoint for [your region](https://docs.commercetools.com/api/general-concepts#regions).
2.  In the Storyblok **Block Library**, add a field to a block, set its field type to **Plugin**, and set the custom type to `sb-commercetools`.

The field takes the following options:

| Option | Required | Description |
| --- | --- | --- |
| `endpoint` | Yes | commercetools API URL for your region. |
| `clientId` | Yes | Client ID of the API client. |
| `clientSecret` | Yes | Client secret of the API client. |
| `locale` | No  | Language key used to read product data. |
| `limit` | No  | Maximum number of items an editor can select. |
| `selectOnly` | No  | Restricts the field to `product` or `category`. |

## Further resources

[Commercetools in the app directory](https://www.storyblok.com/apps/storyblok-gmbh@commercetools-fieldtypes)

## Pagination

-   [Previous: CommerceLayer](/docs/apps/commercelayer)
-   [Next: Content Locking](/docs/apps/content-locking)
