Azure AI Content Safety – Blocklist Management in Optimizely CMS – Add New Blocklist Items

In this article, I provide a demonstration on how the blocklist management feature, offered by the Azure AI Content Safety service, can be used to add new blocklist items within Optimizely CMS.

The purpose of blocklist items is to supplement a blocklist that aids in detecting specific text content that may be deemed harmful or unnecessary.

Creating new Blocklist items can be achieved using a custom Add-On included in the NuGet Package “Patel.AzureAIContentSafety.Optimizely”. This Add-On can be obtained from the Optimizely NuGet Feed or at the NuGet Feed. The screenshot above shows this section within the Custom Add-On.

Blocklist items can also be added by using the Azure Content Safety Studio. However, it is necessary to create an AI Content Safety resource as a prerequisite before applying this method.

The below screenshot shows a code snippet for adding a new blocklist item using the Azure Content Safety API.

The blocklist item which is being created is called “TestBlockItemName.” Upon selecting the submit button, the API will be called to create the blocklist item. A screenshot showing an example of this is shown above.

Response from the API via the Console

Azure AI Content Safety – Add New Block Items operation complete
Blocklist Name: TestBlockItemName
BlockItemId: 9d178bcc-06db-424c-933e-5cf5ed898f71

When the blocklist item has been created, a summary model will be shown to the user, informing them that the new blocklist item has been created. A screenshot below shows an example of this.