Deploy an agent (Customer Conversation) (preview)

[This article is prerelease documentation and is subject to change.]

When you publish an agent powered by the Customer Conversation harness, Copilot Studio creates a prebuilt demo website automatically. Use the demo website to test your agent internally, then deploy it to a live website or Teams Phone when it's ready for customers.

Tip

In rare cases, setting up web chat and the demo website can take longer than usual. If this happens, select Retry, or check back later. You can keep building and testing your agent in the meantime.

Demo website vs. live website

Use the demo website to test your agent or share it with teammates and stakeholders. Customize the demo site to guide testing. The demo website isn't intended for production use, so don't share the URL with customers.

Publish the agent to your live website when it's ready for customers. Use the live site for production scenarios, such as embedding a customer support agent.

Customize the demo website

Edit the demo website welcome message and trigger phrases as needed. The welcome message explains the purpose of the test and guides teammates on what to ask.

  1. Open your agent.
  2. On the top menu bar, select Deploy.
  3. Select Configure on the Demo website card.
  4. On the Demo Website panel, under Welcome message, enter the message you want your teammates to see.
  5. Under Conversation starters, enter a list of trigger phrases. Trigger phrases initiate specific topics, so enter phrases for topics you want teammates to test.
  6. Select Save.
  7. Select Open demo website to open the demo website in a new browser tab.
  8. Copy the demo website URL under Share your website and share it with teammates.

Tip

Update the welcome message any time to match what you want testers to validate. For example, ask testers to try a specific scenario, then update the message to test a different scenario after they finish.

Add your agent to a live website

When your agent is ready, add it to your website by using a code snippet. Your live website can be external or internal, such as a SharePoint site.

  1. Select Configure on the Web chat card.
  2. Customize the branding to match your company theme.
  3. Select Copy script and save it in an HTML file, for example index.html. Alternatively, paste the script into the W3Schools Tryit Editor to test the experience.
  4. Open the HTML file in a modern browser, such as Microsoft Edge, and test the agent to confirm it responds correctly.
  5. Give the file to your web developer to add the agent to your website.

Deploy to Teams Phone

When you deploy an agent with Teams Phone, organizations can call a voice agent to handle specialized workflows like billing, prescription refills, order status, and more. This capability goes beyond what built-in appointment and Q&A tools provide. Customers experience a seamless handoff between the Teams Phone channel and Copilot Studio voice agents.

Note

Before you start

To use Teams Phone with an agent powered by the Customer Conversation harness, you need the following:

Setting up Teams Phone involves two roles: the maker and a Teams admin.

Maker setup steps

  1. Open your agent.
  2. On the top menu bar, select Deploy.
  3. Select Configure on the Teams Phone card.
  4. On the Teams Phone panel, select Enable. The agent's name now appears in the Teams admin center under Resource accounts.
  5. Contact your Teams admin to provision a Teams Phone number and assign a license. Share Setup - Direct dial Copilot Studio Voice Agents with your admin for the setup steps.

Move your agent to another environment

Some channels, such as certain contact center connections, require an environment with Dynamics 365 apps enabled. If your current environment doesn't support a channel you want to use, you can move your agent to a different environment. Agents don't move automatically when you switch environments, so you need to export and import the agent instead. For steps, see Export and import an agent (Customer Conversation).

Deploy to Dynamics 365 Contact Center

Connecting your agent to Dynamics 365 Contact Center lets it hand off conversations to a person, while its web chat and Teams Phone channels keep working as before.

Connecting the channels in Copilot Studio is only part of the setup:

  • Web chat: Copilot Studio creates the workstream automatically.
  • Teams Phone: Connecting only sets the agent's voice status to Connected. An admin must still create the voice workstream, link the Teams resource account to Dynamics 365 Contact Center, sync it, and attach the phone number.

This process spans two roles:

Role Where Responsibility
Maker Copilot Studio Build and publish the agent, connect the channels to Dynamics 365 Contact Center, and hand off to the admin
Contact center admin Copilot Service admin center + Teams PowerShell Workstream, queue, Teams resource account linking, syncs, attaching the number, and testing

Maker steps (Copilot Studio)

Before you start

  • Confirm the agent is published and web chat responds.
  • Confirm Teams Phone works in standalone mode: calling the number reaches the agent. Fix this before you connect to Dynamics 365 Contact Center. Otherwise, Dynamics 365 Contact Center inherits the same failure.

Configure

  1. Open the agent, then go to Deploy > Dynamics 365 Contact Center > Configure.
  2. Under Step 1 · Connect channels, turn on Web chat and Teams Phone. Confirm that both show Connected.
  3. Under Step 2 · Finish setup:
    • Web chat is ready. A workstream was created, and the agent was added to it. In the Copilot Service admin center, search for the agent's name to review it.
    • Teams Phone: Hand off to your admin by selecting Open Copilot Service admin center. Send the admin the agent name.
  4. After the admin finishes their steps, test both channels end to end.

Contact center admin steps (Copilot Service admin center + Teams PowerShell)

Before you start

Confirm you have admin access to the Copilot Service admin center and permissions as a Teams admin center admin.

1. Verify that the agent is connected

In the Copilot Service admin center, go to AI agents and find the agent. Confirm that voice is enabled and shows Connected.

2. Create an inbound voice workstream with Teams phone number

  1. Create a workstream of type Inbound for customers who call in.
  2. Create a new queue.
  3. Add the agent as the AI agent that handles incoming conversations.
  4. Leave Set up voice (the phone number) for step 6. The number doesn't appear until steps 4 and 5 are done.

Note

If workstream creation shows an error, check the workstream list before you retry. The workstream might have been created anyway, which leaves you with duplicates.

3. Collect the values you need

Run the commands in step 4 after you create the voice workstream. You need these values:

Value Where to find it
Resource account UPN Teams admin center > Voice > Resource accounts > Username
ObjectId Output of Get-CsOnlineApplicationInstance (step 4b)
Dynamics App ID (ApplicationId) Copilot Service admin center > Channels > Phone numbers > Advanced
ACS Resource ID (AcsResourceId) Copilot Service admin center > Channels > Phone numbers > Advanced

Tip

Copy every ID in full. A truncated ID causes errors during setup.

# a. One-time setup, then sign in
Install-Module MicrosoftTeams -Force -AllowClobber
Import-Module MicrosoftTeams
Connect-MicrosoftTeams

# b. Get the resource account's ObjectId
Get-CsOnlineApplicationInstance -Identity "<resource-account-UPN>" | Select DisplayName, UserPrincipalName, ObjectId

# c. Link the standalone Teams Phone number to Dynamics 365 Contact Center
Set-CsOnlineApplicationInstance -Identity "<resource-account-UPN>" -ApplicationId "<Dynamics-App-ID>" -AcsResourceId "<ACS-Resource-ID>"

# d. Sync the Teams data store
Sync-CsOnlineApplicationInstance -ObjectId <ObjectId> -ApplicationId "<Dynamics-App-ID>" -AcsResourceId "<ACS-Resource-ID>"

5. Sync in the Copilot Service admin center

In the Copilot Service admin center, go to Channels > Phone numbers > Advanced and select Sync, then refresh. The Teams Phone number should now appear in the phone numbers list.

6. Attach the number to the voice workstream

Open the workstream and go to Set up voice. Select the Teams number, then save.

Tip

If the number doesn't appear, the page is caching old data. Do a hard refresh (Ctrl+F5).

References