Set up copilot template for store operations on Azure OpenAI Service

Important

This content has been retired and may not be updated in the future. The product, service, or technology mentioned in this content is no longer supported.

After you deploy copilot template for store operations, you can set up copilot template for store operations.

Prerequisites

Before you start, make sure you have the following:

  • System Administrator credentials with valid Azure Subscription ownership.

  • An Azure Cognitive Search resource. To create one, see Create a search service in the portal - Azure Cognitive Search.

  • An Azure Blob Storage container with your retailer-specific documents uploaded. To create a storage container, see Quickstart: Upload, download, and list blobs with the Azure portal and Manage blob containers using Azure CLI - Azure Storage | Microsoft Learn.

    Note

    If you selected the AI Store Assistant ARM Template during the copilot template for store operations deployment, the Azure Cognitive Search and the Azure Blob container would have been created during the deployment.

  • Upload retailer specific documents in the Azure Blob Storage container for the Q&A feature. Go to Storage accounts and select your storage account. Select the relevant container in the storage account and upload documents. To upload documents, see Upload a block blob. The document types currently supported are .txt, .md. .html, .docx, .pptx and .pdf.

  • An Azure OpenAI resource with semantic ranker subscription enabled.

    • To create an Azure OpenAI resource, see Create an OpenAI resource - Microsoft Azure.

    • To enable semantic ranker subscription, open Microsoft Azure. Navigate to Azure AI Search service instance. Select Settings> Semantic ranker (Preview) and turn on Semantic ranker subscription with your subscription plan.

Set up Microsoft Azure Cognitive Search connection

Microsoft Azure Cognitive Search is a cloud service that lets you create a search index from your data sources. You need to connect your data sources to Azure Cognitive Search to enable the Q&A feature of copilot template for store operations.

To set up Microsoft Azure Cognitive Search connection, follow these steps:

  1. Go to Azure OpenAI studio.

  2. Select Chat playground. On the right-side panel, choose Chat. When the Chat playground opens, select the Add your data tab. Select Add a data source.

  3. In the Data source workflow, configure the following fields and select Next:

    Screenshot shows the data source workflow.

    1. Select Azure Blob Storage as data source.

    2. Select your desired subscription from the list.

    3. Select Azure Blob Storage resource and the created Blob Storage instance. In case you don't have a Blob Storage, Create a storage account - Azure Storage | Microsoft Learn.

    4. Select your Azure Blob storage container where all the retailer documents are uploaded.

    5. Select your Azure Cognitive Search resource.

    6. Enter any index name you desire.

    7. Select Add vector search to this resource to enable vector embeddings.

    8. Select the deployment of text embedding modal from the drop-down menu. Use the deployment created while setting up Azure OpenAI instance.

  4. In the Data management workflow, fill in the following fields, and select Next:

    Screenshot shows the data management workflow.

    1. From the Search type drop-down, select Hybrid + semantic.

    2. Select both checkboxes to give your consent to account usage.

  5. In the Review and finish workflow, select Save and close. You see data being added on the Add your data page.

    Screenshot shows the chat playground.

    Important

    Note down the index name. You need this value to link Store operations with Azure OpenAI accounts.

Create an app registration

An app registration creates an identity for your app and generates a client secret. You need these credentials to authenticate your app with Azure OpenAI.

To create an app registration, follow these steps:

  1. Go to Microsoft Azure portal.

  2. Search for App registrations in the Azure portal and select it.

    The screenshot shows selecting app registration.

  3. Select New registration and provide a name for your app. Select single tenant option in supported account types. Select Register to create a new app registration.

    Screenshot shows creating a new app registration.

  4. You see a message that confirms your app registration. Under Client credentials, select Add a certificate or secret.

    The screenshot shows a successful app registration and how to add a certificate or a client secret.

    Important

    Note down the value of the Application ID. You need this value to link Store operations with Azure OpenAI accounts.

  5. Select + New client secret. Fill description, select the expiry time, and select Add. The authentication fails after expiry and you need to create a new app registration.

    Screenshot shows adding a new client secret.

  6. Copy and save the client secret value shown in the given screenshot as it is required for later configuration.

    Screenshot shows the client secret.

    Caution

    Note down the value of the client secret value. You need this value to link Store operations with Azure OpenAI accounts. After you refresh the tab or screen, the client secret value isn't displayed, and you can't copy it later. So, we recommend you save the client secret value while creating the app registration.

Assign the contributor role to app registration instance

You need to assign the contributor role to the app registration instance created earlier to use the OpenAI and Cognitive Search resources created during deployment.

  1. Sign in to Microsoft Azure portal.

  2. Select the OpenAI resource and select Access control (IAM).

    1. Select Add > Add role assignment. The Add role assignment page opens.

    2. On the Privileged administrator roles tab, select the Contributor role. Select Next

      Screenshot shows assigning contributor role to Open AI resource.

    3. On the Members tab, select User, group, or service principal > Select members. Select the app registration instance created earlier, and select Select > Close > Next.

      Screenshot shows selecting members for the contributor role for OpenAI resource.

    4. On the Review + assign tab, review the role assignment settings. Select Review + assign to assign the role.

      Screenshot shows reviewing and assigning role to members for the contributor role for OpenAI resource.

  3. Select the Cognitive Search resource and select Access control (IAM).

    1. Select Add > Add role assignment. The Add role assignment page opens.

    2. On the Privileged administrator roles tab, select the Contributor role. Select Next

      Screenshot shows assigning contributor role to Cognitive Search resource.

    3. On the Members tab, select User, group, or service principal > Select members. Select the app registration instance created earlier, and select Select > Close > Next.

      Screenshot shows selecting members for the contributor role for Cognitive Search resource.

    4. On the Review + assign tab, review the role assignment settings. Select Review + assign to assign the role.

      Screenshot shows reviewing and assigning role to members for the contributor role for Cognitive Search resource.

For more information, see Assign Azure roles using the Azure portal.

Assign the Storage Blob Data Reader role to app registration instance

You need to assign the Storage Blob Data Reader role to the app registration instance created earlier to use the storage account created during deployment.

Screenshot shows the storage blob data reader role assigned to the app registration instance.

For detailed steps, see Assign Azure roles using the Azure portal.

Assign user permissions in Power Platform admin center

You need to assign user permissions in Power Platform admin center to enable the copilot template for store operations feature for your users.

To assign user permissions, follow these steps:

  1. Go to environments in the left navigation and select requisite test environment.

  2. Go to Settings in your environment and select Users + permissions > Users.

  3. You can sort the list of users by any column or use the search box to find the user you want to assign permissions.

  4. Select the user to assign them roles and from More user actions, choose Manage security roles.

  5. Choose role as Retail AI store operations User to assign to the selected user.

    Screenshot shows assigning user permissions.

  6. Select Save. Users with the role can see the AI store operations icon on the top right corner of the Store operations homepage.

    Screenshot shows the AI store operations icon in Store operations.

Enable AI store operations

Admins need to enable the AI store operations flag to enable the AI store operations feature. To enable AI store operations, follow these steps:

  1. Sign in to the Power Apps maker portal and select the Store operations environment(only test environment).

  2. Go to Solutions. Create unmanaged solution or use any existing unmanaged solution.

  3. In your unmanaged solution, from the list of Objects, open Settings and go to Setting definitions.

  4. From the list of Objects, open Settings and go to Setting definitions.

  5. Select the Enable AI store operations setting definition, and in the Edit properties panel, select Add existing value and set the environment value to Yes.Select Save.

    Screenshot shows enabling AI store operations.

Next step