Configure Sitecore Content Hub

Note

To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.

Before you begin
  • Make sure that pop-ups are enabled in your browser.

After you've installed the Sitecore Content Hub Digital Apps Connector, you need to set up the OAuth client.

As a superuser, you can also customize the assets and projects search settings.

Configure the OAuth client

To add an OAuth client:

  1. On the menu bar, click Manage .

  2. On the Manage page, click OAuth clients.

  3. Click OAuth Client.

  4. In the OAuth Client dialog that opens, enter the following:

    Field name

    Value

    Name

    CI HUB Connector Live

    Client ID

    ce60b3027e8998ba6368cab8738c0bb1f226e60a

    Client Secret

    a15612273e8ef46e4d0d3478281e96cf403f0203

    Redirect URLs

    https://live.ci-hub.com/api/v1/auth/login/sitecore

    or

    https://ci-hub.azurewebsites.net/api/v1/auth/login/sitecore

    Client Type

    Authorization Code

  5. Click Save.

Configure CORS

For the Sitecore Content Hub Digital Apps Connector to display the asset selection, you must add an entry for the base URL to host the Content Hub asset search pages.

To configure Cross-Origin Resource Sharing (CORS):

  1. On the menu bar, click Manage.

  2. On the Manage page, click Settings.

  3. On the Settings page, in the search box, enter PortalConfiguration.

  4. Expand PortalConfiguration and select CORS Configuration.

  5. On the CORSConfiguration page, in the URL field, enter https://live.ci-hub.com and click Add. The CORS configuration is now active.

  6. Click Save.

Customize assets and projects search settings

You can configure the Sitecore Content Hub Digital Apps Connector search settings to support the following types of facets.

Note

The Sitecore Content Hub Digital Apps Connector does not support Query builder-based advanced filters.

Taxonomy relation facets

Taxonomy relation facets let you filter on a taxonomy relation, for example:

{
  "name": "M.AssetType",
  "type": "definition"
},

Where:

  • name is the related taxonomy relation's entity definition (for example, M.AssetType or M.Final.LifeCycle.Status)

  • type is definition

Property-based facets

Property-based facets let you filter on a property field, for example:

{
  "name": "Title",
  "definition": "M.Asset",
  "type": "property"
}

Where:

  • name is the property field name (such as TitleField, DateTimeField, BooleanField, or StringField)

  • definition is the entity definition (for example, M.Asset)

  • type is property

The following example shows both facet types:

"facets": [
  { "name": "Title",         "definition": "M.Asset", "type": "property" },
  { "name": "StringField",    "definition": "M.Asset", "type": "property" },
  { "name": "BooleanField",   "definition": "M.Asset", "type": "property" },
  { "name": "DateTimeField",  "definition": "M.Asset", "type": "property" },
  { "name": "M.AssetType",                             "type": "definition" },
  { "name": "M.Final.LifeCycle.Status",                "type": "definition" }
]

