Skip to content

Configure Content Synchronization

⏱ 20 minutes intermediate
📜CoreGraphcms

Content synchronization connects your CMS editorial workflow to the Graph delivery layer. While basic sync works automatically after Graph setup, configuring it properly ensures reliable delivery, fast updates, and the ability to diagnose issues when they arise.

Read Content Synchronization Pipeline to understand the architecture before configuring.

Confirm that your Graph credentials are correctly configured in the CMS. The sync service uses the AppKey and Secret for authenticated communication with Graph.

Verify credentials in configuration
json
{
  "Optimizely": {
    "ContentGraph": {
      "GatewayAddress": "https://cg.optimizely.com",
      "AppKey": "your-app-key",
      "Secret": "your-secret-key",
      "SingleKey": "your-single-key",
      "AllowSendingLog": true
    }
  }
}

Before incremental sync can work, Graph needs a baseline index of all published content. Trigger the initial full sync through the CMS admin interface or the API.

Trigger full sync
bash
# Trigger a full content synchronization
curl -X POST \
  https://cg.optimizely.com/api/content/v3/sync \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic {base64(AppKey:Secret)}' \
  -d '{"action": "full"}'

Via CMS Admin UI:

  1. Navigate to CMS Admin > Scheduled Jobs
  2. Find “Content Graph Content Synchronization”
  3. Click Start Manually

The initial sync duration depends on content volume. Expect roughly 1 minute per 1,000 content items.

After the full sync completes, test that incremental sync works for new publishes.

  1. Publish a new page or update an existing page in the CMS
  2. Wait 5-10 seconds
  3. Query Graph for the updated content
Verify content appears in Graph
graphql
query VerifySync {
  Content(
    where: {
      _metadata: {
        published: { gte: "2026-03-25T00:00:00Z" }
      }
    }
    orderBy: { _metadata: { published: DESC } }
    limit: 5
  ) {
    items {
      _metadata {
        key
        types
        published
        url { default }
      }
    }
    total
  }
}

If your recently published content appears in the results, incremental sync is working correctly.

Enable sync logging to capture detailed information about sync operations. This is valuable for diagnosing issues in production.

Enable sync logging
json
{
  "Optimizely": {
    "ContentGraph": {
      "AllowSendingLog": true
    }
  },
  "Logging": {
    "LogLevel": {
      "Optimizely.ContentGraph": "Information"
    }
  }
}

Set the log level to Debug temporarily when troubleshooting sync issues. Return it to Information for normal operation to avoid excessive log volume.

Check the sync status endpoint regularly to ensure the pipeline is healthy.

Check sync status
bash
curl -s \
  https://cg.optimizely.com/api/content/v3/sync/status \
  -H 'Authorization: Basic {base64(AppKey:Secret)}' \
  | jq '.'

# Response includes:
# - lastSyncTime: timestamp of last successful sync
# - pendingItems: number of items waiting to sync
# - status: "healthy" | "syncing" | "error"

Set up alerts when pendingItems stays above zero for more than 5 minutes or when status is error.

SymptomCauseResolution
No content in Graph after full syncInvalid credentialsVerify AppKey and Secret in configuration
Content appears in Graph but staleIncremental sync not firingCheck CMS event system; restart CMS application
Some content types missingTypes not registered with GraphEnsure content types have the correct attributes and run a full resync
Sync job completes but content missingContent is in Draft statusOnly Published content syncs to Graph
Slow full sync performanceLarge content volumeSchedule full syncs during off-peak hours