Sitecore and Sitecore Commerce – Important Communication Points

If you started working with Sitecore commerce 9.0 or later, you might have noticed there are a lot of connection points among different roles of Sitecore XP, solr, Sitecore Identity Server and Sitecore Commerce.

It’s important to understand the communication points and how this communication is made secure. Sometimes we face the issues due to wrong configurations of those communication points. Since I went through a bit of pain while configuring Staging and Production environments, I thought to share how communication takes place

  1. From Sitecore XP to Commerce Engine(CE)
  2. From Commerce Engine to XP(Content Synchronization)
  3. Commerce Engine to Solr
  4. Commerce Engine Plugins to Sql
  5. Bizfx to Commerce Engine

Sitecore XP to CE:

The communication takes place through Commerce Eninge Connect layer. In Sitecore installation directory(at path App_Config\Include\Y.Commerce.Engine) we have Sitecore.Commerce.Engine.Connect.config which defines the communication configurations from XP to  CE.

The configuration defines shopsServiceUrl which is used to send any shops related read/write requests from XP to CE for example, get catalogs or categories. Then it defines certain defaults like defaultEnvironment, defaultShopName etc. These settings are passed as part of the context of each request from XP to CE. We can define these configurations on the Storefront itself under the commerce control panel.

The communication is made secure with a certificate. The thumbprint of the certificate is saved in the configuration of engine connect in Sitecore XP(above image) as well as in all the CE roles configurations(config.json). The certificate thumbprint and header name configuration should match on both sides(XP, CE) for successful communication. The below screen shot is from config.json of a CE role.


From CE to XP:

Sometimes, the commerce engine needs to know the path to XP for certain operations like Sync the content. Read more about content synchronization here.  In CE policies, we have got PlugIn.Content.PolicySet-1.0.0.json. This policy defines certain parameters like Host, SitecoreDatabase, UserName, and Password etc to access the commerce content and sync it back to Commerce Engine.

From CE to Solr: 
Commerce engine has another policy that is used to configure communication with solr i.e. PlugIn.Search.Solr.PolicySet-1.0.0.json. It defines certain configurations like url etc.
From CE to Sql: 
Although, Commerce engine has Global configuration for this purpose, but if some plugin has to talk to sql it goes through Plugin.SQL.PolicySet-1.0.0.json e.g. getting products information etc.
Bizfx to Commerce Engine:
Business tools talk directly to CE (authoring role mostly). The communication configuration can be found inside the bixfx deployed folder, under bizfx\assets folder. The config.json file contains EngineUrl and other useful configurations.

Leave a Reply