The following settings are configured out-of-the-box in Sitecore Content Hub.

  • CIHubAssetSearchConfig - determines the asset search filters used in the Sitecore Content Hub Digital Apps Connector.

    {
      "name": "CIHubAssetSearchConfig",
      "pageSize": 20,
      "checksum": "checksum",
      "filters": [
        {
          "definition": "M.Asset",
          "type": "definition"
        },
        {
          "definition": "M.Final.LifeCycle.Status",
          "type": "relation",
          "field": "FinalLifeCycleStatusToAsset",
          "operator": "Equals",
          "valueExpression": "String(\"StatusValue\") == \"Approved\""
        },
        {
          "definition": "M.Content.Repository",
          "type": "relation",
          "field": "ContentRepositoryToAsset",
          "operator": "Equals",
          "valueExpression": "String(\"ClassificationName\") == \"Standard\""
        }
      ],
      "facets": [
        {
          "name": "M.AssetType",
          "type": "definition"
        },
        {
          "name": "M.Final.LifeCycle.Status",
          "type": "definition"
        },
        {
          "name": "M.Brand",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductCategory",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductFamily",
          "type": "definition"
        },
        {
          "name": "M.Localization",
          "type": "definition"
        },
        {
          "name": "M.AssetMedia",
          "type": "definition"
        },
        {
          "name": "M.DRM.Restricted",
          "type": "definition"
        }
      ],
      "propertiesToLoad": [
        "FileName",
        "Description",
        "Title",
        "ReasonForRejection",
        "FileSize",
        "FileProperties",
        "ApprovedBy",
        "ApprovalDate",
        "Digest",
        "Renditions"
      ],
      "renditionsToLoad": [
        "thumbnail",
        "storyboard",
        "preview",
        "downloadOriginal",
        "downloadAlternative",
        "pdf",
        "bigthumbnail"
      ],
      "permissionsToLoad": [
        "Create",
        "Update",
        "AddVersion",
        "Submit",
        "Delete"
      ],
      "loadRenditionsLabels": true
    }
  • CIHubWIPSearchConfig - determines the WIP asset search filters used in the Sitecore Content Hub Digital Apps Connector

    {
      "name": "CIHubWIPSearchConfig",
      "pageSize": 20,
      "checksum": "checksum",
      "filters": [
        {
          "definition": "M.Asset",
          "type": "definition"
        },
        {
          "operator": "OR",
          "filters": [
            {
              "definition": "M.Final.LifeCycle.Status",
              "type": "relation",
              "field": "FinalLifeCycleStatusToAsset",
              "operator": "Equals",
              "valueExpression": "String(\"StatusValue\") == \"Created\""
            },
            {
              "definition": "M.Final.LifeCycle.Status",
              "type": "relation",
              "field": "FinalLifeCycleStatusToAsset",
              "operator": "Equals",
              "valueExpression": "String(\"StatusValue\") == \"Rejected\""
            },
            {
              "definition": "M.Final.LifeCycle.Status",
              "type": "relation",
              "field": "FinalLifeCycleStatusToAsset",
              "operator": "Equals",
              "valueExpression": "String(\"StatusValue\") == \"UnderReview\""
            }
          ]
        },
        {
          "definition": "M.Content.Repository",
          "type": "relation",
          "field": "ContentRepositoryToAsset",
          "operator": "Equals",
          "valueExpression": "String(\"ClassificationName\") == \"Standard\""
        },
        {
          "definition": "M.Asset",
          "type": "dynamic",
          "field": "CreatedBy",
          "operator": "Equals",
          "value": "currentuser"
        }
      ],
      "facets": [
        {
          "name": "M.AssetType",
          "type": "definition"
        },
        {
          "name": "M.Final.LifeCycle.Status",
          "type": "definition"
        },
        {
          "name": "M.Brand",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductCategory",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductFamily",
          "type": "definition"
        },
        {
          "name": "M.Localization",
          "type": "definition"
        },
        {
          "name": "M.AssetMedia",
          "type": "definition"
        },
        {
          "name": "M.DRM.Restricted",
          "type": "definition"
        }
      ],
      "propertiesToLoad": [
        "FileName",
        "Description",
        "ReasonForRejection",
        "Title",
        "FileSize",
        "FileProperties",
        "ApprovedBy",
        "ApprovalDate",
        "Digest",
        "Renditions"
      ],
      "renditionsToLoad": [
        "thumbnail",
        "storyboard",
        "preview",
        "downloadOriginal",
        "downloadAlternative",
        "pdf",
        "bigthumbnail"
      ],
      "relationsToLoad": [
        "FinalLifeCycleStatusToAsset"
      ],
      "permissionsToLoad": [
        "Create",
        "Update",
        "AddVersion",
        "Delete",
        "Submit"
      ],
      "loadRenditionsLabels": true
    }
  • CIHubProjectsSearchConfig - determines the projects search filters used in the Sitecore Content Hub Digital Apps Connector.

    {
      "name": "CIHubProjectsSearchConfig",
      "pageSize": 20,
      "checksum": "checksum",
      "filters": [
        {
          "definition": "M.Asset",
          "type": "definition"
        },
        {
          "operator": "OR",
          "filters": [
            {
              "definition": "M.Content.Repository",
              "type": "relation",
              "field": "ContentRepositoryToAsset",
              "operator": "Equals",
              "valueExpression": "String(\"ClassificationName\") == \"Standard\""
            },
            {
              "definition": "M.Content.Repository",
              "type": "relation",
              "field": "ContentRepositoryToAsset",
              "operator": "Equals",
              "valueExpression": "String(\"ClassificationName\") == \"Project\""
            }
          ]
        }
      ],
      "facets": [
        {
          "name": "M.AssetType",
          "type": "definition"
        },
        {
          "name": "M.Final.LifeCycle.Status",
          "type": "definition"
        },
        {
          "name": "M.Brand",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductCategory",
          "type": "definition"
        },
        {
          "name": "M.PCM.ProductFamily",
          "type": "definition"
        },
        {
          "name": "M.Localization",
          "type": "definition"
        },
        {
          "name": "M.AssetMedia",
          "type": "definition"
        },
        {
          "name": "M.DRM.Restricted",
          "type": "definition"
        }
      ],
      "propertiesToLoad": [
        "FileName",
        "Description",
        "ReasonForRejection",
        "Title",
        "FileSize",
        "FileProperties",
        "ApprovedBy",
        "ApprovalDate",
        "Digest",
        "Renditions"
      ],
      "renditionsToLoad": [
        "thumbnail",
        "storyboard",
        "preview",
        "downloadOriginal",
        "downloadAlternative",
        "pdf",
        "bigthumbnail"
      ],
      "relationsToLoad": [
        "FinalLifeCycleStatusToAsset"
      ],
      "permissionsToLoad": [
        "Create",
        "Update",
        "AddVersion",
        "Delete",
        "Submit"
      ],
      "loadRenditionsLabels": true
    }

To customize these settings:

  1. On the menu bar, click Manage .

  2. On the Manage page, click Settings.

  3. On the Settings page, click PortalConfiguration and then click the setting you want to customize.

  4. Make your changes and click Save.

Important

For this configuration to work, you must activate it by clicking > LIVE (NEW) in your plugin window.

If you have suggestions for improving this article, let us know!