|Time to read: About 5-7 minutes|
|Intended for: IT Managers, Technical Architects, Developers|
|Key takeaway: While there are many approaches available to integrate a PIM (Product Information Management) system with Sitecore Commerce, we found Azure Functions to be flexible, scalable, and loosely coupled.|
Implementing an e-commerce solution with Sitecore Experience Commerce can span the gamut from a simple effort to a complex enterprise project. One of the main factors that determines complexity is the required level of integration between the existing enterprise systems and the commerce engine.
It is typical for organizations to have one or more systems that form a PIM (Product Information Management) system, which allows product data to be managed. This data includes product descriptions, source data, cost information, distribution, and inventory data. This data must be replicated in the Commerce engine to allow products to be ordered and shipped to customers.
Hands on example
In a recent project, the enterprise PIM communicated with external systems via MSMQ messages. The PIM sent these messages to support both catalog loads and updates. The system supported the following message types:
Each message type arrived with varying frequency. While an initial catalog load required a heavy load of product and UPC messages, once the catalog was loaded only minimal updates were sent, typically to support new products or SKUs.
The enterprise convention was to send Price and Inventory messages both incrementally as well as complete refreshes on a weekly basis. Between all this traffic, the Commerce system had to support handling these messages arriving by the tens of thousands.
Azure Functions: Loosely coupled and scalable
We chose to use Azure functions to process the messages from the PIM. Azure Functions are serverless bits of code that run in the cloud. The serverless nature is very suitable to handling bursts of activity and scaling to meet the needed load. The Azure functions are responsible for making any necessary data conversions from the PIM to the eCommerce format.
In addition to the four standard Commerce Engine roles of Shops, DevOps, Authoring, and Minions, our implementation has a fifth role for Integration. This role supports PIM integration via the Azure Functions. Having a dedicated role aids in supporting the setup and maintenance traffic of numerous catalogs for our multi-branded website.
We extended the Sitecore Commerce plugins with dedicated commands and pipelines for the synchronization of each message type. As the receipt of the message can indicate either the addition or update of a product, each commerce command was built to handle either the inserting or updating of data.
While there are many approaches available to integrate a PIM with Sitecore Commerce, we found Azure Functions to be flexible, scalable, and loosely coupled.