Sitecore offers a wide range of connectors for the Sitecore Experience Platform (XP). These connectors will help you speed up the integration between the differents products. Today, we are going to discuss the Content Marketing Platform (CMP) connect. This connect module will help you establish a connection between Sitecore Content Hub CMP and a Sitecore XP. With this module, you can:
- Map Sitecore Content Hub fields to Sitecore fields
- Create a language version based on the relationship in the Sitecore Content Hub
- Update items automatically
- Set the publication date
- Create content items in buckets.
How does this all work, you might ask? Well, there are three main parts of the architecture: Sitecore Content Hub, Sitecore XP, and a service bus. We all know the first two, but what about the service bus? This will be used to communicate between the two systems. The Content Hub will send a message when an entity needs to be updated in Sitecore XP. These parts make up the architecture. When all combined, we will get the following diagram:
Image copyright by Sitecore- The CMP connector listens to the Azure Service Bus topic’s subscription for new messages. Sitecore Content Hub listens to certain changes, which triggers an action that sends a message to the Azure Service Bus topic.
- When a message is received, the CMP connector expects an identifier. If it exists, the connector gets a content type from the Sitecore Content Hub.
- The CMP connector creates a new item (or updates an existing item) in one of the preconfigured item buckets (or a new (language) version of an existing item).
- The CMP connector saves fields from the Sitecore Content Hub content type into the item’s fields. You can specify which fields to save in the configuration.
- The CMP connector checks for localization and localization parents of the source:
- If the content type has a LocalizationToContent relation, it is used to decide in which language the item (version) must be created.
- If the content type has a ContentToContentLocalization relation, the entity is considered as a localization of another entity and instead of creating an item, the connector will look for another item that is linked to the ContentToContentLocalization parent.
- The CMP connector sends a message to the Azure Service Bus topic with information about the item that was just created or updated in Sitecore.
- Any exceptions are added to the Service Bus message. All exceptions are written to Sitecore log files.