---
title: CommerceLayer
description: The CommerceLayer app adds a field type for referencing products and categories from a connected Commerce Layer instance.
url: https://www.storyblok.com/docs/apps/commercelayer
---

# CommerceLayer

The CommerceLayer app adds a field type for selecting products and categories from a connected [Commerce Layer](https://commercelayer.io/) instance 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 Commerce Layer products and categories in the Visual Editor.
-   Limit how many items an editor can select.
-   Restrict the field to products only or categories only.
-   Read from a specific sales channel market.

## Setup

1.  In Commerce Layer, create the [API credentials](https://docs.commercelayer.io/core/api-credentials) for the integration.
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-commerce-layer`.

The field takes the following options:

| Option | Required | Description |
| --- | --- | --- |
| `apiUrl` | Yes | Commerce Layer API endpoint. |
| `integrationClientId` | Yes | Client ID of the integration application. |
| `integrationClientSecret` | Yes | Client secret, encrypted through the Storyblok encryption service. |
| `salesChannelClientId` | No  | Client ID of the sales channel application. |
| `salesChannelDefaultMarketNumber` | No  | Market the sales channel reads from by default. |
| `limit` | No  | Maximum number of items an editor can select. |
| `selectOnly` | No  | Restricts the field to `product` or `category`. |

## Further resources

[CommerceLayer in the app directory](https://www.storyblok.com/apps/storyblok-gmbh@commerce-layer)

## Pagination

-   [Previous: Colorpicker](/docs/apps/colorpicker)
-   [Next: Commercetools](/docs/apps/commercetools)
