Use Case - Setting up a Nimbus Virtual User using Copilot

How to set up Copilot to enable Virtual Users in Nimbus Workflows

In this Use Case we're setting up a Virtual User to take customer questions and answer accordingly with Copilot-defined topics. To achieve this, we're going to cover the following topics in this Use Case: 

  • How to use Microsoft Copilot Studio to set up your first AI Agent acting as a Virtual User.
  • How to configure Nimbus in order to use the Virtual User in your workflows.
  • How to set up the workflow and make service calls for further adjustments.

Preconditions

Azure Preconditions

Microsoft Services: In order to use AI-driven Bots in Nimbus, you will need access to Microsoft Cognitive Services. Azure Bot usage causes additional costs outside of your Nimbus subscription. Please note the licensing remarks below.

Use Case Overview

Details will be covered below in this Use Case. As a quick tl;dr, here is an overview of items you will need: 

What? Where? Why?
✅ Copilot Bot Setup1 https://copilotstudio.microsoft.com/  To define the bot role, behavior, topics, triggers and to get the API authentication details
✅Bot Configuration Nimbus Admin > Configuration To get the Bot API endpoint and Authentication details into Nimbus
✅Bot Response Templates  Nimbus Admin > Configuration To map the bot response JSON to Nimbus parameters for further processing within workflows.
✅Virtual Users  Nimbus Admin > Configuration To define the initial bot instructions as well as tying all other configuration items together.
✅ “Add Virtual User Activity” (in Workflow) Workflows > Conversation Handling Activities  To invite the Bot to the conversation and route the outcomes accordingly.

1 Note that behaviors, UI designs, and configuration details are subject to frequent changes by Microsoft and may mismatch from our use case descriptions. Feel free to contact our support to request an update to our use case documentation.

Step 1 - Copilot Setup

✅ The first step is creating an AI Agent on your Microsoft Copilot Studio. https://copilotstudio.microsoft.com/ 

🔎 Note that this part heavily relies on the official Microsoft Copilot Studio Guidance Documentation and related capabilities. You might want to read into chapters such as:

 

Agent creation

  1. Sign in to Copilot Studio.
  2. Go to Agents and Create a new Agent.
    1. Name: Give your Agent a descriptive name that signals the intended use, e.g. Insurance Bot, Attendant, Customer Data Requester.
    2. Description: Can be left empty. Only for listings in Copilot, not used by Nimbus. 
    3. General Instructions: Configure your Bot's directive and behavior. As an example: 
      As a telephony helpdesk assistant you help customers with accurate and helpful responses. Ensure answers are in between 2-3 sentences. Maintain a courteous and accurate communication style.
    4. Orchestration: Disabled
      💡Note that any generative events will be ignored in Nimbus Workflows. Your trigger phrases should be as specific and deterministic as possible to ensure a quick workflow routing experience.
  3. Topics1: Distinguished by System and Custom topics.
    1. System topics: The “Conversation Start” topic is the core focus point in this use case. This is how the Bot starts the conversation with the customer, even proactively if necessary. 
      💡We will get back to this later in the Nimbus Setup as our “Initial Message” in the Virtual User configuration below.
    2. 2Custom topics: This is where you define the competencies of your Bot. It primarily consists of trigger phrases (e.g. “Health service, Insurance service, Problem handling, Support request, Personal Assistance” that your Bot is supposed to react to with topics in specific or general replies. 
      Following the official chat bot topics documentation, you can also go into very specific cases here based on your most-frequented service inquiries such as “In which countries can I find branch offices of service X”).
  4. Publish: Once everything is configured3, don't forget to publish your Bot.

1🧪 Experimentation required: As Nimbus will exclusively rely on your configured Agent Bot capabilities, this area is the one where you need to put the most thought and testing in. The steps below are therefore only rough guidelines for your Bot configuration.

2💡Good practice: Make the customer aware that they are (about to) speak with an AI. You can of course also lead with an “Announcement” in your workflow as an elegant transition first, looking up useful customer information in CRM via Nimbus Power Automate Connector.

3💡Good to know: Other tabs like Actions, Activity, Analytics in Microsoft Copilot Studio are just for informational purposes and do not require any configuration for Nimbus.

 

