Integrating External Systems with Sitecore Personalize Decision Models: Creating a Connection
- Get link
- X
- Other Apps
Sitecore Personalize allows you to leverage powerful decision models for delivering tailored experiences to your users. One of the key capabilities is connecting Sitecore Personalize with external systems through decision models, which can help send data to external APIs or services.
In this blog, we'll focus on how to create a connection in Sitecore Personalize, which will be used within a decision model to send data to an external system.
Let’s get started!
Use Case Overview
Imagine you need to send data to an external system through Sitecore Personalize using the Decision Model. In order to achieve this, the Connection feature in Sitecore Personalize is a vital component. You will set up a connection and integrate it into the Decision Model to transfer data.
This blog will explain how to create the connection, while the next blog will focus on how to use the connection within the Decision Model itself.
Steps to Create a Connection in Sitecore Personalize
To create a connection, follow the steps outlined below.
1. Access Sitecore Personalize
First, log into Sitecore Personalize (either production or non-production) and navigate to the Connections section. This can be found under the Developer tab, as shown in the screenshot below:
Once you are on the Connections page, you will see a button that allows you to create a new connection.
2. Click to Create a New Connection
Click the Create Connection button. This will initiate the process of setting up a new connection for your external system.
3. Choose Data System Option
In this example, we are using an external system API that requires no authentication. However, the connection type may vary depending on your needs. For this particular case, we are selecting Data System as the type of connection.
4. Provide Connection Details
Step 1: Name and Description
Enter a name and description for your connection. This will help you identify the connection later when working with decision models.
-
Name: External API Connection
-
Description: Connection for sending data to external system
Step 2: Authentication Details
In our demo case, no authentication is required from the API. However, if your API requires authentication (e.g., OAuth), you’ll need to configure this section accordingly.
Click Next to proceed.
Step 3: Set Request Details
Now, you’ll need to configure the request details. This is where you define how data is sent to the external system.
For instance, let’s assume we need to send a POST request with dynamic data (like client_id and client_secret). Here’s an example of the request body format:
{
"client_id": "${client_id}",
"client_secret": "${client_secret}",
"audience": "https://api.sitecorecloud.io",
"grant_type": "client_credentials"
}
Notice how we are using dynamic variables (e.g., ${client_id}, ${client_secret}). These values will be set dynamically when testing the connection.
Step 4: Test the Request
Click the Test Request button to send a test request to the external API.
A popup will appear, prompting you to enter the dynamic values (e.g., client_id and client_secret) that were defined earlier in the request body.
Once you have entered the dynamic values, click Run Test to execute the request. If everything is configured correctly, you should see a successful test response.
Step 5: Save the Connection
After successfully testing the connection, click Next to proceed to the final step. Sitecore Personalize will display the output response, which indicates the connection was successful. These output will be used as input to the other elements of the Decision model Canvas
Click Save to store the connection.
Conclusion and Next Steps
Congratulations! You've successfully created a connection in Sitecore Personalize. The connection is now ready to be used within your decision model to send data to an external system.
In the next blog, we will focus on how to integrate this connection into a decision model and use it to make decisions based on the data provided by the external system.
Stay tuned for the next installment, where we’ll dive into using the connection within a decision model in Sitecore Personalize.
Key Takeaways
-
Creating a connection in Sitecore Personalize is essential for integrating external systems with the Decision Model.
-
Ensure you set dynamic request parameters when configuring the connection, especially for APIs that require unique tokens or credentials.
-
After testing and saving the connection, it will be available for use in decision models, allowing for seamless data exchange.
This blog should now provide a clear and structured approach to setting up connections in Sitecore Personalize.
- Get link
- X
- Other Apps
Comments
Post a Comment