Content Hub Integration with XM Cloud from Sitecore DAM directly from Sitecore DAM
Get link
Facebook
X
Pinterest
Email
Other Apps
-
Do you use Sitecore and Content Hub in your organization? If so, you might be looking for a way to make these two platforms work better together. The good news is—you can! Sitecore provides a built-in solution: the DAM Connector, part of the Sitecore Connect for Content Hub (SCCH).
This connector lets you browse, search, and insert digital assets from Content Hub DAM directly into the Experience Editor, making content creation smoother and more efficient.
In this guide, we’ll walk you through how to enable the DAM Connector for a Sitecore XM Cloud environment.
Prerequisites
Before you begin, make sure you have the following in place:
Access to the XM Cloud Deploy app.
A user account in Sitecore Content Hub with the necessary permissions.
An OAuth client created in Content Hub for the DAM connector integration.
Steps to Enable the DAM Connector
1. Log in to XM Cloud Deploy
Go to XM Cloud Deploy and sign in with your credentials.
2. Select the Right Project
In the left-hand navigation menu, click Projects.
Choose the project that contains the environment where you want to enable the DAM connector.
3. Open the Target Environment
Click on the specific environment (e.g., development, staging, production) you want to configure.
4. Add Environment Variables
Navigate to the Variables tab.
Click Create variable.
Add each required variable for the DAM connector. Make sure to set the Target to CM (Content Management role) for each variable.
Contains the OAuth credentials (Client ID and Secret), Content Hub username and password, and the URI of your Content Hub instance. Used to authenticate and connect Sitecore to Content Hub.
Defines the page that will open the DAM interface inside an iframe. This ensures the "Browse Sitecore DAM" button displays the correct content from the SCCH component.
SITECORE_AppSettings_damEnabled__define
yes
Enables the DAM integration feature in your Sitecore XM Cloud environment. Must be set to "yes" for the connector to function properly.
Configure the DAM Connection
After setting the environment variables, the next step is to connect your Content Hub DAM to your XM Cloud environment by adding a few config files to your codebase. Don’t worry—this sounds more technical than it really is. Let’s walk through it step by step.
1. Clone Your XM Cloud Project
Start by cloning the Git repository linked to your XM Cloud environment. If you already have it on your machine, you can skip this step.
2. Create the Folder Structure
In your project directory, navigate to:
src/platform/
Inside that folder, create the following path:
App_Data/Xdts
So the full path should look like:
{YourRepo}/src/platform/App_Data/Xdts
3. Add the Web.config.xdt File
Now inside the Xdts folder, create a new file called:
Web.config.xdt
Open that file and paste in the following XML configuration:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<location path="sitecore">
<system.webServer>
<httpProtocol>
<customHeaders>
<!-- NOTE: This is just an example. Don’t copy this into production without reviewing. -->
<add name="Content-Security-Policy"
value="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://apps.sitecore.net; img-src 'self' data: https://your-content-hub-url.cloud/ https://s.gravatar.com https://*.wp.com cdn.auth0.com/avatars; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' 'unsafe-inline' https://fonts.gstatic.com; block-all-mixed-content; child-src 'self' https://your-content-hub-url.cloud/; connect-src 'self' https://your-content-hub-url.cloud/; media-src https://your-content-hub-url.cloud/"
xdt:Transform="Replace"
xdt:Locator="Match(name)" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>
Be sure to replaceyour-content-hub-url.cloud with your actual Content Hub DAM domain.
4. Tell XM Cloud to Use the Transform File
Open the file called xmcloud.build.json and add the following inside the "transforms" section:
Deploy the latest changes to your XM Cloud environment using your usual process.
What Happens Next?
After deployment is complete, go to your Sitecore Content Tree and check under:
/sitecore/system/Modules
You should see a new DAM folder. That means the connector is working and ready to use!
Configuring CORS for Sitecore DAM
To allow your XM Cloud environment to communicate with Sitecore DAM, you need to configure CORS (Cross-Origin Resource Sharing) settings in Content Hub. Here’s how to do it:
Steps to Configure CORS
Log in to Sitecore DAM.
From the main menu, click Manage, then go to Settings.
In the settings menu, navigate to: PortalConfiguration > CORSConfiguration
Under CORSConfiguration, add the following URLs:
Final Outcome
Once everything is set up, you’ll be able to:
Browse, search, and insert digital assets from Sitecore DAM directly into the Experience Editor.
Use DAM assets in both Image and Link fields with ease.
For more details, check out the official Sitecore documentation:
Introduction Edge database removal and Edge cache purging through the Admin API of Sitecore XM Cloud could be performed by developers to carry out the necessary Edge-related operations and also keeping an optimized environment for updating content, testing, and debugging purposes. In this blog discussion, we'll discuss how to take advantage of the Sitecore XM Cloud Admin API to: Delete the Edge Db. Purge Edge Cache. Prerequisites Before moving ahead, you need to confirm that you have the following items: - An active Sitecore XM Cloud environment - Admin API access with appropriate permissions - API Key and credentials for authentication - A tool, such as Postman, to send API requests Step 1: Receive Your API Key (Request JWT for Experience Edge XM Using OAuth) In order to communicate with the Admin API, you'll need an API key, which can be obtained from the Sitecore XM Cloud portal in the API Management section: OAuth Endpoint POST a request to the following OAuth e...
Mastering Sitecore Search API Crawlers Sitecore Search is an integral part of the Sitecore Experience Platform (XP) that helps businesses deliver highly personalized and relevant search experiences. One of the most powerful features of Sitecore Search is its ability to index external data sources, such as APIs, to provide dynamic content in search results. In this guide, we’ll explore the ins and outs of using Sitecore's API Crawler —a tool that helps index API data—and show you how to implement it for seamless integration. Whether you're a developer new to Sitecore or someone looking to improve your Sitecore Search implementation, this guide will take you through essential configurations, indexing scenarios, and advanced pagination techniques that will help you build powerful search experiences. Table of Content What is Sitecore Search and API Crawling? Key Concepts You Should Know Setting Up Sitecore API Crawler for Basic Indexing Understanding Pagination: Offset vs. Cursor H...
Comments
Post a Comment