Agent Authentication

✅The following steps explain how to define your authentication in Copilot Studio so Nimbus can access the API later.

  1. Log into Copilot Studio.
  2. Security: Go to Agents > Settings > Security. 
    1. Select No authentication → See Design and Limitation Notes below.
    2. Go to Web Channel Security > Secrets and Tokens.
    3. 🧠Copy either Secret 1 or 2 for later within your Nimbus Bots configuration.
    4. Ensure “Require secured access” is enabled.

Copilot API Endpoint

General1 https://directline.Botframework.com/v3/directline/conversations 
Europe https://europe.directline.botframework.com/v3/directline/conversations/ 
Microsoft Copilot Directline API Authentication endpoints

1 ☝A request might fail if you use the global base URI for a regional bot, as some requests could go beyond geographical boundaries. The URLs are maintained by Microsoft and retrieved from the Learn | Direct Line documentation. We advise to test performance and stability.

🧠Don't forget: Note down the endpoint for later use, e.g. for the Bots configuration of your Nimbus Virtual Users.

 

Step 2 - Nimbus Setup

✅ After setting up your Copilot Bot the next steps are done within the Nimbus Administration. This consists of setting up a Bot configuration that relates to your Copilot Agent. We will then map the responses to be eventually used in a “Add Virtual User” activity within your Nimbus Workflows.

 

Configuring the Bot

✅ The Bot is your “mapping” to the Bot and API endpoint you configured above, including the authentication.

  1. Head to Nimbus Administration > Configuration > Bots and create a new Bot.
  2. Give your Bot a descriptive name. 
    💡This name is just for Nimbus UI purposes, and must not match Copilot. 
  3. Define the Organization Unit under which this Bot will be selectable. 
    ☝ Note that any service on this OU or higher can access it (which may result in additional Azure cost).
  4. Type is M365 Copilot Direct Line 3.0.
  5. API Key: 🧠 Paste the Secret from the Copilot Setup above.
  6. Endpoint: 🧠 https://directline.Botframework.com/v3/directline/conversations
  7. Save and Close.

Configuring Bot Response Templates

✅ Next step is setting up Nimbus Bot Response Templates, which tell Nimbus what to do with the JSON data that the Bot will reply with.

Show me some Copilot JSON response examples….

Example for Copilot DirectLine - JSON Examples

The following JSON is returned from M365 CoPilot Direct Line 3.0, which is the default configuration of external Bots in Nimbus.

Message JSON

{
	"type": "message",
	"id": "5ZASDrgTOO0GtNlVtdgEE2-uk|0000021",
	"timestamp": "2025-05-20T20:31:01.9981516Z",
	"serviceUrl": "https://directline.botframework.com/",
	"channelId": "directline",
	"from": {
		"id": "user1"
	},
	"conversation": {
		"id": "5ZASDrgTOO0GtNlVtdgEE2-uk"
	},
	"locale": "en-EN",
	"text": "Hello, this is my answer as a Bot"
}

🧠Important part in this response is the value written into text – the actual answer from your bot. When you use this value in your Bot Response Templates, e.g. to map it to your “Exit” and “Answer Raw” fields within Nimbus, make sure to anticipate and parse longer text using Regular Expressions as you configure your “Add Virtual User” Workflow Activity.

 
 

Event JSON

{
  "type": "event",
  "id": "IG7NO2Am5RlIHU0Ufa3pEr-eu|0000005",
  "timestamp": "2025-07-04T11:26:07.9037389Z",
  "channelId": "directline",
  "from": {
	"id": "ca1f129e-77d9-1f5a-e4d4-83bdb379b763",
	"name": "Agent 1",
	"role": "bot"
  },
  "conversation": {
	"id": "IG7NO2Am5RlIHU0Ufa3pEr-eu"
  },
  "membersAdded": [],
  "membersRemoved": [],
  "reactionsAdded": [],
  "reactionsRemoved": [],
  "locale": "en-EN",
  "attachments": [],
  "entities": [],
  "channelData": "{\"data\":\"mydata\",\"event\":\"mycustomevent\",\"exit\":false,\"topic\":null}",
  "replyToId": "IG7NO2Am5RlIHU0Ufa3pEr-eu|0000000",
  "value": "Handover",
  "name": "Exit",
  "listenFor": [],
  "textHighlights": []
}

