More Products

Salesforce Commerce Cloud B2C Commerce Cartridge for Headless configuration

Last updated: Apr-10-2024

This guide provides detailed instructions for configuring the cartridge and setting up Salesforce's OCAPI to retrieve information from Cloudinary.

Prerequisites

  1. Make sure you've configured either the B2C Commerce Cartridge for SFRA or SiteGenesis.

  2. Import the int_cld_headless using the Import dialog for SFRA or SiteGenesis.

  3. Add the int_cld_headless cartridge to the Settings tab of the Administration > Sites > Manage Sites page for SFRA or SiteGenesis.

Set up the Shop API resource for OCAPI

If you've already set up the Shop API resource, you can use your current configuration. Follow the instructions and use the sample configuration below only if you're setting up Shop API for the first time.

Note
Make sure you have Shop API version 19.1 or later configured for the most effective use of the cartridge.

To add the Shop API resource:

  1. On the target site, go to Administration > Site Development > Open Commerce API Settings.
  2. From the Select Type drop-down, select Shop.
  3. From the Select Context drop-down, select the appropriate context, for example, Global (organization-wide) or Site-specific.
  4. Enter the OCAPI data API resources provided in the ocapi-configurations.json file in the documentation folder.

    Sample JSON:

  5. Update the client_id with the one you generated from the Commerce Cloud Account Manager.

    Note
    You can generate a new client ID and password by logging in to the Commerce Cloud Account Manager.

  6. Click Save.

Salesforce Commerce Cloud composable storefront

To build your frontend using the Salesforce Commerce Cloud PWA Kit or any other front end framework, add the int_cloudinary_headless:int_cloudinary cartridges in the cartridge path for the sandbox.

Open Commerce API Settings

Note
For more information about the Salesforce Commerce Cloud PWA Kit, see SFCC's Composable Storefront documentation.

✔️ Feedback sent!

Rate this page: