CMS + CMP/DAM + Graph
How to integrate Optimizely Content Management System with Optimizely Content Marketing Platform and Optimizely Graph.
Optimizely Content Management System (CMS) can fetch data from Optimizely Content Marketing Platform (CMP) asset metadata when integrated with Optimizely Graph. If you use CMP, you also have access to Optimizely Graph and can fetch metadata from it instead of relying on the CMP API.
The Graph integration provides better performance than using the CMP REST API to fetch meta data, and it also allows other use cases like querying for images, videos, renditions, folders and more.
Note
Starting in November 2024, you should use the Optimizely Graph-supported version of this integration for optimal performance.
The Graph integration requires v2.0.0 or later of
EPiServer.Cms.WelcomeIntegration.UI
andEPiServer.Cms.WelcomeIntegration.Graph
.In December 2024, the
Optimizely.Graph.Client
1.4.0 release introducedTransformActionBehaviour
that lets you query both CMS and DAM in the same scope using differentSingleKey
.
Install and configure
-
Install or Update the
EPiServer.Cms.WelcomeIntegration.UI
package to version 2.0.0 or later. -
Install
EPiServer.Cms.WelcomeIntegration.Graph
. -
Ensure there is
services.AddDAMUi()
call inStartup.cs
. -
Add
services.AddDAMGraphIntegration();
call toStartup.cs
. -
If you do not already have a CMS-to-Graph integration, then add this configuration in
appsettings.json
. You can keep theAppKey
,Secret
andSingleKey
as dummy values because they are not used by the DAM integration. If you already have Graph for CMS configured, leave the values as-is."Optimizely": { "ContentGraph": { "GatewayAddress": "https://cg.optimizely.com", "AppKey": "APPKEY", "Secret": "SECRET", "SingleKey": "SINGLE_KEY", "TransformActionBehaviour": "Clone" } }
-
Please note in the example below that
TransformActionBehaviour
needs to be configured toClone
if you plan on using Graph indexed content from CMS as well as indexed assets from DAM. In the case that you use both sources theSingleKey
will differ between them and the configuration needs to be cloned. If CMS content is not indexed or queried then there is no need for this. -
The CMP+Graph integration uses a different schema and a separate
SingleKey
. Configure the following code inappsettings.json
."EPiServer": { "Cms": { "CMPGraph": { "SingleKey": "SINGLE_KEY_FROM_CMP" } } }
Or in
Startup.cs
.services.Configure<CMPGraphOptions>(options => { options.SingleKey = "SINGLE_KEY_FROM_CMP"; });
Getting the CMP Graph Single Key
If your CMP/DAM instance has Graph-enabled, you can find the key on the Misc tab under the Organization settings in CMP. The Single Key is the value of the
auth
query parameter of the URL listed under Content Graph Settings/DAM.If you do not see Content Graph Settings, contact Optimizely Support to enable it. Provide the name and SSO ID for your CMP instance (you can find the SSO ID under the General tab of the Organization settings.
Query Graph Data
The CMS+ CMP/DAM integration queries Optimizely Graph for metadata automatically, and you do not need to understand the schema or create your own GraphQL queries to use it. However, you have access to the Graph and can query it using your favorite GraphQL client. The following example lists images with a public Url
in the folder Hotels
.
Updated 3 days ago