Best practices for configuring bots

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots might refer to Power Virtual Agents while we update documentation and training content.

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.

When you configure Azure and Copilot Studio bots in Omnichannel for Customer Service, use the following best practices:

  • In a queue, if both bots and human agents are available, set the bot’s capacity higher than all agents. A bot’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 bot.

  • When a bot escalates a conversation to a human agent, make sure that the context variables being updated by the bot and the corresponding routing rules match correctly.

  • When a conversation that's escalated by a bot comes back to the bot queue due to incorrect routing or context variables not being updated at runtime, the bot won't be assigned to the same conversation again. So, to prevent conversations from ending up in an infinite loop, you must configure a human agent for the bot queue.

  • Unlike human agents, bots aren't added to a "default" queue at the outset; you must add them from the Customer 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 a bot author or developer and want to pass complex cards or message types across channels, ensure 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.

See also

Integrate an Azure bot
Integrate a Copilot Studio bot
Configure bots to escalate and end conversations
Manage context variables
Context variables for a bot