Custom metadata
Last updated: Sep-26-2023
There are three types of metadata that can be stored with your assets: structured metadata, contextual metadata, and tags. These types of metadata are useful for searching assets based on a value or field value pair, or as a method of marking assets for a particular purpose in your end-user application.
For example, your developer can set up a "Specials" page in your web store to display all assets where the structured metadata sale
field is set to campaign-A
. Or, all assets that show scarves can be auto-tagged with a value scarf
to be displayed on your web store accordingly.
This enables DAM users from your creative, marketing, or sales teams to decide which assets get which field values or tags, while your developers take advantage of custom metadata API methods to implement the application side.
Custom metadata types
The following sections describe each of the three types custom metadata that can be stored within each asset in your product environment and explains the differences between them:
- Tags: individual text values that can be assigned to specific assets (up to 1000 tags allowed per asset).
- Contextual metadata: custom key-value pairs that you can assign to individual assets.
- Structured metadata: custom fields are defined, along with data types and validations, by a DAM administrator at a global level, and are added to all assets in the product environment. You assign their values per asset.
The following table compares the three types of metadata:
Custom metadata comparison table
Tags | Contextual | Structured | |
---|---|---|---|
Scope | Values are added individually to each asset, or to several assets in bulk, manually or through automatic tagging. | Fields and values are added individually to each asset. | Fields are defined for the entire product environment. The values are set individually for each asset. |
Created by | Fields and values can be added by any user with write-level permissions for a particular asset. Your assets can also be automatically tagged using a Cloudinary add-on during upload or update using AI image recognition and categorization capabilities. |
Fields and values can be added by any user with write-level permissions for a particular asset. | Fields are created and managed globally either by a DAM administrator in the Manage Structured Metadata page, accessible from the Media Library Preferences or by a developer via the via the metadata API. Any user with write-level permissions for a particular asset can add or edit the field values. |
Value types | All values are unvalidated, free-text strings. | All fields are unvalidated, free-text strings. | Each metadata field is defined with a specific type (string, number, single or multi-select list, or date). The field can optionally be set with validation requirements (which can limit the values allowed in the field to, for example, a numeric range or number of characters). Fields may also have conditional metadata rules applied that can change elements of their definition based on selections in other fields. |
Programmatic equivalent | - Add, remove, and replace tags: tags methods of the Upload API. - Add tags: upload method of the Upload API. - View and add tags: resource methods of the Admin API. - Replace tags: explicit method of the Upload API. - View tags: tags method of the Admin API. |
- Add fields and values: context method of the Upload API. - Add values: upload and explicit methods of the Upload API. - View and add tags: resource method of the Admin API. |
- Manage fields: metadata_fields method of the Admin API. - Set field values: metadata, upload and explicit methods of the Upload API. - View and set field values: resource methods of the Admin API. |
Benefits | This metadata type enables assets to be automatically classified and tagged, which is especially useful when managing assets in bulk. | This metadata type gives more control and flexibility to individual DAM users. | This metadata type enables more standardization across the organization. |
Overview
You can set custom metadata values for an asset in the Media Library from the Metadata tab of the Preview pane and from the Metadata tab of the asset management drill-down page. You can also set structural metadata, tags and contextual metadata for multiple assets at once.
After you set metadata values for your assets, you can search for assets by those values adding them as Custom filters using the Advanced Search. For details, see Search by metadata.
The following sections cover some additional clarifications for setting tags, contextual metadata, structured metadata, and bulk updating structural metadata, tags and contextual metadata values.
Setting custom metadata values
You can set custom metadata for a single asset from the Metadata tab of the asset management drill-down page, including:
- Viewing or updating the asset's custom metadata, including tags, structured metadata, and contextual metadata.
- Viewing the asset's embedded metadata (such as the EXIF data stored with photos).
To open the Metadata tab, either double-click the asset or select Open from the asset (3-dot) options menu, and select the Metadata tab.
Metadata notes and tips
- Depending on the Media Library preferences set for your product environment, this tab may show both structured and contextual metadata, or it may only show one or the other of these.
- When you add, remove, or change the values in any editable section of the Metadata tab, the section is marked as Editing... and the Save button becomes enabled. When you're finished with changes to that section, you should save your changes. If you try to close the browser tab or navigate to another area of the Media Library or Console, you'll be prompted to save your changes.
If you decide to to close the tab or navigate away without saving, all changes to unsaved metadata sections will be reverted to their previous state.
- For assets with long lists of embedded metadata, you can use the Filter data box to find the type of embedded metadata you're looking for. Additionally, depending on the Media Library preferences set for your product environment, it's possible that only a select set of embedded metadata fields will be included in the list.
Setting tags
The tags shown in this tab include both tags that were added manually and any tags that were automatically generated by auto-tagging add-ons, either programmatically, during upload as defined by an upload preset or via the Analysis tab of the asset management drill-down page.
To manage tags more efficiently, you can copy all the tags from one asset and paste them in another.
Setting contextual metadata values
In each of the areas where you can edit contextual metadata, you will always see two suggested contextual metadata fields: Title (caption)
and Description (alt)
. If you add values for these, then those fields are added to the asset's custom metadata with the values you set. You can additionally or alternatively add any other field names and values in the Custom metadata section.
Title (caption)
and Description (alt)
fields and any other custom fields you add. If you don't need these two fields, you can leave them blank and add any other fields as needed. The suggested fields are just intended as a quick way for you to potentially add standard custom fields to your assets that your developers might use, for example, to display a title and description for the assets when they are displayed in your application.Setting structured metadata values
If your DAM administrator or a developer has defined structured metadata fields for your product environment, anyone with edit permissions for an asset can set the structured metadata field values in the Metadata tab of the Preview pane or from the Metadata tab of the asset management drill-down page.
When working with structured metadata, the set of available fields is identical for all assets in your product environment.
- Field types: Each field is predefined as one of the following types: free text field, multi-select list, single-selection list, number, or date.
-
Validation rules: Field values that can be manually entered, such as text, number, and date fields, may have been defined with validation rules, such as minimum or maximum values.
If you enter a value that doesn't meet the validation rules, then when you click outside the field (which submits the value), an error message gives you information to help you correct the value. -
Mandatory fields: Some fields may be defined as mandatory.
- If an asset existed before your administrator defined the mandatory field, you are not immediately required to fill it in. However, if you click in a mandatory field and then click out of it (in essence submitting an empty value), you will receive a message that the value is mandatory.
- Similarly, if a mandatory field has a value, and you delete it, you will be required to enter a new value. Otherwise, when you change views, the field will revert to its previous value.
-
Conditional metadata: The behavior of some fields may depend on the values you enter in other fields. A field might appear, receive a default value, or display different choices in its list, depending on the values you enter in another field. For example, if you select Employee from the Category field, this might cause the Department field to appear, whereas if you select Conference from the Category field, the Department field is not relevant and remains hidden. NoteIf you change the value of a field that has dependencies, the values that you previously set in those dependent fields may be automatically deleted.
AND vs OR metadata search conditions
- In general, when you perform an advanced search in the Media Library, if you select multiple values for a specific search criteria, you will get results for assets that have ANY of those values, meaning these are treated as OR search conditions. For example, if you select 2 values from the Tags filter, you will get assets that have either of those tags.
- Conversely, if you add more than one different search criteria, such as searching by both Asset types and Formats, your results will include only assets that match both of those criteria, meaning these are treated as AND search conditions. If you add structured metadata fields in your search filters, and if you add a free text search, they are all considered separate AND search conditions, as well.
- When searching by structured metadata fields, if you enter more than one value WITHIN a multi-select field when searching, you can choose whether they are treated as AND or OR conditions. In the following example, results would include only assets where Categories contains either
Shoes
ORGifts
, Product ID is less than12345
AND Publish Date is beforeAug 1, 2019
. - Similarly, if you enter multiple contextual metadata fields in a search, you can choose whether the AND (assets returned have to match all fields) or the OR (assets returned have to match any of the fields) search condition is applied. In the following example, your search results would include any assets that have campaign =
ABC
OR discount_code =blue
OR aaa =aaa
.
Bulk updating structured metadata
There are two ways to update structured metadata for multiple assets at a time: importing a CSV file and editing structured metadata by selecting assets from any view in the Media Library and then clicking the relevant option from the asset toolbar.
Bulk update metadata from a CSV file
You can update your assets' structured metadata in bulk by importing a CSV file that contains all the assets and field value changes you want to make. You can update up to 10,000 assets in a single import.
To bulk update structured metadata, follow these steps:
Step 1 - Prepare your CSV file
You can prepare your CSV file by downloading your current metadata using the Export Metadata DAM app:
- Select the assets you want to update, then select Export Metadata from the Asset toolbar.
- From the Export Asset Metadata dialog box, select the required identifier fields:
- If you want to use the asset's public ID as the identifier, you must select all three fields,
Public ID
,Asset Type
, andDelivery Type
, but NOT theAsset ID
field. - If you want to use asset ID as the identifier, you must select the
Asset ID
field but NOT thePublic ID
,Asset Type
, andDelivery Type
fields.
- If you want to use the asset's public ID as the identifier, you must select all three fields,
- Select any structured metadata fields you want to update.
- Export your CSV file.
- Edit the field values in the CSV file that you want to update. Fields that are left blank won't be updated.
Alternatively, prepare a CSV file on your own:
- Click the (3-dots) options menu at the top right of the Media Library and select Bulk Update Metadata.
- Download the sample file containing the required unique asset identifier column(s) that you want to use, either
publicId
orassetId
. - Edit the CSV file:
- Add columns that map to the structured metadata fields you want to update.
- Fill in the CSV file with the relevant asset details. Fields that are left blank won't be updated.
CSV file requirements:
In order for the import and update to succeed, the CSV file must contain:
- Columns that map to and have the same name as the asset's unique identifier. Include only one of the following sets of columns in your CSV file, either:
-
assetId
OR -
publicId
together withassetType
anddeliveryType
-
- Additional columns that map to existing structured metadata fields.NoteMake sure your CSV file contains only columns that correspond to one of the asset identifier sets, i.e., either
assetId
ORpublicId
,assetType
anddeliveryType
, and structured metadata fields. Any extra columns, or duplicated columns, will cause the import to fail. - Rows that represent up to 10,000 assets, without duplicates.
For the asset to update successfully, its row must contain:
- A valid value in the column(s) that map to the asset's unique identifier.
- A unique identifier that matches an existing asset.
- A valid value for each structured metadata field column, e.g., a column that maps to a structured metadata field of type
date
must contain a date in the required format (YYYY-MM-DD).
Step 2: Import your CSV file and update your asset metadata
If you haven't yet opened the bulk update,the (3-dots) options menu at the top right of the Media Library and select Bulk Update Metadata.
Import your CSV file and run the update.
An email will be sent to you when the update is complete, containing a full report of the asset metadata. This report will show values for all the assets and metadata fields that had been listed in the CSV file, including values that were and weren't updated, and any errors that may have occurred.
Edit structured metadata
You can edit structured metadata for multiple assets at a time from directly within the Media Library. Select the assets you want to update and click the Edit structured metadata option from the Assets toolbar to open the Edit structured metadata dialog box.
The placeholder for each field gives information about the previously existing metadata values stored in the selected assets, to help you verify the changes you're about to make:
- If the field is empty, none of the selected assets have previously existing values in that field.
- If Mixed values is displayed, the selected assets have different previously existing values, or no value, in that field.
- If an actual value is displayed, that value exists in that field for all of the selected assets.
To update the values in a metadata field for all selected assets, select the field and then enter (or select) corresponding values.
If your administrator has configured conditional metadata for your assets, additional fields may appear, disappear, or change depending on the values you enter. For example, selecting Employee from a Category field might display a Department field, because employees are associated with departments. By the same token, selecting Conference from the Category field might hide the Department field because it is no longer relevant, and in that case, any values previously selected for the Department field would be automatically deleted.
When you update structured metadata in bulk, previously existing metadata values are not displayed. Also, only the highest-level fields appear initially, and any hidden fields are displayed only if the conditions that activate them are met. So, while you change values in higher-level fields, it's possible that this may automatically delete metadata in dependent, hidden fields. If at least one of the assets you are updating already contains a value in a hidden field, a message warns you that metadata in hidden fields may be deleted as you change values in fields they depend on.
Bulk updating tags and contextual metadata
You can also set custom metadata values for multiple assets at once by selecting the assets from any view in the Media Library and then clicking the relevant option from the asset toolbar.
Tags
Click the Tag option from the Assets toolbar to open the Manage tags dialog box, where you can add new tags and remove tags for the selected assets. The Remove tags option is included, but minimized, if at least one of the assets you selected has tags.
To remove tags from the selected assets, expand the Remove tags option and type or select the tag values you want to remove. The selection list shows tag values that exist for at least one of the currently selected assets. The values you include in the Remove tags field will be selectively removed from any assets that have them. If a selected asset does not have any of those tags, it is not affected by the Remove part of the operation. Tags you specify to add are added to all selected assets.
Contextual metadata
Click the More option (...) from the Assets toolbar and then click Edit contextual metadata in the drop-down menu to open the Edit contextual metadata dialog box. Select an existing key and enter a matching value to add contextual metadata to your asset. You can also create a new key by entering a word in the Key textbox.