# CMS Collection

## Overview

This page explains how **CMS Collections** can be used as a **data source** for Avonni components in **Salesforce Experience Cloud**.

When supported, a CMS Collection allows Avonni **data-driven components**—such as the [**List**](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-list) or [**Data Table**](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-data-table)—to be populated dynamically with content managed in Salesforce CMS (articles, images, documents, and other CMS items), without relying on Salesforce records or custom objects.

Because Salesforce provides multiple CMS architectures, this page also clarifies the **critical distinction between Enhanced CMS and legacy (non-enhanced) CMS**. Only CMS Collections created with **Enhanced CMS** are compatible with Avonni components that use CMS as a data source.

Understanding this distinction is essential to avoid configuration issues and to ensure that CMS-based data sources work as expected in Experience Cloud sites.

***

## What is a CMS Collection?

A CMS Collection is a grouping of CMS content (articles, images, documents, etc.) that can be queried and displayed dynamically in an Experience Cloud site.

Avonni components that support CMS as a data source rely on **Salesforce Content Services APIs**, which are compatible only with **Enhanced CMS**.

***

## Enhanced CMS vs Legacy CMS

Salesforce currently supports **two CMS architectures** that coexist in the platform:

### <mark style="background-color:green;">Enhanced CMS (Supported)</mark>

Enhanced CMS is the modern CMS architecture introduced by Salesforce and is the **only CMS type supported by Avonni components**.

Key characteristics:

* Created from **Setup → CMS Workspaces**
* Uses **Content Services APIs**
* CMS Collections have record IDs starting with **`20V`**
* Content is also addressable via a **Content Key** (starting with `MC`)
* Designed for modern Experience Cloud features and headless delivery

This is the CMS model expected by Avonni components that support CMS Collections.

***

### <mark style="background-color:orange;">Legacy / Non-Enhanced CMS (Not Supported)</mark>

Legacy CMS is the older CMS system historically used by Aura-based Experience Cloud sites and managed from:

Experience Workspaces → Content Management

Key characteristics:

* Backed by legacy CMS objects (for example `ManagedContent` and `ManagedContentCollection`)
* Collections historically had record IDs starting with **`0V5`**
* Content and containers may use **`0Zu`** record IDs
* **Not exposed through Content Services APIs**

Although legacy CMS content may still appear usable in the Salesforce UI, it **cannot be accessed programmatically** by modern components that rely on Content Services.

As a result, legacy CMS Collections **cannot be used as a data source** for Avonni components.

***

## Why legacy CMS Collections are not supported

Avonni components that support CMS Collections rely on Salesforce **Content Services APIs** to query and render content.

Salesforce only exposes **Enhanced CMS content** through these APIs.

Legacy CMS collections:

* Are not available through Content Services
* Do not provide Content Keys
* Cannot be resolved by components expecting `20V` or `MC` identifiers

This is a Salesforce platform limitation, not a configuration issue.

***

## Aura sites

Even if your Experience Cloud site is Aura-based:

* Enhanced CMS **can still be used** as a content source
* Legacy CMS Collections created in Content Management **are not compatible** with Avonni CMS-based data sources

To use CMS Collections with Avonni components on Aura sites, you must create the collections in an **Enhanced CMS Workspace**.

***

## How to create a compatible CMS Collection

To use a CMS Collection as a data source in Avonni components:

1. Go to **Setup → CMS Workspaces**
2. Create a new **Enhanced CMS Workspace**
3. Create a **Content Collection** inside that workspace
4. Publish content to the collection
5. Use either:
   * the **Content Collection ID** (starts with `20V`), or
   * the **Content Key** (`MC…`)

Only these identifiers are supported by Avonni components.

***

## Summary

| CMS Type         | Workspace Location                         | ID Prefix    | Supported by Avonni CMS data source |
| ---------------- | ------------------------------------------ | ------------ | ----------------------------------- |
| **Enhanced CMS** | Setup → CMS Workspaces                     | `20V`, `MC`  | ✅ Yes                               |
| **Legacy CMS**   | Experience Workspaces → Content Management | `0V5`, `0Zu` | ❌ No                                |
