Salesforce Commerce Cloud app

The Salesforce Commerce Cloud app for Contentful allows you to use Salesforce B2C resources in your entries in Contentful. 

Overview

Salesforce Commerce Cloud app allows you to reference Salesforce B2C resources directly in Contentful entries, without needing to manually add their IDs. The following resource types are supported:

  • Product

  • Category

  • Customer group

  • Promotion

  • Campaign

  • Coupon

  • Store

  • Product variant

Once the app is installed, you can change the appearance for a Short text field to load and store Salesforce Commerce Cloud resources. Your author can open a picker, view and search for the desired item, and embed it into an entry.

Requirements

To use this app, you will need:

  • Administrator access to Salesforce Commerce Cloud B2C

  • A content type with a Short text field (or list of Short text fields)

Setup and usage

Step 1: Configure a Salesforce Commerce Cloud API Client

To configure a Salesforce Commerce Cloud API Client:

  1. Create the client by following Authorization for SCAPI Admin APIs.

  2. Copy and save the password you select for the API Client, also known as the Client Secret.

  3. The API Client will require you to select a list of scopes. Add  the following scopes under Allowed Scopes in your API client:

sfcc.products

sfcc.catalogs

sfcc.customergroups

sfcc.promotions

sfcc.stores

Copy the API Client ID value and save it for later. You can now save the configuration and go to your Contentful space.

Step 2: Retrieve configuration values from your Salesforce Commerce Cloud instance

You will need the following values from your Salesforce Commerce Cloud instance:

  • Organization ID - the unique ID for your specific Salesforce Commerce Cloud instance

  • Short code - a unique value for your organization that helps route data correctly

  • Site ID - the unique name of your Salesforce Commerce Cloud site

Follow this guide to find each value. Once found, copy those values and save them for the next step.

Step 3: Install and configure the Salesforce Commerce Cloud app in Contentful

To install and configure the Salesforce Commerce Cloud app in the Contentful web app:

  1. Log in to the Contentful web app.

  2. Under Platform, click Apps.

  3. Under Marketplace, click All apps.

  4. Find the Salesforce Commerce Cloud app and click its card. The App details window is displayed.

  5. Click Install. The Manage app access window is displayed.

  6. Under Environments, select the environments where you want to install the app.

  7. Click Authorize access. The configuration screen is displayed.

  8. Upon installation, add the values for the API Client ID, Client Secret, Organization ID, Short Code, and Site ID you generated or retrieved in the previous steps.

    SFDC Commerce Cloud Configuration Screen
  9. Click Install to complete the app's installation.

Step 4: Configure your content types

Once the app is installed, set up the content types used to store the resources retrieved from Salesforce Commerce Cloud. 

To configure a content type for Salesforce Commerce Cloud:

  1. Log in to the Contentful web app.

  2. Under Setup, click Content model.

  3. Either find and open an existing content type or create a new one.

  4. Click +Add field and select Text as a field type. The Add field window is displayed.

  5. In the Name field, add a custom name for your field.

NOTE: We recommend adding a descriptive name for easier discoverability, for example, “Salesforce Commerce Cloud Product”.

  1. Under Type, select Short text, exact search. 

  2. Select List to store multiple items, such as for use in a product carousel.

  3. Click Add and Configure to continue. The field editor window is displayed.

  4. Go to the Appearance tab and select Salesforce Commerce Cloud. In the Field Type dropdown, select the Salesforce resource type to be referenced in Contentful entries. Click Confirm to save your new field.

    SFDC Field
  5. Click Save to apply changes to the content type. You can now use the Salesforce Commerce Cloud app to reference Salesforce resources directly within your content entries.

Step 5: Select products and categories

Once the content type has been configured, create or update an entry using that content type to begin selecting Salesforce resources. When viewing the editor of the corresponding entry, instead of the default Short text field editor for your new field, you will see the Salesforce Commerce Cloud app interface.

To reference a Salesforce resource in your entry:

  1. In the entry editor, click Select [Salesforce resource type]. A dialog window with the list of Salesforce resources is displayed.

    NOTE
    : By default, the list is displayed alphabetically. Use search to further narrow it down.

  2. Select one or multiple Salesforce resource items to add to your entry by clicking on them in the dialog window.

    NOTE
    : To select multiple items, your Short text field must be configured as a list. 

    SFDC Select a Product
  3. Click Save to embed the data into your entry. You will see a thumbnail for the selected Salesforce resource in the field, along with the product name and ID. If multiple items are selected, you can rearrange their order by dragging and dropping them.