Skip to main content

Part-1: Integrating Content Management Platform with Sitecore Connect Hub: A Step-by-Step Walkthrough

Integrating Content Management Platform with Sitecore Connect Hub: A Step-by-Step Walkthrough

Sitecore Content Hub's Content Marketing Platform (CMP) offers a unified solution for efficiently managing all content-related activities, including planning, creation, management, and distribution. In the previous blog, I discussed how to integrate DAM, and in this blog, we will explore the integration of CMP.

Prerequisites

  • Install Sitecore 10.4 from here
  • Download    Sitecore Connect™ for Content Hub SIF Package and Sitecore Connect™ for Content Hub WDP Package from here.
  • Unzip the SCCH Sitecore Installation Framework package into the designated folder.
  • Execute the following command in PowerShell.
  • In ScchWdpPackage give a path of Sitecore.Connector.ContentHub.WDP.5.2.96-r00458.5768.scwdp.zip which you have downloaded previously.
  • To enable CMP on your Content Management server, open the web.config file and modify the configuration as shown below:
    • <add key="cmpEnabled:define" value="yes"/>
  • In Content Hub, go to manage and  then click on OAuth clients.
  • Enter all details and click on the Save button.

Configure CORS for DAM

  • Login into the Content hub, go to Manage and then click on Settings.

  • Search CORSConfiguration.
  • Enter your Sitecore instance URL, click on "Add," and then proceed to click on the "Save" button.

Create a User in Sitecore Content Hub

  • Go to Navigate to Content Hub, then go to Manage, and click on Users.
     

  • Click Add User and enter Username.

  • Within the M.Builtin.SitecoreDAM.Everyone user group, create a new rule for the M.Asset entity, and choose both Read and ReadPublicLinks permissions.
  • To assign the user to the group, navigate to the User groups tab, check the box next to the group name, and then click Select.
  • To access the sync blog entity, you need to have read permissions for M.Content.
  • Accessing the sync product entity requires read permissions for M.PCM.Product.
  • Then click Save.

Add Connection String

  • Add below connection strings in ConnectionStrings.config.
  • Ensure that the URL of the Content Hub instance (e.g., content-hub-url.stylelabs.com), other delivery hostnames (e.g., content-hub-url-delivery.stylelabs.cloud), and generated public links (e.g., content-hub-url.stylelabs.com:8686) are included as sources in the Content-Security-Policy tag. Open the web.config and update the below lines: 

Configure Azure Service Bus

  • Create a service bus in Azure, you can check the reference here.

Create Content in Content Hub

  • Log in to the Content Hub, click on the manage icon, and then select Actions
  • Next, click on the New Action button to create a new action.
  • Enter Name, Label, and Destination type also select M Azure Service Bus.

  • Select Triggers from the manage section.





  • Create a new trigger by clicking on the New Trigger button.


  • In the General tab, enter the name of the trigger. For the objective, you can choose from Entity creation, Entity modification, or Entity deletion.


  • In the Conditions tab, select the content type you want to sync along with any other conditions.
  • In the Actions tab, select the action you created earlier.







  • Open Sitecore Content Hub, click on the Manage icon and then select Content Types.

  • Click on the Add type button.


  • Enter a "Label" for the content types, and the Identifier and Prefix will be automatically filled. You can also change the Icon and Color if desired. Then click on the Save button. 


  • It will create two sections "Content (CMP Demo)" and "CMP Demo details".



  • In the Individual section, you can add members. To do so, click "Add Member," which will open a popup where you must select the field type, such as Boolean, Datetime, Decimal, Integer, etc.

  • Enter Name, Label, and Help Text. Then click on the Save button.

  • In Validation rules, you can enable Required if it is a required field.


  • The field will be displayed in a section.


  • Go to Content and then click on Search. Then click on the "+ Content" button and create a new page.
  • Enter the Name of the page and in Type select the "CMP Demo" page.


  • Enter detail in all fields and click on Save.





In Part 2, we will explore how to sync CMP demo pages in XM.






Comments

Popular posts from this blog

Sitecore 10.2 - “Failed to start service ‘Sitecore Marketing Automation Engine’” on Windows 11

Sitecore 10.2 - “Failed to start service ‘Sitecore Marketing Automation Engine' ” on Windows 11 Today I started to install Sitecore 10.2 using Sitecore Instance Manager on Windows 11 and I got this issue “Failed to start service ‘Sitecore Marketing Automation Engine' ” . Error : On event viewer it was showing the below error: I also tried to run ‘ Sitecore.MAEngine.exe ’ like this C:\Windows\system32>C:\inetpub\wwwroot\sclocal102xconnect.dev.local\App_Data\jobs\continuous\AutomationEngine\Sitecore.MAEngine.exe Which was throwing below error: Starting Marketing Automation Engine... 2022-01-29 22:21:11 ERR Error initializing XConnect client. System.AggregateException: One or more errors occurred. ---> Sitecore.XConnect.XdbCollectionUnavailableException: An error occurred while sending the request. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected err...

Sitecore Custom API Issue with Federation Authentication

Sitecore Custom API Issue with Federation Authentication In earlier segments, detailed in Part 1 and Part 2 of the blogs on Keycloak Integration with Sitecore, I introduced Keycloak functionality for CM login. Concurrently, I addressed a necessity to develop custom APIs for retrieving Sitecore users and roles. Following the development of custom APIs, during authentication failures, the API erroneously returned a status code of 200 instead of 401. The problem arose because API requests were being routed through the "owin.identityProviders" pipeline, which was not intended for API usage. Solution: When OWIN identifies a 401 response and the AuthenticationMode is set to "Active," it fails to capture the URL hash included in the request. Another choice is to activate the "Passive" AuthenticationMode, wherein OWIN refrains from actively intercepting 401 responses. In passive mode, your application needs to explicitly issue a Challenge to trigger the OWIN aut...

Azure AD Integration with Sitecore 10.2

 Azure AD Integration with Sitecore 10.2 Sitecore identity server that comes with Sitecore 9.1 allows you to log in through an external identity provider like Azure Active Directory, Facebook, Apple, or Google. It is built on Federation Authentication. What is Federation Authentication? Federation authentication is a technology to allows users to access multiples application, tools, and domains using one credential. Using one set of credential user can access multiple applications, and resources after authentication.  Federation authentication consists of two systems, the Identity provider and the Service provider. Identity providers that maintain/create/manage identity information like name, email address, device, and location. Some examples of identity providers are Azure AD, Google, Facebook, and Apple. Service providers basically refer to a website, software, or app that the user is trying to access and SP basically relies on the identity provider to authenticate the user ...