Quickstart: Enable Message Analysis with Azure OpenAI
Important
Functionality described in this article is currently in public preview. This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Azure Communication Services enables you to receive Message Analysis results using your own Azure OpenAI resource.
Prerequisites
- Azure account with an active subscription.
- Register Event Grid Resource Provider.
- Create an Azure Communication Services resource.
- WhatsApp Channel under Azure Communication Services resource.
- Azure OpenAI resource.
Setup
Connect Azure Communication Services with Azure OpenAI Services:
a. Open your Azure Communication Services resource and click the Cognitive Services tab.
b. If system-assigned managed identity isn't enabled, you'll need to enable it.
c. In the Cognitive Services tab, click Enable Managed Identity.
d. Enable system assigned identity. This action begins the creation of the identity. A pop-up alert notifies you that the request is being processed.
e. When managed identity is enabled, the Cognitive Service tab displays a Connect cognitive service button to connect the two services.
f. Click Connect cognitive service, then select the Subscription, Resource Group, and Resource, and click Connect in the context pane.
Enable Message Analysis:
a. Go to the Channels page of the Advanced Messaging tab in your Azure Communication Services resource.
b. Select the channel of your choice to enable Message Analysis on. The system displays a channel details dialog.
c. Toggle Allow Message Analysis. Select one of the connected Azure OpenAI services and choose the desired deployment model for the Message Analysis feature. Then click Save.
Set up Event Grid subscription:
Subscribe to Advanced Message Analysis Completed event by creating or modifying an event subscription. See Subscribe to Advanced Messaging events for more details on creating event subscriptions.
See Message Analysis in action
a. Send a message from WhatsApp Customer to Contoso business phone number.
b. Receive the Message Analysis event in the Event Grid Viewer that you set up in Step 3. Details on the AdvancedMessageAnalysisCompleted event schema can be found at Azure Communication Services - Advanced Messaging events
Clean up resources
If you want to clean up and remove a Communication Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. Learn more about cleaning up resources.