Newer Version Available

This content describes an older version of this product. View Latest

ContentAsset

Represents the metadata for creating an asset file. Asset files enable a Salesforce file to be used for org setup and configuration purposes. This type extends the MetadataWithContent metadata type and inherits its content and fullName fields.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

File Suffix and Directory Location

ContentAsset components have the suffix .asset and are stored in the contentassets folder.

Version

ContentAsset components are available in API version 38.0 and later.

Special Access Rules

The system prevents metadata retrieval if the total size of the asset’s file content exceeds 30 MB. All pre-existing limits for packaging apply to asset files.

Fields

Field Name Field Type Description
format ContentAssetFormat (enumeration of type string) Describes the format of the asset file. Valid values are:
  • Original—A single asset file version.
  • ZippedVersions—Contains multiple versions of the asset file.
isVisibleByExternalUsers boolean Indicates whether unauthenticated users can see the asset file (true) or not (false). If not specified, the default value is false. This field is available in API version 44.0 and later.
language string Required. The language of the asset file label.
masterLabel string Required. The label for the asset file record, which displays in Setup.
originNetwork string For deploys, the name of the Experience Cloud site the file is assigned upon creation. For retrievals, the name of the Experience Cloud site the file is assigned to appears in the field value. If null, the file wasn’t assigned to an Experience Cloud site.
relationships ContentAssetRelationships The list of ContentAssetLinks that describe whether the asset file can be shared with the org.
versions ContentAssetVersions Required. Captures basic information about the file version included the asset metadata. Typically the file has only one version.

ContentAssetRelationships

Represents the relationships between an asset file and the locations it's linked with.

Field Name Field Type Description
emailTemplate ContentAsset[] An array of email templates the content asset is related to. This field is available in API version 51.0 and later.
insightsApplication ContentAsset[] An array of the insights applications that use the content asset. This field is available in API version 39.0 and later.
network ContentAsset[] An array of networks that use the content asset. This field is available in API version 39.0 and later.
organization ContentAsset[] Stores information about sharing the asset file with the org. Maps to ContentDocumentLink. This field is available in API version 39.0 and later.
workspace ContentAsset[] An array of workspaces and libraries that own or share the content asset. This field is available in API version 39.0 and later.

ContentAssetVersions

Represents information about all file versions included in the asset metadata.

Field Name Field Type Description
version ContentAssetVersion[] A list of file versions for the asset.

ContentAssetVersion

Represents information about one file version included in the asset metadata.

Field Name Field Type Description
number string Required. The version number. This field is based on, or sets, the ContentVersion.
pathOnClient string Required. Describes the original filename of the file. This field maps to ContentVersion.PathOnClient. It provides the data for the ContentVersion Title field.
zipEntry string If the asset file has more than one version, format is ZippedVersions. In this case, zipEntry is the name of the file within the zip. If the asset file has only one version, this field is empty.

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.