SalesForce Commerce Cloud: B2B Configurations

Info: This feature requires a standard or premium Bloomreach Content license. Contact Bloomreach for licensing details.

Overview

You can integrate Bloomreach Content with SalesForce Commerce Cloud: B2B (formerly CloudCraze B2B) using the Bloomreach Commerce Accelerator. The B2B application provides the necessary configurations to connect and interact with your SalesForce Commerce Cloud: B2B instance.

This page covers:

  • How to connect Bloomreach Content to your SalesForce Commerce Cloud: B2B instance
  • Key configuration options for the SalesForce Commerce Cloud: B2B connector

Details about Federation Integration Authentication are also included.

Connecting to a SalesForce B2B Instance

Salesforce B2B Commerce (formerly CloudCraze) is a cloud-based B2B e-commerce platform. The Bloomreach Commerce Accelerator B2B application includes a CRISP API resource space for connecting to your SalesForce B2B instance. The configuration for this resource space is located at:

/hippo:configuration/hippo:modules/crispregistry/hippo:moduleconfig/crisp:resourceresolvercontainer/salesforcecc

You must configure the following connection properties:

Property nameDescription
salesforcecc.baseUrlBase URL of your SalesForce B2B instance. Use your StoreFront base URL.
salesforcecc.usernameSalesForce B2B merchant username.
salesforcecc.passwordSalesForce B2B merchant password.
salesforcecc.securityTokenSalesForce B2B merchant security token, if required.
salesforcecc.accessTokenUriSalesForce access token URL. Typically matches the hostname where SalesForce B2B is configured.
salesforcecc.clientIdSalesForce OAuth connected app consumer key.
salesforcecc.clientSecretSalesForce OAuth connected app consumer secret.
salesforcecc.storefront.user.signin.urlSalesforce B2B VisualForce page sign-in URL.
salesforcecc.storefront.user.signout.urlSalesforce B2B VisualForce page sign-out URL.
salesforcecc.storefront.user.changePassword.urlSalesforce B2B VisualForce page password change URL.
salesforcecc.storefront.locale.language.codeLanguage code in language_territory format.
salesforcecc.storefront.locale.currency.ISO3codeCurrency code in ISO3 format.

Define these properties in your Bloomreach Accelerator Configuration File. Replace placeholder values with your project-specific details:

