CMSConnectSource defines a connection to an external content management system (CMS) that supplies content to Experience Builder sites. It controls authentication, supporting CSS and JavaScript files, language mappings, optional Adobe Experience Manager (AEM) personalization, and JSON content definitions.
Each component represents one CMS connection for a network. The component stores connection configuration, not the external content itself. Its assets, language mappings, personalization settings, and JSON definitions are nested within the connection.
Key Elements
| Element | What the Element Controls |
|---|---|
developerName |
Required API name of the connection. Deployment uses this name to match an existing destination connection. |
connectionType |
Required authentication mode: Public or Authenticated. Determines whether websiteUrl or namedCredential is required. |
websiteUrl |
External website URL. Required when connectionType=Public. |
namedCredential |
API name of a NamedCredential. Required when connectionType=Authenticated; the matching credential must exist in the destination org. |
status |
Required connection state: ACTIVE or INACTIVE. |
sortOrder |
Required connection load order when multiple connections are defined on a page. Ordering begins with 1; this controls loading, not merely display position. |
type |
Required CMS system identifier: AEM, Drupal, WordPress, SDL, Sitecore, or Other. Personalization is supported only for AEM. |
rootPath |
Required content root path. A language placeholder in a URL path can be replaced through language mappings. |
languageEnabled |
Required string flag: Y enables language mapping and N disables it. Do not use Boolean values. |
cmsConnectLanguage |
Language mappings. Each entry maps a Salesforce-supported code in language to the external CMS value in cmsLanguage. |
cmsConnectAsset |
Supporting files, identified by relative assetPath. Each entry has an assetType of exactly CSS or Javascript, and its own sortOrder. |
personalizationEnabled |
Required string flag: Y enables personalization and N disables it. Deploying a disabled configuration can remove existing personalization configuration. |
cmsConnectPersonalization |
Optional AEM personalization configuration. At most one entry is supported, containing connectorPage and connectorPageAsset. |
cmsConnectResourceType |
JSON content types and their nested cmsConnectResourceDefinition entries. The type-level resourceType accepts only JSON. |
The connection also requires masterLabel, its connection name. The optional cssScope supplies the class name used to prefix and scope CSS rules.
Behavior and Constraints
The CMS Connect org permission must be enabled.
For a public connection, set connectionType=Public and supply websiteUrl. For an authenticated connection, set connectionType=Authenticated and supply namedCredential. Credential resolution uses the credential's developerName, so the reference must be its API name rather than its label.
Language mappings and supporting files
With languageEnabled=Y, each cmsConnectLanguage entry associates a Salesforce language code with a CMS language value. When a URL path contains a language placeholder, Salesforce substitutes the corresponding cmsLanguage value. These mappings select external content; they do not provide translated content themselves. The language value must be a Salesforce-supported language code.
Asset paths are relative paths to supporting CSS or JavaScript files. An asset's sortOrder controls its loading sequence on the page independently of the connection's sortOrder. Preserve the exact spelling Javascript for a JavaScript asset's assetType.
AEM personalization
Personalization is available only when type=AEM, and a connection supports at most one cmsConnectPersonalization entry. Within that entry, connectorPage identifies the JSP connector created and installed in AEM. connectorPageAsset identifies the JavaScript file used to run scripts dynamically.
JSON content definitions
Each cmsConnectResourceType contains content definitions in cmsConnectResourceDefinition. Both the resource type's resourceType and each definition's payloadType accept only JSON.
-
options=0identifies a Content List. -
options=1identifies a Content Item. - Each definition requires
developerName,masterLabel,options,payloadType, andresourcePath. - A Content Item also requires
resourceIdPathandresourceNamePath, the relative paths to its ID and name. -
rootNodePathapplies only to a Content List or collection and establishes its starting path.
Deployment and Retrieval
Files, manifest members, and change sets
Components use the .cmsConnectSource suffix and reside in the cmsConnectSource folder. Each file represents one connection. The metadata identity is NetworkName.DeveloperName, with a period separating the network name from the connection's developerName. A corresponding filename is NetworkName.DeveloperName.cmsConnectSource.
In package.xml, use CMSConnectSource as the type name. To retrieve one connection, specify a member such as NetworkA.DeveloperName. The type supports wildcards; NetworkA.* selects connections for that network.
For change sets, CMSConnectSource is a dependent of Network and Community. The change set dependency controls let you view and add dependent components.
For authenticated connections, the matching named credential must exist in the destination org. If Salesforce cannot find a credential with the referenced developerName, deployment produces an error.
Deployment merges nested configuration
Package deployment uses upsert behavior: it inserts entries that do not exist and updates entries that match. An incoming file is not an unconditional replacement of all nested collections. Existing destination configuration affects both the result and validation.
-
Connection: A matching
developerNameupdates the existing connection with the incoming details. -
Assets: Entries in
cmsConnectAssetmatch byassetPath. Matching paths are updated; new paths are inserted. -
Resource types: Entries in
cmsConnectResourceTypematch by their owndeveloperNameand are updated when matched. -
Resource definitions: Nested
cmsConnectResourceDefinitionentries match by their owndeveloperName. Matching definitions are updated; unmatched definitions are inserted.
Resource-definition merging can also change a definition's role. If an incoming DETAIL definition has a different developerName from an existing destination DETAIL definition, Salesforce changes the existing definition to LIST and inserts the incoming definition as DETAIL.
Limits are checked against the merged result
Before upsert, validation enforces these maximums:
- 10 CSS assets per connection.
- 10 JavaScript assets per connection.
- 5 resource types per connection.
- 10 resource definitions per resource type.
For a new connection, validation counts the incoming entries. For an existing connection, it counts existing entries plus genuinely new incoming entries, without double-counting matches.
For example, if the destination has six CSS assets and the incoming file contains seven, with three matching paths and four new paths, the validated total is ten. An incoming file that is within the limit by itself can therefore fail when merged with the destination.
Ordering and personalization side effects
For connection ordering, Salesforce uses the incoming sortOrder when that position is not already occupied. An occupied position triggers collision adjustment. Asset ordering follows a separate rule: Salesforce retains the incoming asset's sortOrder and adjusts destination ordering accordingly. Importing configuration can therefore change load ordering beyond the newly added entries.
Disabling personalization has a destructive merge consequence. If the incoming configuration disables personalization while the destination has it enabled, deployment disables personalization and deletes the corresponding personalization record. This removes personalization configuration, not the CMSConnectSource component.
Relationships
The network-name portion of NetworkName.DeveloperName associates the connection with Network. The change set dependencies on Network and Community are separate from the element reference below. Assets, language mappings, personalization, resource types, and resource definitions are nested configuration within the connection.
References
-
NamedCredential:namedCredential.
Documentation Inconsistencies
The documented field mapping assigns options=0 to Content List and options=1 to Content Item. Salesforce's published example instead gives options=0 to an entry named Details and options=1 to an entry named List. Follow the documented numeric mapping; do not infer the meaning of options from those example names.
Common Questions
How do I retrieve one CMSConnectSource connection?
Use CMSConnectSource as the manifest type and NetworkName.DeveloperName as the member, for example NetworkA.DeveloperName. Use NetworkA.* to select connections for that network.
Why does deployment exceed an asset limit when my file has fewer than 10 assets?
Validation includes existing destination entries plus new incoming entries. Assets match by assetPath; matching paths are not counted twice. A file with fewer than 10 CSS or JavaScript assets can still exceed that category's limit after merging.
Why does my authenticated CMS connection fail to deploy?
One documented cause is a missing named credential. With connectionType=Authenticated, namedCredential must identify a credential by API name, and a matching developerName must exist in the destination org.
Does disabling personalization delete the CMS connection?
No. When incoming configuration disables personalization that is enabled in the destination, deployment disables it and deletes the corresponding personalization record. It does not delete the CMSConnectSource component.
Does options=0 mean Content Item or Content List?
options=0 means Content List; options=1 means Content Item. A Content Item also requires resourceIdPath and resourceNamePath in addition to resourcePath. The example names Details and List do not reliably indicate the numeric mapping.