🧠Important parts in this response are name “Exit”  to identify the event, and the value “Handover” which is going to be evaluated by Nimbus.
☝Note that Nimbus is only interested in contents of value, parsing them using Regular Expressions as you configure your “Add Virtual User” Workflow Activity. The event name “Exit”  in this example just helps with identification of the Copilot event.

 
 
 
 
 
  1. Head to Nimbus Administration > Configuration > Bot Response Templates and create a new template.
  2. Give your template a descriptive name. 
    💡This name is just for Nimbus UI purposes.
  3. Define the Organization Unit under which this Template is selectable. 
    💡Should ideally match the Bot OU so they can be made equally available in other Nimbus UIs. Of course you can pick a “higher” OU if you want to share this Template definition among similar services that expect the same kind of data in the reply.
  4. “System Field Mappings” you can adjust as follows:

Example: Copilot DirectLine - System Field Mapping 

💡In the following we want to focus our attention to the values of “text” and “value” of the Copilot API JSON response. 

As Nimbus identifies parameter with a $-sign, you can map the response as follows:

  1. Into the field Answer Raw map your type: $['text'].
     
  2. Using “Copilot” Topics: 
    1. If are not working with Topics in Copilot, map your bot response $['text'] – "hello, bot" in our example above – to the Exit field in Nimbus. 
      ☝Note: that this raw text can be quite long and contain a lot of “extra fluff", so your Regular Expressions need to be complex enough to catch the response you are looking for.
    2. If you are working with Topics in Copilot, map the Exit to $['value'] - “Handover” in our example above – to the Exit field in Nimbus. 
      💡Good to know: Copilot topics trigger controlled responses can be followed with an event activity. The event consists of a name – e.g. “Exit” in our example above – and a value . Nimbus is exclusively interested in the value portion, the name 
  3. The “Exit” field will use any values, e.g. $['value'] or $['text'] for the “Exit” condition check in your Conversation Handling Activities  > “Add Virtual User” activity. Regular Regular Expressions can be used to find the necessary words in a response, e.g. our “Handover” phrase.
Exit validation via Regex within the “Add Virtual User” activity

Example: Copilot DirectLine - Custom Field Mapping

💡This part is optional, depending if you want to continue using the bot response for other purposes, e.g. for easier referencing in Nimbus Workflows or as Conversation Context.

  1. Map the $['text'] field to a Custom Parameter for later usage, e.g. within your Flow Actions.
  2. You can also map $['value'] from your Event activity if you want to work with the topic.
  3. Repeat this for any other JSON field / value pairs you want to map to parameters.
Example of mapping API JSON response text and values to Nimbus Parameter

Configuring the Virtual User

✅ Virtual Users combine the previous Bot and Template configuration. You can give them instructions to act as your Agent that will interact with the Customer.

  1. Head to Nimbus Administration > Configuration > Virtual Users and create a new Virtual User.
  2. Give your Virtual User a descriptive name, e.g. Service Desk Operator.
    💡This name is just for Nimbus UI purposes, e.g. for later selection in your Workflows → Next step.
  3. Define the Organization Unit under which this Virtual User is selectable. 
    💡Should ideally match your intended Services and Workflows accessing this Virtual User. Of course you can pick a “higher” OU if you want to share this definition among similar Services that will use the same kind of Agent for Customer interaction.
  4. The “Initial Message” acts as a "Topic” or “Query” for your bot. This field can also be used to force a bot response in case it is not configured to send an initial message by itself. 

    💡Note that this field is optional in Nimbus:

    Depending on your Bot configuration underlying AI may already engage with the Customer automatically. Optionally you can also this message to go directly into the first Conversation Topic1, e.g. by using Parameters and starting right with the first inquiry.


    A possible example of an Initial Message could be:

    Hello, this is $(CustomContextParameters.DOC_ClientId) from $(Customer.Company) speaking. I have a question. What are my options?

    1🔎For Copilot as AI Agent, refer to System topics: > “Conversation Start” (MSFT documentation).

     
  5. Check that Audio/Video modality is enabled and select a Speech Recognizers (Transcriber) 
    ✅ Speech Recognizer are configured to parse the language of the calling Customer into text for the bot to process. They can be configured multilingual, but are more effective when set to a specific language. 
  6. If you want to use your Virtual user productively, ensure your Virtual User has a license applied. This license can either be applied directly in the Virtual User configuration steps below or - in bulk - via Admin > Licensing view. 
    ⮑ Applying the license enables usage of the “Add Virtual User” Workflow Activity.
