There are 3 types of connections in Sitecore CDP:
- Data System - can be used in Decision models as external source of data.
- AI - can be used in Decision models as a logic block that performs any calculations on external service side.
- Destination - can be used in Full stack experiences to send data to external services.
In this article I`ll show how to create Data System connection to Content Hub and use it in decision modeling to provide access to external data system to get actual product information.
How to get access to Content Hub API?
First, you need to generate token that don`t have expiration and will be used for authorized request. Make POST request to {your_content_hub_endpoint}/api/authentificate URI with user_name and password parameters:
Copy token value, we will use it later while setup connection in Sitecore CDP.
How to setup Content Hub connection in Sitecore CDP?
Login to your Sitecore CDP application account, Connections -> Add Connection-> Data System. Enter Name and Description of your connection, choose None on Athentification tab and configure request parameters:
- Method: POST
- URI: https://your_CH_endpoint/api/entities/query?query=Definition.Name=='M.PCM.Product'&members=ProductName,ProductPrice
- Add header: X-Auth-Token: ${token}
${token} variable will be subsctituted in Decision model with real token value. For URI endpoint set your correct Content Hub domain, Definition.Name of your products and list of fields (members) that you want to see in response:
Map input/output field names for Content Hub connection:
Click Test Now button, insert correct token and click Run Test button. If connection is OK, you will see response from Content Hub.
Once connection is ready, it is time to modeling. Create new Decision model, add External Systems -> Data System block and choose your Content Hub connection:
Open Content Hub connection block and populate token input with real token value (don`t forget to wrap token value with double quotes, you must do it for all string inputs in decision model blocks). Now you can use Test Canvas tool to be sure that data from Content Hub is available in your decision model:
Exact the same way you can create Data System connection to any other 3rd party data service and use it in your decisions.
Example of decision models where Content Hub connection can be used. Use ML service to recommend products to customer based on customer order history, and filter recommended products by actual products that are available right now in stock:
Here goes the table of contents for my Sitecore CDP blog series:
- Introduction
- How to connect Sitecore CDP to website
- Debugging tools
- How to pass extended data to Sitecore CDP
- How to use Data System connections (Decision model with Content Hub products)
- How to use AI connections (Web experience with Azure Cognitive Services)
- How to use Destination connections (Triggered experience webhook)
- How to use External service connections (Flows with External Service)
- Remarketing with Sitecore CDP and Facebook Ads