Bartosz Sekula
Nov 5, 2024
  527
(2 votes)

CMS + CMP + Graph integration

We have just released a new package https://nuget.optimizely.com/package/?id=EPiServer.Cms.WelcomeIntegration.Graph which changes the way CMS fetches CMP Asset metadata.

If you use the CMP it means that you also have access to Graph and can fetch metadata from it instead of relying on the CMP API.

There are a few steps required in order to start using the new package https://nuget.optimizely.com/package/?id=EPiServer.Cms.WelcomeIntegration.Graph 

  1. Existing EPiServer.Cms.WelcomeIntegration packages need to be updated to version 1.4.0
  2. EPiServer.Cms.WelcomeIntegration.Graph needs to be installed
  3. GraphClient needs to be configured in appsettings.json in the following way:
    "Optimizely": {
      "ContentGraph": {
        "GatewayAddress": "https://cg.optimizely.com",
        "SingleKey": "SINGLE_KEY_FROM_CMP",
        "QueryPath": "content/v2",
        "UseHmacKey": false
      }
    }
  4. Make sure there is services.AddDAMUi(o => o.Enabled = true) call in Startup.cs
  5. Add services.AddDAMGraphIntegration(); call to Startup.cs
  6. If customer already has a CMS to Graph integration then it means he already has this config in appsettings
    "Optimizely": {
      "ContentGraph": {
        "GatewayAddress": "https://cg.optimizely.com",
        "AppKey": "APPKEY",
        "Secret": "SECRET",
        "QueryPath": "content/v2"
      }
    }
  7. Those AppKey&Secret allow to read&write to a CMS schema. But our new CMP+Graph integration uses different schema which is now available with the CMS keys.

  8. The following config needs to be added to appsettings.json
    "EPiServer": {
      "Cms": {
        "CMPGraph": {
           "SingleKey": "SINGLE_KEY_FROM_CMP"
        }
      }
    }
  9. Or to Startup.cs
    services.Configure<CMPGraphOptions>(options =>
    {
        options.SingleKey = "YOUR_KEY_FROM_CMP";
    });

In case the new package is not installed then it would still work as before, meaning all metadata will be fetched from the CMP API.

Nov 05, 2024

Comments

Andrew Markham
Andrew Markham Nov 6, 2024 05:21 PM

Hi Bartosz,

Can you provide any more details about this package?

I would like to know what interfaces it provides and whether we can use it directly to interact with the CMP/DAM.

I  recently developed my own integration https://github.com/andrewmarkham/Opti-Dam/tree/main/src/OptiDAM, and I would be keen to know whether the new package can replace my approach.

Thanks

Andy

Magnus Rahl
Magnus Rahl Nov 8, 2024 02:11 PM

Andrew, the documentation is here: CMP DAM Asset Picker in CMS

It covers both the user interface picker and the API:s for fetching image metadata (which is what this feature improves).

Please login to comment.
Latest blogs
Custom form element view in Optimizely CMS 12

Do you want full control over the form element markup? Create your own views!

Tomas Hensrud Gulla | Dec 11, 2024 | Syndicated blog

How to Elevate Your Experimentation - Opticon workshop experience

As a non-expert in the field of experimentation, I’d like to share my feedback on the recent Opticon San Antonio workshop session titled "How to...

David Ortiz | Dec 11, 2024

Persisting a Strawberry Shake GraphQL Client for Optimizely's Content Graph

A recent CMS project used Strawberry Shake to generate an up-to-date C# GraphQL client at each build. But what happens to the build if the GraphQL...

Nicholas Sideras | Dec 11, 2024 | Syndicated blog

Opti ID with Secure Cookies And Third Party AddOns

Opti ID has revolutionised access to the Optimizely One suite and is now the preferred authentication method on all PAAS CMS websites that I build....

Mark Stott | Dec 9, 2024

AsyncHelper can be considered harmful

.NET developers have been in the transition to move from synchronous APIs to asynchronous API. That was boosted a lot by await/async keyword of C#...

Quan Mai | Dec 4, 2024 | Syndicated blog

The search for dictionary key

Recently I helped to chase down a ghost (and you might be surprised to know that I, for most part, spend hours to be a ghostbuster, it could be fun...

Quan Mai | Dec 4, 2024 | Syndicated blog