HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Set up Opal AI

How to set up Opal AI in Optimizely Commerce Connect to use AI features.

You can use Opal AI in Optimizely Commerce Connect to use AI features, such as to generate text from a product propety.

📘

Note

This feature is available only for DXP customers. If you are a DXP customer and would like to enable the Opal AI feature, submit a Support ticket or send an email to [email protected]

Request to set up the configuration for Opal AI

Optimizely currently uses a request-based process to access Opal AI functionality while the service is rolled out to PaaS products. The Support team will help to set up the configuration for the Opal AI service for your project in the PaaS portal.

Update the source code

In your CMS site project, open the Startup.cs file and add the code to specify which properties of your product models you want to apply the AI generation feature. Here is example code added to the ConfigureServices method in the Startup.cs file:

services.Configure<TinyMceConfiguration>(config => 
{ 
    config.UseOpalAIForProperties<FashionProduct>(x => x.Description, x => x.LongDescription); 
    config.UseOpalAIForProperty<FashionBundle>(x => x.Description); 
}); 
  • UseOpalAIForProperties – Apply Opal AI for multiple properties of a product model.
  • UseOpalAIForProperty – Apply Opal AI for a property of a product model.
  • FashionProduct and FashionBundle – These are sample product models and Description/LongDescription are its properties. Replace with your product models and properties as you want.

Re-build the project. When you get confirmation from the previous step, you can re-deploy the site and use the feature.