An example for a Virtual User configuration with some Parameters in the Initial Message.

💡Flexible Input: By adding Custom Parameters or System Fields and Parameters to your “Initial message” you can also lead right into a question or topic. Of course it needs to be ensured that these Parameters have Defaults or Fallbacks so the bot can operate normally. 

 

Configuring your Nimbus Workflow

✅Last but not least you need to configure a new Workflows to handle the Audio/Video interaction between Customers and your new Virtual User.

  1. Head to Nimbus Administration > Configuration > Workflows.
  2. Design or adjust any existing workflows you want to repurpose. 
    💡 We recommend creating a copy of an existing Workflow so you can switch and test it with ease and return back should something not work as intended.
  3. In your Workflow, Accept a call as normally, but do NOT add a queue it. Instead, start with an Announcement to prepare your calling Customer that they are speaking to a Virtual User (Virtual Customer Assistant).
  4. Connect your Caller to the AI by using the “Add Virtual User” in your workflow. You can find it in the Conversation Handling Activities. Configure the “Add Virtual User” activity as follows:
    1. Virtual User: Select from your list of Virtual Users as previously configured in the Configuration above.
    2. Max Input Timeout: Define this to a reasonable time where no answer has been given by the Customer - e.g. 1 minute. → The activity will take the “Idle Timeout” exit.
    3. Text to Speech: determines the voice (and language) the Bot will be using for Text to Speech transcription. 
      ☝Note that the Bot may give very long answers if you haven't given it specific General Instructions in Copilot Studio, e.g. to limit itself to a few sentences only.
    4. Exits: will determine the exit node taken within your Workflow. 
      💡For example, if your Customer requests “I'd like to speak to someone in person”, the Bot may answer with “Of course! I'll have someone call you back as soon as possible” . In this case you need an “Callback” exit condition, evaluating the bot replies via Regular Expressions, for example: support|help|assist|speak|talk

      💡Prepare for all eventualities: Note that determinism of your bot highly relies on the “General Instructions” and especially on the “Topics” configuration in your Copilot setup. Make sure your “Failed” exit conditions are also covered, e.g. when no possible topic could be identified.

      💡Remember that in the Bot Response Templates $['text']is mapped to your Workflow “Exit” conditions, not the Customer's initial request or voice transcription.

       
  5. Finally: 
    1. Don't forget to route your all your Activity exits, e.g. Failed/Idle conditions. 
    2. Route to Service Queues, Voicemail or Transfer where necessary.
    3. Don't forget the “Disconnect” activity at the end and to Save your workflow.

✅ Testing your Virtual User

  1. To test your Virtual Use both in Copilot Studio (text prompts) and in Calls. 
    1. You can engage a test call to your Service UPN via General Service Settings.
    2. 🔎 Keep in mind: You can use the “Initial message" defined in your Virtual Users as a first conversation topic, including the use of Nimbus Parameters and System Fields. Examples of this can be found in our more advanced Use Case - Building a Classification Agent.
  2. Testing your Workflows: 
    1. We recommend testing different workflow paths taken by adding some simple Announcements to each entry and exit node for easier input / output validation, also as you can check on parameters this way.
    2. 🔎 Keep in mind: The Workflow Exits depend on what the Virtual User is replying to the Customer (match from the Bot Response Templates). Your Regular Expressions should be flexible enough to handle most common cases. For example you can catch multiple words with pipe “|” characters to collect synonyms in a single exit.
 

Further Use Cases

Once you established a baseline connection with your AI, you might want to visit our library of AI Use Cases Cases for more inspiration.

 

Known Limitations

Table of Contents