This guide shows you how to connect Salesforce Commerce Cloud using Salesforce B2C Commerce API (SCAPI) to API2Cart in just a few simple steps. First, you create an API client. Then, you configure the required credentials and complete the integration.

Step 1: Create an API Client

First, open the Commerce Cloud Account Manager and create a new API Client.

Create Salesforce Commerce Cloud SCAPI API client for API2Cart integration

Next, fill in all required fields in the API Client creation form.

Fill required fields for Salesforce Commerce Cloud SCAPI API client

Additionally, configure the following mandatory fields:

  • Roles – Salesforce Commerce API
  • OpenID Connect:
    1. Default Scopes:
      • mail
      • tenantFilter
      • roles
      • profile
      • openId
    2. Allowed Scopes – you can find the full list of required values in the table at the end of this guide.

      Please note that you must specify the same scopes (comma-separated) when you add the platform in API2Cart.

    3. Redirect URIs – http://localhost:8080
    4. Token Endpoint Auth Method – private_key_jwt
Configure OpenID Connect settings for Salesforce Commerce Cloud SCAPI

If you encounter any issues during API Client creation or notice differences between the screenshots and the actual interface, refer to the official Salesforce documentation .

Step 2: Obtain Short Code and Organization ID

After you create the API Client, obtain the Short Code and Organization ID. To do this, open Business Manager and navigate to Administration → Site Development → Salesforce Commerce API Settings.

Find Short Code and Organization ID in Salesforce Commerce Cloud SCAPI settings

Step 3: Connect Salesforce Commerce Cloud to API2Cart

Finally, enter all required credentials in the API2Cart admin panel to complete the Salesforce Commerce Cloud SCAPI integration.

Connect Salesforce Commerce Cloud SCAPI to API2Cart admin panel

Table of Required SCAPI Scopes for API2Cart Methods

Below, you can find the required SCAPI scopes for each API2Cart method. Configure these scopes in Commerce Cloud Account Manager and use the same values when adding the platform in API2Cart. Every method requires sfcc.catalogs and sfcc.sites: without them, API2Cart cannot connect to the store. A .rw scope also grants read access, so the read-only scope is not needed next to it. Enter the scopes separated by commas, without spaces.

Method Scopes
account.cart.add, account.config.update, cart.validate sfcc.catalogs,sfcc.sites
cart.info sfcc.catalogs,sfcc.sites
product.count sfcc.catalogs,sfcc.sites,sfcc.products
product.list sfcc.catalogs,sfcc.sites,sfcc.products
product.info sfcc.catalogs,sfcc.sites,sfcc.products
product.add sfcc.catalogs.rw,sfcc.sites,sfcc.products.rw
product.update sfcc.catalogs.rw,sfcc.sites,sfcc.products.rw
sfcc.catalogs.rw is required only with the categories_ids parameter; without it, sfcc.catalogs is enough.
product.delete sfcc.catalogs,sfcc.sites,sfcc.products.rw
product.child_item.list sfcc.catalogs,sfcc.sites,sfcc.products
product.child_item.info sfcc.catalogs,sfcc.sites,sfcc.products
product.variant.add sfcc.catalogs,sfcc.sites,sfcc.products.rw
product.variant.update sfcc.catalogs,sfcc.sites,sfcc.products.rw
product.variant.delete sfcc.catalogs,sfcc.sites,sfcc.products.rw
category.count sfcc.catalogs,sfcc.sites
category.list sfcc.catalogs,sfcc.sites
category.info sfcc.catalogs,sfcc.sites
order.count sfcc.catalogs,sfcc.sites,sfcc.orders
order.list sfcc.catalogs,sfcc.sites,sfcc.orders
order.info sfcc.catalogs,sfcc.sites,sfcc.orders
order.update sfcc.catalogs,sfcc.sites,sfcc.orders.rw
order.status.list sfcc.catalogs,sfcc.sites
customer.count sfcc.catalogs,sfcc.sites,sfcc.customerlists
customer.list sfcc.catalogs,sfcc.sites,sfcc.customerlists
customer.info sfcc.catalogs,sfcc.sites,sfcc.customerlists
customer.add sfcc.catalogs,sfcc.sites,sfcc.customerlists.rw,sfcc.customergroups.rw
sfcc.customergroups.rw is required only with the group_ids parameter.
customer.update sfcc.catalogs,sfcc.sites,sfcc.customerlists.rw,sfcc.customergroups.rw
sfcc.customergroups.rw is required only with the group_ids parameter.
customer.delete sfcc.catalogs,sfcc.sites,sfcc.customerlists.rw
customer.address.add sfcc.catalogs,sfcc.sites,sfcc.customerlists.rw
customer.group.list sfcc.catalogs,sfcc.sites,sfcc.customergroups
cart.giftcard.count sfcc.catalogs,sfcc.sites,sfcc.gift-certificates
cart.giftcard.list sfcc.catalogs,sfcc.sites,sfcc.gift-certificates
cart.giftcard.add sfcc.catalogs,sfcc.sites,sfcc.gift-certificates.rw
cart.giftcard.delete sfcc.catalogs,sfcc.sites,sfcc.gift-certificates.rw

SCAPI vs Demandware (OCAPI) Comparison

SCAPI is a relatively new API. As a result, it currently provides fewer features than OCAPI, which Demandware integrations use. Therefore, the differences described below are expected.

Products (product.list/info, product.variant.add/update)

  • SCAPI does not populate the following fields: advanced_price, inventory, backorders, manage_stock, is_stock_managed, additional_fields->backorderable_qty, additional_fields->min_order_quantity, additional_fields->step_quantity, additional_fields->price_books.
  • SCAPI does not return product variants.
  • SCAPI uses the same hardcoded store URL for both sandbox and production.
  • SCAPI returns all dates in the GMT timezone.
  • SCAPI returns default values for multilingual fields instead of language-specific values.
  • SCAPI does not support the lang_id and currency_id filters.
  • SCAPI requires the categories_ids parameter for product.add.

Child Items and Variants (product.child_item.list/info)

  • SCAPI does not populate the following fields: allow_backorders, manage_stock, inventory, min_quantity, additional_fields->price_books, additional_fields->backorderable_qty, additional_fields->step_quantity.
  • SCAPI does not support filters such as lang_id, currency_id, quantity, warehouse_id, and type.
  • SCAPI does not support stock management or multilingual data for variants.

Customers (customer.list/info)

  • SCAPI does not return the orders_count and last_order_id fields.
  • SCAPI does not support filters for creation or modification dates.

Orders (order.list/info)

  • SCAPI supports only the following order statuses: New, Completed, Cancelled.
  • SCAPI does not return orders with unsupported statuses. It returns orders with the Open status as New.
  • SCAPI does not support the since_id, customer_id, and customer_email filters.

Next step

Create an account and connect your first store via API2Cart.

Open app