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

# commercetools extension operational overview


Once the extension is set up, you can manage the content you display on your commercetools site via the Cloudinary Media Library. You can:

- [Add Cloudinary assets to a new commercetools Product](#add-cloudinary-assets-to-a-new-commercetools-product)
- [Update Cloudinary asset links to Products](#update-cloudinary-asset-links-to-products)
    - [Update assets in bulk](#update-assets-in-bulk)
    - [Update assets individually](#update-assets-individually)
- [Publish assets](#publish-assets)
- [Unpublish assets](#unpublish-assets)
- [Stage assets - advanced feature](#stage-assets---advanced-feature)
- [Set or update an asset's position on the PDP](#set-or-update-an-assets-position-on-the-pdp)
- [Set or update alt-text and description](#set-or-update-alt-text-and-description)

> **NOTE**: The structured metadata field names that appear in these instructions are just examples and may differ from the ones you see in your product environment.

## Add Cloudinary assets to a new commercetools Product

When you create a new Product in commercetools, you'll want to link Cloudinary images to it. 

First, look up the new Product's SKU and keep the number accessible. Then, follow these steps in the Cloudinary Media Library:

1. Upload the assets for the new Product to the Cloudinary Media Library. 
    * Switch to the **Folders** view using the tab at the top of the Media Library and navigate to, or add, the desired folder.
    * Drag and drop the assets into the folder.
  > **NOTE**: You can also keep track of your assets by using [tags](dam_manage_individual_assets#bulk_updating_tags_and_contextual_metadata).
1. Configure List view:
   1. Switch to List view by clicking the View icon.
        ![Switch to List view](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1683719344/docs/integrations/commercetools_change_to_list_view.png "thumb: w_300,dpr_2, width:300, with_code:false, with_url:false, popup:true")
   2. Click the Settings icon to select the columns you want to display.
         ![Display selected columns](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684261284/docs/integrations/commercetools_select_columns.png "thumb: w_250,dpr_2, width:250, with_code:false, with_url:false, popup:true")
    > **NOTE**: These settings are saved, so you only have to set this once for each page of the [Media Library](dam_digital_asset_management#media_library_pages).
2. Select all the assets you want to link to the new Product.
3. From the asset toolbar, select **Edit Structured Metadata** to set the metadata for all selected assets.
        ![Select assets](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684259025/docs/integrations/commercetools_list_view.png "thumb: w_550,dpr_2, width:550, with_code:false, with_url:false, popup:true")
4. The following dialog box opens showing all the structured metadata fields that are set up in your product environment:
   > **NOTE**:
>
> Your product environment may contain additional fields to the ones shown here. However, it must contain fields similar to **commercetools SKU** and **commercetools publish**, possibly with somewhat different names.
   ![Bulk update metadata](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684751012/docs/integrations/commercetools_link_product.png "thumb: w_400,dpr_2, width:400, with_code:false, with_url:false, popup:true")
   You can select any field you want and update its value. The new value will be applied to all the assets you selected. 
   * To link the assets to a Product, select the **commercetools SKU** field and enter the SKU of the commercetools Product you want to link the assets to.
   * If you want to publish or stage the assets, set the **commercetools publish** field to **cl_ct_publish** or **cl_ct_draft**.
   * Optionally change any other structured metadata fields that you want to set for all selected assets and click **Update**. 
5. Set the position on the PDP individually for each asset by clicking the asset to open the Manage page. Click the **Metadata** tab, expand the **Structured metadata** section, and specify the desired value for the **Sorting number**.
        ![Set Sorting number](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684753584/docs/integrations/commercetools_sort_order.png "thumb: w_600,dpr_2, width:600, with_code:false, with_url:false, popup:true")

## Update Cloudinary asset links to Products

You can update which Product a Cloudinary asset is linked to. You can do this for multiple assets at a time, or for individual assets. 

First, look up the SKU of the Product that you want to link your assets to and keep the number accessible. Then, follow these steps in the Cloudinary Media Library.

#### Update assets in bulk

1. Click **Assets** from the Product Navigation menu on the left. **Advanced** should be selected by default.
2. Use the **Folders** filter to find the assets you want to update by their containing folder.
   > **NOTE**:
>
> If you use tags to keep track of your assets, you can use the **Tags** filter.
3. Configure List view:
   1. Switch to List view by clicking the View icon.
        ![Switch to List view](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1683719344/docs/integrations/commercetools_change_to_list_view.png "thumb: w_300,dpr_2, width:300, with_code:false, with_url:false, popup:true")
   2. Click the Settings icon to select the columns you want to display.
         ![Display selected columns](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684259891/docs/integrations/commercetools_select_columns.png "thumb: w_250,dpr_2, width:250, with_code:false, with_url:false, popup:true")
    > **NOTE**: These settings are saved, so you only have to set this for each page of the [Media Library](dam_digital_asset_management#media_library_pages).
4. Select all the assets you want to update.
5. From the asset toolbar, select **Edit Structured Metadata** to update the metadata for all selected assets.
        ![Select assets](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684260257/docs/integrations/commercetools_bulk_select.png "thumb: w_550,dpr_2, width:550, with_code:false, with_url:false, popup:true")
6. The following dialog box opens showing all the structured metadata fields that are set up in your product environment:
   > **NOTE**:
>
> Your product environment may contain additional fields to the ones shown here. However, it must contain fields similar to **commercetools SKU** and **commercetools publish**, possibly with somewhat different names.
   ![Bulk update metadata](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684751582/docs/integrations/commercetools_bulk_update.png "thumb: w_400,dpr_2, width:400, with_code:false, with_url:false, popup:true")
   You can select any field you want and update its value. The new value will be applied to all the assets you selected. 
    * To update the Product link, select the **commercetools SKU** field and enter the SKU of the commercetools Product you want to link the assets to.
    * To publish the assets, set the **commercetools publish** field to **cl_ct_publish**.
    * To unpublish the assets, set the **commercetools publish** field to **cl_ct_unpublish**.
    * To stage the assets (advanced feature), set the **commercetools publish** field to **cl_ct_draft**.
    * Optionally change any other structured metadata fields that you want to set for all selected assets and click **Update**.
        

#### Update assets individually

To update an individual asset's link to a Product, click the asset to open the Manage page, select the **Metadata** tab, expand the **Structured metadata** section, and specify the SKU of the Product you want to link to.

![Update commercetools SKU](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684752394/docs/integrations/commercetools_update_product.png "thumb: w_550,dpr_2, width:550, with_code:false, with_url:false, popup:true")

## Publish assets

Once your assets are approved and ready, you can publish them to commercetools. They'll then be automatically displayed on your app or website according to the Product that they're linked to. The assets will also appear on the **Variations > Images** page of the Merchant Center.

> **NOTE**: The commercetools extension provides one-way synchronization from Cloudinary to commercetools, and changes that you make to assets in the Merchant Center won't be updated on Cloudinary.

To publish assets in bulk, follow [these steps](#update_assets_in_bulk).

To publish an individual asset, click the asset to open the Manage page, select the **Metadata** tab, expand the **Structured metadata** section, and set the **commercetools publish** field to **cl_ct_publish**.

## Unpublish assets

If you want to take assets off production, you can do so by unpublishing them. 

To unpublish assets in bulk, follow [these steps](#update_assets_in_bulk).

To unpublish an individual asset, click the asset to open the Manage page, select the **Metadata** tab, expand the **Structured metadata** section, and set the **commercetools publish** field to **cl_ct_unpublish**.

## Stage assets - advanced feature

If you want to stage assets linked to a Product but not have them appear in production, you can set the assets as drafts. The assets will then appear on the **Variations > Images** page of the Merchant Center.

To stage assets in bulk, follow [these steps](#update_assets_in_bulk).

To stage an individual asset, click the asset to open the Manage page, select the **Metadata** tab, expand the **Structured metadata** section, and set the **commercetools publish** field to **cl_ct_draft**.

> **NOTE**:
>
> Some considerations when staging your assets:

> * If your assets are already published and you want to move them to staging, you must first unpublish the assets and then stage them, otherwise they'll will remain in production.

> * The commercetools extension provides one-way synchronization from Cloudinary to commercetools, and changes that you make to assets in the Merchant Center won't be updated on Cloudinary.

## Set or update an asset's position on the PDP

You can determine the order that your Product assets appear on the PDP.

* Set the position on the PDP individually for each asset by clicking the asset to open the Manage page, clicking the **Metadata** tab, expanding the **Structured metadata** section, and specifying the desired **Sorting number**.
        ![Set Sorting number](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v168475297/docs/integrations/commercetools_individual_smd_update.png "thumb: w_600,dpr_2, width:600, with_code:false, with_url:false, popup:true")

## Set or update alt-text and description

You can set the alt-text of the commercetools Product Asset via Cloudinary. 

1. Click the asset to open the Manage page, click the **Metadata** tab, and expand the **Contextual metadata** section.
   ![Set alt-text and description](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_gray/v1684753157/docs/integrations/commercetools_description_alt.png "thumb: w_600,dpr_2, width:600, with_code:false, with_url:false, popup:true")
2. Enter a value for the **Title (caption)** contextual metadata field. The Product Asset alt-text in commercetools will be updated to the new value when you publish the asset.

