Edit

Share via


Best practices for configuring AI agents

Applies to: Dynamics 365 Contact Center—embedded, Dynamics 365 Contact Center—standalone, and Dynamics 365 Customer Service

Note

Copilot Studio bot is renamed as Copilot agent (agent or AI agent). Human agent is now renamed as customer service representative (service representative or representative). You might come across references to the old and new terms while we update the product UI, documentation, and training content.

Best practices

When you configure Azure and Copilot agents in Dynamics 365 Contact Center, use the following best practices:

  • In a queue, if both AI agents (agents) and customer service representatives (service representatives or representatives) are available, set the agent’s capacity higher than all representatives. An agent’s capacity isn't reduced even after a work item is assigned to it. This ensures that any conversation routed to the queue is first picked up by the agent.

  • When an agent escalates a conversation to a representative, make sure that the context variables are updated by the agent and the corresponding routing rules match correctly.

  • When a conversation escalated by an AI agent comes back to the same queue due to incorrect routing or context variables not being updated at runtime, the conversation isn't assigned to the same agent who escalated the conversation. To prevent conversations from ending up in an infinite loop, you must configure a representative for the queue that has the AI agent only.

  • Unlike representatives, agents aren't added to a "default" queue at the outset; you must add them from the Copilot Service admin center app.

  • The message size must be less than or equal to 28 KB in all messaging channels. The size limit includes metadata like timestamps and tags. If you're an AI agent author (bot author) or developer and want to pass complex cards or message types across channels, make sure that your message size doesn't exceed the limit. If you're integrating a custom channel via Direct Line, then make sure that the activity payload doesn't exceed the message size limit.

Best practices to handle silence before a customer engages with the voice agent

  • Make sure the voice agent that presents the greeting to the customer is configured for the workstream and not for the queue. This way, routing engine isn't required to be engaged and agent engagement is quicker.

  • Configure the voice agent to play an initial greeting and then line up any other tasks, such as data lookup. To make sure that any background noise from customer doesn't abort the initial greeting from agent, configure the prompt with barge-in disabled.

  • If data lookup is required, configure a latency message. The message indicates an acknowledgement of a delay so that your caller doesn't go through silence. You can use the minimum playback time setting even if the background lookup operation completes while the message is playing. The default setting is 5000 ms.

  • To avoid prolonged silence if data lookup is delayed, use options such as Dataverse connectors, custom connectors, and prebuilt Power Automate connectors that Copilot Studio provides to access external data. HTTP requests offer the best performance for data outside Customer Service or Dynamics 365 Contact Center. The built-in Dataverse connectors are most efficient for accessing data within Dynamics 365.

  • You might experience latency when you use Power Automate to access data because the voice agent pauses until the flow completes. Use the Power Automate dashboard to monitor and optimize flow performance.

  • If you need to play a static message before the voice agent greets the customer with a more personalized prompt, then use system greeting messages. The voice agent is engaged after the uninterruptible system message plays. Make sure to avoid redundancy in voice agent greeting and system greeting.

Best practices to handle silence during a conversation with the voice agent

  • Configure a delay between messages using the delay activity option to introduce a pause between messages that makes interactions feel more natural. The default delay setting is 500 ms. You can modify the value to make the pause shorter or longer.

Considerations for context variables

When you configure context variables, check for the following conditions:

When you configure context variables, check for the following conditions:

  • The context variable name must be less than or equal to 100 characters.
  • The context variable value must be less than or equal to 4,000 characters.
  • Use exact match to pass the value to the context variable because it is case-sensitive.
  • Use the context variable names as defined and don't change them when you author flows in Azure or Power Virtual Agents bots.

We recommend that you don't update or delete the context variables after you create them. If you do need to update or delete the variables, make sure that they aren't used in any of the unified routing classification or assignment rules.

Best practices for setting up the voice channel
Integrate an Azure agent
Integrate a Copilot agent
Optimize agents to minimize latency
Configure AI agents to escalate and end conversations
Manage context variables
Context variables for an agent