Content Hub Dam | Streamlining Asset Usage Tracking

Sitecore Content Hub logo


Managing digital assets across multiple platforms can be a complex endeavour. Sitecore Content Hub offers an excellent solution for organizing and maintaining your digital assets. It helps your marketing team access up-to-date assets, prevents misuse, and streamlines asset management. However, one feature that's missing in the Sitecore ecosystem is the ability to track where an asset is used across different platforms like Sitecore XM, XP, or XM Cloud.

The Challenge

As a marketer, knowing where an asset is being used is crucial. It allows you to update or remove assets confidently, ensuring consistency and compliance across all channels. Unfortunately, the default setup doesn't support tracking asset usage in Sitecore's content management systems.

The Solution: Storing Asset Usage in the DAM

To overcome this limitation, we can store the usage information of an asset directly in the Digital Asset Management (DAM) system. Sitecore Content Hub provides an existing entity definition called M.Usage that describes where and when an asset is used. Utilizing this entity definition, we can keep track of each asset across our digital landscape.

Content Hub - Relation M.Asset, M.Usage

Configuring the Asset Detail Page

By default, Content Hub doesn't display asset usage on the Asset Detail page. To make this information visible, you'll need to configure it manually using a search component. Here's how:
  1. Add a Search Component: Navigate to the Asset Detail page and add a new search component.
  2. Set Entity Definition Filter: Configure the search component with an entity definition filter set to M.Usage.
  3. Configure Fixed Filter:
    • Input Type: Page Entity
    • Filter Type: Relation
    • Filter: Usage (AssetToUsage)
    • Role: Parent
  4. Set Output: Choose a table view for the output. This provides an easy-to-read overview of where the asset is used within your platforms.

Automating the Process

Manually tracking asset usage isn't scalable, especially in larger organizations where assets are frequently referenced. To ensure success, we need to automate this process.

Leveraging the Management API

Sitecore Content Hub offers a Management API that allows us to create M.Usage entities and associate them with specific asset IDs. However, adding this functionality directly to each product that uses Content Hub assets can be cumbersome and tightly couples your systems.

Introducing a Middleware Layer

To decouple Content Hub from other products and enhance flexibility, it's advisable to implement a middleware layer. Middleware solutions like Sitecore Connect (also known as relabeled Workato) or Azure Logic Apps can serve this purpose effectively. Here's why using middleware is beneficial:
  • Decoupling Systems: Changes in one system won't directly affect the other.
  • Retry Policies: Implement retry mechanisms for transient failures to improve reliability.
  • Logging and monitoring: Utilize middleware capabilities to log requests and monitor performance.
  • Data consistency: Ensure that the middleware maintains data integrity between the products and Content Hub.
  • Scalability: Design middleware workflows to handle spikes in traffic without degradation.
  • Security: Products won't have direct access to the Content Hub, enhancing security.

Automated Workflow

The middleware will handle two main actions: creating and removing usage records for assets. Here's how the process works:
  1. Product Triggers Middleware: When a product uses an asset, it sends a request to the middleware with the asset ID and any necessary metadata.
  2. Middleware Processes Request:
    1. Queue Management: The middleware receives the request and stores it in an internal queue for processing.
    2. Immediate Response: It sends a confirmation back to the product, allowing it to continue without waiting.
  3. Processing the Task:
    1. Execution: The middleware processes the queued task, creating or removing the usage record in Content Hub.
    2. Error Handling: If the task fails, the middleware notifies the Content Hub administrator for corrective action.
  4. Business Logic Enforcement: The middleware can run additional business logic, such as security checks to ensure the requester has the necessary permissions.
Content Hub | Asset tracking

Note: The above image illustrates how a usage record is created and removed through the middleware.

Enhancing User Experience with Deep Links

To maximize the value for marketers, consider adding deep links within the usage records. This allows users to navigate directly to the location in the product where the asset is used. Simply knowing that "Product X" uses an asset isn't as helpful as being able to click a link and go straight to the relevant page for updates or removal.

Final Thoughts

While it might be technically possible to bypass a middleware layer, incorporating one is highly recommended. Middleware not only decouples the systems, but also adds layers of reliability and security. By automating the tracking process and enhancing the user experience with deep links, you empower your marketing team to manage assets more effectively.

"Don't be a fool—keep it cool by using a proper middleware tool!"


That's it for now. Until next time!