Dive into Sitecore CDP - How to use Data System connections (Decision model with Content Hub products)

Sergey Baranov on October 27, 2021

There are 3 types of connections in Sitecore CDP:

  1. Data System - can be used in Decision models as external source of data.
  2. AI - can be used in Decision models as a logic block that performs any calculations on external service side.
  3. Destination - can be used in Full stack experiences to send data to external services.
Sitecore CDP - Data System 

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:

Sitecore CDP - Data System

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:

${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:

Sitecore CDP - Data System

Map input/output field names for Content Hub connection:

Sitecore CDP - Data System

 

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:

Sitecore CDP - Data System

 

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: 

Sitecore CDP - Data System

 

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:

Sitecore CDP - Data System 

 

Here goes the table of contents for my Sitecore CDP blog series: