Skip to main content

Outline

At a glance:
  • Two integration patterns: Content Synchronization and Routing.
  • Synchronization: Replicates external data into the Optimizely content repository.
  • Routing: Resolves content dynamically at request time without storing it locally.
  • Best practice: Use routing for large, dynamic, or externally owned datasets.
  • Architecture insight: Hybrid approaches combining both patterns are common in enterprise Optimizely implementations.

Introduction

Modern Optimizely CMS 12 solutions frequently integrate with external systems such as Product Information Management (PIM) platforms, CRM systems, commerce engines, or headless content services. Developers must decide how external data should be surfaced within the CMS.

Two architectural approaches dominate these integrations:

  • Content Synchronization - external content is copied and stored inside Optimizely.
  • Routing - external content is dynamically resolved during URL processing without persisting it in the CMS database.

Choosing the correct pattern directly affects scalability, database size, editorial workflows, performance characteristics, and long-term maintainability of the solution.

1. Content Synchronization Overview

Content synchronization is the process of importing and maintaining external content within the Optimizely content repository. This approach treats external data as native CMS content by persisting it inside the Optimizely database.

Once synchronized, the content participates fully in Optimizely's editorial features, including versioning, workflows, search indexing, and personalization.

Structural Synchronization (Code-First Model)

Optimizely CMS follows a code-first content modeling approach. During application startup, the system scans assemblies for content models decorated with attributes such as ContentType. These definitions are synchronized with the CMS database automatically.

C#
[ContentType(DisplayName = "Article Page")] public class ArticlePage : PageData { public virtual string Summary { get; set; } }

The CMS automatically creates or updates the corresponding schema representation in the database.

Data Synchronization

Beyond structural synchronization, content instances may be imported from external systems through scheduled or event-driven processes.

  • Scheduled synchronization - jobs periodically import full datasets or incremental changes.
  • Event-driven synchronization - external system events trigger immediate updates.
  • Serialization pipelines - content is serialized before being transmitted to downstream systems such as Optimizely Graph.

Typical Synchronization Scenarios

  • Indexing content in Optimizely Graph.
  • Supporting site search across internal and external content.
  • Providing full editorial control over imported content.
  • Migrating legacy CMS or database content into Optimizely.

2. Routing and Dynamic Content Resolution

Routing provides a fundamentally different approach to integration. Instead of replicating external data into the CMS database, routing resolves content dynamically when a user requests a URL. This pattern allows Optimizely to function as a presentation layer while the authoritative data remains in an external system.

IContentProvider

An IContentProvider exposes external data as if it were part of the Optimizely content tree. These items implement the IContent interface but are not stored in the CMS database. This abstraction allows editors and APIs to interact with external data using familiar Optimizely interfaces.

IPartialRouter

An IPartialRouter intercepts URL segments and resolves them to content dynamically. It enables custom routing logic that extends beyond the standard CMS page tree.

C#
public class ProductPartialRouter : IPartialRouter<PageData, ProductContent> { public object RoutePartial(PageData content, SegmentContext segmentContext) { var productId = segmentContext.GetNextValue(); return ProductService.GetProduct(productId); } }

This mechanism enables flexible SEO-friendly URLs while retrieving data on demand.

3. Architectural Differences

The two patterns differ across several key dimensions. Expand each aspect below to compare the approaches.

Pattern comparison by aspect

Select an aspect to expand and compare the two patterns.

Data Storage
  • Synchronization: Data is stored inside the Optimizely database. Content becomes a native CMS record.
  • Routing: Data remains in the external system. Nothing is written to the CMS database.
Source of Truth
  • Synchronization: The CMS may become a secondary or primary source depending on editorial workflow.
  • Routing: The external system remains the single authoritative source at all times.
Content Volume
  • Synchronization: Large datasets increase database size and can affect performance.
  • Routing: Handles massive datasets efficiently - no storage cost in the CMS.
Content Volatility
  • Synchronization: Better suited to stable datasets where changes are infrequent.
  • Routing: Ideal for frequently changing data such as prices, inventory, or live feeds.
Editorial Workflow
  • Synchronization: Full CMS editing capabilities including versioning, approval workflows, and personalization.
  • Routing: Limited or delegated to the external system - editors cannot modify content in the CMS.
Performance
  • Synchronization: Fast reads after synchronization completes. No runtime dependency on external API availability.
  • Routing: Performance is dependent on external API latency. Caching strategies can mitigate this.

4. When Routing is the Better Choice

Favour routing when any of the following conditions apply:

  • High-frequency updates - such as real-time pricing or inventory data.
  • Large external catalogs - storing millions of items in the CMS database would be inefficient.
  • External system ownership - when another platform is the definitive source of truth.
  • Flexible SEO URL structures - when URLs must be generated dynamically.
  • Database optimization - avoiding unnecessary replication of external datasets.
  • Aggregated multi-system content - presenting unified content from multiple APIs.

5. When Synchronization is Preferable

Favour synchronization when any of the following conditions apply:

  • Editors must fully manage and version the content inside Optimizely.
  • Content must be indexed by Optimizely Graph or native search services.
  • The dataset is moderate in size and relatively stable.
  • The CMS must maintain complex relationships between content items.
  • Performance must be consistent even when external APIs are unavailable.

Note: Synchronization is also the right choice when external API downtime would be unacceptable for site rendering. Locally stored content ensures availability regardless of the external system's state.

6. Hybrid Integration Architectures

Enterprise implementations often combine both approaches to balance editorial flexibility with performance and scalability.

Common hybrid patterns

Select a pattern to expand and read the details.

Structure Synchronization + Dynamic Data Routing

Content types and page shells are defined and synchronized in Optimizely. Live data fields (prices, stock levels, dynamic attributes) are retrieved from an external system at request time via routing. This gives editors structural control while keeping operational data fresh.

Partial Synchronization

Only selected high-value items are synchronized for editorial control and indexing. Lower-priority items (long-tail catalog entries, archive records) remain in the external system and are served via routing. Reduces database growth while retaining editorial capability for key content.

Cached Routing

Dynamic data retrieved via routing is cached at the application or CDN layer to reduce external API calls and improve response times. This bridges the performance gap between routing and synchronization without the overhead of full data replication.

Pro tip: In commerce implementations, it is common to synchronize product category structure while routing individual product detail pages. This keeps the catalog tree editorially manageable without bloating the CMS with millions of product records.

Conclusion

The decision between routing and content synchronization in Optimizely CMS 12 is primarily driven by data ownership, volume, volatility, and editorial requirements.

Content synchronization enables deep CMS integration and editorial control, while routing provides a lightweight architecture for presenting dynamic or large external datasets without database duplication.

Understanding these trade-offs allows developers to design scalable and maintainable Optimizely architectures that balance performance, flexibility, and operational complexity.