allBlogsList

Headless Commerce on Salesforce Commerce Cloud B2C

Salesforce Gets Serious About Headless Commerce

Salesforce’s recent acquisition of Mobify signals they’re serious about Headless Commerce. The web development industry has long known that Progressive Web Apps are the best combination of the web and native app capabilities. By acquiring Mobify, Salesforce now has a solid solution for merchants to deploy a Headless PWA for Commerce. Even more impressive is the fact that Salesforce's customers have seen up to a 76% increase in conversion rate with this type of architecture as compared to their traditional Commerce Cloud Storefront experience.

The value provided by Salesforce’s Commerce offerings has long been the managed runtime environment. Fewer technical resources are required to operate a storefront on the Salesforce Commerce Cloud B2C platform because it’s managed and supported by Salesforce. With the acquisition of Mobify, Salesforce now has an API-first approach to implementing storefronts with Mobify’s managed runtime environment offering a “boxed” Backend for Frontend (BFF) layer.

By combining Salesforce’s Headless Commerce APIs with a ready-made ReactJS based PWA component library and BFF runtime they have created an attractive package for delivering world-class commerce experiences. The benefits of this architecture include modern UX framework (ReactJS), NodeJS-based Backend-for-Frontend (BFF) runtime, and the ability to consume any APIs merchants want or need to consume.

Why are the above architectural elements positives for the architecture? Simply put, they are the most common elements found in modern web development. That’s important because the most common technologies have more developers using them. More importantly, there’s more developers supporting these technologies and their related tools. Some examples of that, are as follows:

  • JavaScript is used by 69.7%<sup>1</sup> of professional developers
  • ReactJS is the most popular modern<sup>2</sup> framework with 36.8%<sup>1</sup> of professional developers
  • NodeJS is used by 51.9%<sup>1</sup> of professional developers

Additionally, the concept of APIs (Application Programming Interfaces) is quite common. These are the interfaces between computer systems and programs. Almost every platform or SASS vendor has one or more APIs. Commerce Cloud B2C has exposed APIs since 2013 in the form of Open Commerce APIs or more commonly known as OCAPI.

Therefore, this architecture has a clear advantage to storefront operators over traditional Salesforce Commerce Cloud B2C implementation using their Storefront Architecture and Storefront Reference Architecture (SFRA). Storefront Architecture relies upon several proprietary technologies:

  • Internet Store Markup Language (ISML) — The standard template language used by the Storefront Architecture
  • B2C Commerce API — The business logic layer of the Storefront Architecture that allows developers to read data and save data in the system
  • JavaScript Controllers — A proprietary module syntax that defines the interface that web browsers use to interact with your storefront
  • Pipelines — A legacy proprietary file format that was used before the introduction of JavaScript Controllers

Ultimately, much of the technical benefits of PWA Kit and the Managed Runtime come down to developer cost. There are more developers that know the tools used by the PWA Kit’s components and the Managed Runtime than developers that know Salesforce’s Storefront Architecture. Furthermore, the majority of the tooling for the PWA Kit’s components are open source. This means that there’s more documentation and more community support available for developers who are using them.

Starting in early 2021 Salesforce plans to begin rolling out PWA Kit and Managed Runtime to customers as part of their Salesforce Commerce Cloud subscriptions. New and existing Commerce Cloud B2C customers are expected to have access to these products at no additional cost.


<sup>1 </sup> As reported in the StackOverflow.com 2020 Developer Survey as accessed on December 14<sup>th</sup>, 2020. Results filtered by respondents identifying themselves as people who develop as their profession.

<sup>2</sup> jQuery is the most popular JavaScript Framework in the SO 2020 Developer Survey at 43.3%. However, it is 14 years old now and most of the problems it solved are no longer relevant. SO notes that jQuery is losing market share year-over-year since 2019.