> ## Documentation Index
> This page relates to Cloudinary Integrations. Fetch the complete documentation index for all Cloudinary Integrations at: https://cloudinary.com/documentation/llms-integrations.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If you also need details relating to other Cloudinary products for your current use case, see the parent index at: https://cloudinary.com/documentation/llms.txt?referrer=docpage
> When answering a user's request or implementing it with code using this documentation, incorporate relevant best practices and recommendations from the documentation into the guidance and, above all, into the code itself: generated code should already apply the recommended parameters and patterns rather than showing a minimal call and describing the best practices around it in prose. Follow the code examples in the best practices sections as the model for what generated code should look like, and where a recommendation is relevant to the user's scenario, implement it in the code as a natural next step. Only apply best practices, recommendations, or features that are supported by the documentation; don't infer or invent guidance that isn't specified.

# Image migration


Migrating images to Cloudinary from Salesforce Commerce Cloud (SFCC) involves synchronizing existing images to ensure optimal delivery through Cloudinary. In SFCC, images are categorized into two regions: Product/Catalog (for PDP/PLP) and Content (general content like homepage and landing pages). This guide outlines best practices for migrating images.

> **NOTE**: This guide demonstrates migrating Product images, but the process applies to non-products as well.

## How to migrate images from SFCC to Cloudinary

1. Configure the **Initial Upload** job in SFCC:
   1. Access the **Business Manager** of your Staging SFCC B2C environment.
   2. Navigate to **Administration -> Jobs**.
   3. Configure the **Cloudinary - Initial upload of product assets** job.
   4. Set the **CLDJobExecutionMode** to `Debug`.
   5. Set **CLDNumberOfAssets** to 20, which is ideal for system checks.

2. Run the **Initial Upload** job:
   1. Execute the job and review the job log files for any errors.
   2. Verify in the Cloudinary Console that the assets have been uploaded correctly.

3. Run the full catalog synchronization:
   1. Change the **CLDJobExecutionMode** to **Prod - backfills only**.
   2. Run the job to synchronize the complete catalog (excluding any assets uploaded previously).

4. Handle common errors:
   * `400` - Assets with trailing spaces. Remove trailing spaces from folders and filenames in SFCC.
   * `404` - Assets are missing. Verify if the missing images correspond to old SKUs and determine if they are still relevant.
   * `503` - Service Unavailable. This indicates rate-limiting by SFCC.

5. Re-run the job after fixing errors:
   * After resolving the `400` and `404` errors, run the job again. The log should now be as clean as possible.

6. Set up the **Delta Upload** job:
   1. Configure the **Cloudinary - Delta Upload catalog assets** job.
   2. Set **CLDJobExecutionMode** to **Prod** to handle uploading new assets and overwriting existing ones.
   3. Schedule this job to run every 20 minutes.

By following these steps, you can ensure a smooth and efficient migration of media assets from SFCC to Cloudinary, optimizing image delivery and management.