Keshav Dave
Feb 15, 2026
  444
(1 votes)

Architecting AI in Optimizely CMS: When to Use Opal vs Custom Integration

AI is rapidly becoming a core capability in modern digital experience platforms. As developers working with Optimizely CMS 12 (.NET Core), the real question is no longer:

“Can we integrate AI?”

But rather:

“What is the right architectural approach for AI inside Optimizely?”

In this article, I’ll share practical implementation patterns, lessons learned, and how to decide between custom AI integration and leveraging Opal.

Why AI Integration Matters in CMS Implementations

Across multiple implementations, I’ve observed recurring challenges:

  • Manual metadata tagging

  • Inconsistent summaries and SEO descriptions

  • Static personalization logic

  • Slow campaign iteration cycles

  • Limited experimentation insights

AI, when architected correctly, can significantly enhance these areas - without disrupting core CMS performance.

Option 1: Custom AI Integration in Optimizely CMS 12

For organizations requiring flexibility and control, integrating external AI services (e.g., Azure OpenAI or private ML models) remains a powerful option.

Recommended Architecture

Editor → CMS → AI Service Layer → External AI Provider

Step 1: Introduce an Abstraction Layer

public interface IAIContentService
{
    Task<string> GenerateSummaryAsync(string content);
    Task<List<string>> GenerateTagsAsync(string content);
}

This ensures your CMS remains provider-agnostic.

Step 2: Register via Dependency Injection

services.AddHttpClient<IAIContentService, AIContentService>();

Keep AI logic outside controllers and content models. Treat it as infrastructure.

Step 3: Hook into CMS Events

Example: Auto-tag content during publishing.

_contentEvents.PublishingContent += async (sender, args) =>
{
    if (args.Content is ArticlePage page)
    {
        var tags = await _aiService.GenerateTagsAsync(page.MainBody.ToHtmlString());
        page.Tags = tags;
    }
};

Important Considerations

Performance

  • Never execute AI calls during page rendering.

  • Use background jobs or publish-time triggers.

  • Cache generated outputs.

Security

  • Store API keys in secure vaults.

  • Avoid exposing AI endpoints client-side.

Prompt Governance

Treat prompts like code:

  • Version them

  • Document them

  • Test them

Option 2: Leveraging Opal

Opal introduces AI natively within the Optimizely ecosystem.

Rather than building infrastructure from scratch, Opal enables:

  • AI-assisted content creation

  • Campaign generation

  • Intelligent experimentation insights

  • Workflow-level automation

From a developer perspective, Opal reduces:

  • Integration complexity

  • Maintenance overhead

  • Governance concerns

It shifts AI from being API-driven to being workflow-native.

Architectural Decision: Opal vs Custom AI

In enterprise implementations, the decision should be strategic.

Criteria Opal Custom Integration
Speed to Market High Medium
Full AI Control Medium High
Maintenance Low Higher
Compliance Control Managed Self-managed
Custom ML Use Cases Limited Strong

Recommended Enterprise Approach

In most scenarios, I recommend a hybrid model:

  • Use Opal for editor productivity and campaign acceleration.

  • Use custom AI integration for domain-specific business logic.

  • Keep AI infrastructure modular and loosely coupled.

This ensures flexibility without overengineering.

Designing AI-Ready Content Models

Regardless of approach, structure matters.

Best practices:

  • Avoid storing critical data in large RichText blobs.

  • Use structured properties.

  • Maintain clean content types.

  • Align metadata fields for AI enrichment.

AI works best with well-structured data.

Final Thoughts:-

AI in Optimizely CMS should not be treated as a feature toggle.

It is an architectural layer.

As developers and architects, our responsibility is to:

  • Protect performance

  • Maintain security

  • Ensure maintainability

  • Deliver business value

Whether through custom services or via Opal, the goal remains the same:

Build intelligent, scalable digital experiences. :)

Feb 15, 2026

Comments

Luc Gosso (MVP)
Luc Gosso (MVP) Feb 17, 2026 09:59 AM

Great article. A very balanced and architecturally sound perspective on AI in Optimizely CMS.

There is also a third option worth highlighting:

Option 3: Using Optimizely CMS-specific plugins such as the Epicweb AI Assistant

Instead of building everything from scratch or relying solely on SaaS-based Opal, organizations can leverage purpose-built AI plugins developed specifically for Optimizely CMS.

Advantages include:

  • Freedom to choose the AI provider, including Azure OpenAI, OpenAI, Gemini, or private models

  • A proven solution that has been on the market for 2.5 years

  • The most widely commercially used AI plugin for Optimizely CMS

  • Deep native CMS integration, fully aligned with Optimizely editing workflows

  • Faster implementation without the need to build and maintain custom AI infrastructure

  • Flexibility to combine with custom business logic where required

For many enterprise scenarios, this approach has proven to be a strong and pragmatic complement to both Opal and fully custom integrations.

 Welcome to the era of AI-Assistance | Epicweb Optimizely AI-Assistant

Manoj Kumawat
Manoj Kumawat Feb 18, 2026 09:53 AM

Nice writeup Keshav :) 

Please login to comment.
Latest blogs
Missing Properties tool for Optimizely CMS

If you have been working with Optimizely CMS for a while you have probably accumulated some technical debt in your property definitions. When you...

Per Nergård (MVP) | Mar 10, 2026

AI Generated Optimizely Developer Newsletter

Updates in the Optimizely ecosystem are everywhere: blog posts, forums, release notes, NuGet packages, and documentation changes. This newsletter...

Allan Thraen | Mar 10, 2026 |

Lessons from Building Production-Ready Opal Tools

AI tools are becoming a normal part of modern digital platforms. With  Optimizely Opal , teams can build tools that automate real tasks across the...

Praful Jangid | Mar 7, 2026

My Takeaway from Optimizely Opal Agents in Action 2026 - What Agentic AI Means for the Future of Digital Marketing

I would like to share with you what stayed in my head after this amazing virtual event organized by Optimizely. Agents in Action 2026 , a live...

Augusto Davalos | Mar 6, 2026