..
# StarterStore parameters for SalesForce CloudCraze backend service.
salesforcecc.cache.enabled = (e.g. true or false)
salesforcecc.clientId = (e.g. your Connected App consumer key)
salesforcecc.clientSecret = (e.g. your Connected App consumer secret)
salesforcecc.username = (e.g. SalesForce B2B merchant username)
salesforcecc.password =
salesforcecc.securityToken =
salesforcecc.baseUrl = (e.g. https://<your_instance>.force.com/DefaultStore)
salesforcecc.accessTokenUri = (e.g. https://<your_region>.salesforce.com)
salesforcecc.storefront.user.signin.url = (e.g. https://<your_instance>.force.com/DefaultStore/SiteLogin?startURL=/CustomSiteLogin)
salesforcecc.storefront.user.signout.url = (e.g. https://<your_instance>.force.com/DefaultStore/secur/logout.jsp)
salesforcecc.storefront.user.register.url = (e.g. https://<your_instance>.force.com/DefaultStore/UserRegister)
salesforcecc.storefront.user.changePassword.url = (e.g. https://<your_instance>.force.com/DefaultStore/ChangePassword)
salesforcecc.storefront.locale.language.code = (e.g. en_US)
salesforcecc.storefront.locale.currency.ISO3code = (e.g. USD)
..

The connector currently supports SalesForce B2B Commerce Cloud version 4.9. Refer to the SalesForce B2B documentation for version-specific details.

Connector Configuration Details

The Bloomreach Commerce Accelerator B2B application includes a default commerce connector definition for SalesForce B2B. The Commerce Connector document is located in the commerce-connectors folder and is named Salesforce B2B.

  • Module name: com.bloomreach.commercedxp.b2b.container.connector.salesforcecc
    This matches the HST module addon name in the connector implementation.
  • Resource space: Matches the SalesForce B2B CRISP API resource space name for the SalesForce backend.

For more information on installation, see Install B2B Commerce. The B2B Commerce Accelerator can work with SalesForce B2B VisualForce pages. For example, user sign-in and sign-up are delegated to SalesForce in the current B2B project version.

All customer-specific requests include ccrz-context data, as described in the REST API context handling section.

The following table lists the connector components for the SalesForce B2B connector:

Component IDDescription
federationTokenDelegates B2B customer (contact) sign-in to SalesForce. This component checks the temporary token issued by the SiteLogin controller. See the Federated Login section below.
productSearchFind products by keyword. Product REST API: find
productSearchByIdFetch products by ID. Product REST API: fetch
productFindFiltersRetrieve product filters (similar to product facets). Product REST API: findfilters
categorySearchFetch categories by ID. Category REST API: fetch
categorySearchBySOQLSearch categories using the SalesForce Objects REST API.
cartCreateCart REST API: create
cartRetrieveFetch a cart by ID. Cart REST API: fetch
getActiveCartRetrieve the cart currently used by the store user. Cart REST API: getactive
cartProductAddCart REST API: addto
cartProductRemoveCart REST API: removefrom
cartDeleteCart REST API: delete
cartRepriceRecalculate cart total amount. Cart REST API: price
getAccountProfileFetch account details. Account REST API: fetch
searchAllAccountsRetrieve B2B accounts using the SalesForce Data REST API.
searchAccountsNameLikeRetrieve B2B accounts matching a specified name using the SalesForce Data REST API.
getAccountAddressBooksFetch address books associated with the store user. Address Book REST API: fetch
createAccountAddressBooksCreate address books for a store user. Address Book REST API: create
updateAccountAddressBooksUpdate address books for a store user. Address Book REST API: revise
deleteAccountAddressBooksDelete address books for a store user. Address Book REST API: delete
getAddressesFetch an address by ID. Address REST API: fetch
createAddressesAddress REST API: create
updateAddressesAddress REST API: revise
getCustomerProfileGet user profile data. User REST API: getprofiledata
updateCustomerProfileUpdate user profile data. User REST API: updateprofiledata
orderSearchFetch orders placed by store users. Order REST API: fetch
orderReviseRevise a pending order (order draft). Cart REST API: revise
orderPlacementPlace an order. Cart REST API: place
reorderCreate a new order draft from an existing order. Order REST API: reorder
invoiceSearchFetch invoices related to the store user. Invoice REST API: fetch
storedPaymentSearchFetch a stored payment method. Stored Payment REST API: fetch
storedPaymentCreateCreate a new stored payment (e.g., Purchase Order). Stored Payment REST API: create
storedPaymentUpdateUpdate an existing stored payment. Stored Payment REST API: revise
storedPaymentDeleteDelete an existing stored payment. Stored Payment REST API: delete
opportunityCreateCreate a new sales opportunity in Salesforce. Typically triggered by a request for quote from existing customers. Uses the SalesForce Data API.
leadCreateCreate a new sales lead in Salesforce. Typically triggered by a request for quote from anonymous customers. Uses the SalesForce Data API.
wishListSearchWish List REST API: fetch
wishListCreateWish List REST API: create
wishListAddToAdd a product to the wishlist. Wish List REST API: addto
wishListUpdateWish List REST API: revise
wishListDeleteWish List REST API: remove

Federated Login

SalesForce B2B Commerce v4.9 does not provide a public REST API for user (contact) registration. To address this, the Accelerator uses federated authentication, which relies on custom VisualForce pages and controllers installed on your SalesForce B2B instance.

The authentication process is shown in the diagram below. Before configuring federated login, set up the SalesForce storefront and ensure that VisualForce pages (such as user sign-in) are accessible. The Accelerator instance must accept only HTTPS requests.

Federated login flow between visitor, Bloomreach Content accelerator, and Salesforce B2B storefront

Diagram: The diagram illustrates a federated login sequence between a Visitor, the BrX Commerce Accelerator, and Salesforce Commerce B2B StoreFront. The BrX Commerce Accelerator container includes Commerce Accelerator and Commerce Connectors. The Salesforce side includes Commerce: B2B ("CloudCraze") and Custom APEX Components. The sequence shows the visitor initiating login, being redirected to the storefront login page, authenticating, receiving a token, and returning to the Accelerator. The Commerce Connectors validate the token with the Custom APEX Components.

Federated login flow:

  1. The visitor accesses the B2B Commerce Accelerator and initiates login.
  2. The Accelerator redirects the visitor to the Salesforce storefront login page (VisualForce "SiteLogin").
  3. The visitor submits credentials on the login form.
  4. If authentication succeeds, the visitor is redirected to "SitePostLogin," which generates a temporary token and stores it in the Salesforce platform cache. The visitor is then redirected back to the Accelerator with the token as a URL parameter.
  5. The HST component for federated login receives the token and requests validation.
  6. The SitePostLogin controller validates the token.
  7. If validation succeeds, the response includes authenticated user details.

After login, the Accelerator temporarily stores the authenticated user data. This data is included in every user-specific request by sending the ccrz-context parameter in the request header.

Share Feedback
Page: /build/commerce-backend/configuration
Section: Build
Category *
SalesForce Commerce Cloud: B2B Configurations | Bloomreach Content Documentation