To invoke the Optimizely Content Marketing Platform (CMP) Digital Asset Manager (DAM) Asset Picker in Optimizely Content Management System (CMS), create an HTML element (such as a _Browse the CMP Library_ button) to trigger a pop-up window:
<button id="openLibrary">Browse the CMP Library</button>`
Within a `
<script>` tag on this same page, create the code to activate the button event handler and process the asset data returned from the DAM Asset Picker popup window:
When a user selects one or more assets from the CMP DAM Library, the Asset Picker returns reference data to the page in a JSON object. You can register a callback function to use this data. Typically, you would import the reference to the asset into the calling application's own internal database. You can also ingest the data into some application-specific datastore for further use within the calling application.
The returned data structure is a JSON object whose data attribute contains an array of objects representing the selected assets.
In the following example object, the array contains two assets which the user selected from the Asset Picker. Each object contains three attributes:
guid` – CMP’s internal GUID for the asset.
title`– Human-readable description of the asset.
url`– CMP’s internal URL for the asset’s binary BLOB (an image file, PDF document, and so on).
## Pass an asset reference to CMS 11
When you select an asset for use, CMS version 11 obtains a reference of the URL from CMP with the asset data that is passed to the CMS front-end and stored in a database. The reference is a combination of the CMP ID and the content provider ID, such as _1234_ProviderId_.
## Related topics
[CMP DAM Asset Picker in CMS](🔗)
[CMP + CMS](🔗)
[Optimizely Content Marketing Platform Digital Asset Management Asset Picker](🔗)