Copilot - Initial Data Handover from Nimbus to Copilot

The bot configuration is done in two steps, first in Nimbus as part of the “Virtual User” configuration, then in Copilot to handle the topics and values.

Configuration in Nimbus

Within Admin > Configuration > Virtual Users: If you need Copilot to start the conversation with some Customer data, use the “Initial message” field within the bot configuration for it. The message can be formatted as JSON string. 

Example: 

{
"Phone": "+$(Caller.TelNumber)",
"Name": "$(Customer.DisplayName)"
}

☝Keep in mind that this message is sent right at the beginning when the Copilot joins. It might take a while to receive an answer back from Copilot.

 

Configuration in Copilot Studio

In Copilot Studio, craft a topic that handles this kind of input exclusively. Depending on if you have “Orchestration" (generative AI) enabled, the configuration differs slightly. 🔎 We cover the differences and considerations in our Best Practices - Virtual Users in Nimbus.

Orchestration enabled

If your Copilot has Orchestration enabled you can use the “The Agent chooses” topic trigger.

Description Screenshot
  1. Start with the trigger: The agent chooses. For our example use the following description:
Only run this topic when you receive a JSON payload with the following format:
In Copilot Studio, craft a topic that handles this kind of input exclusively. If your Copilot has Orchestration enabled you can use the “The Agent chooses” topic trigger.
The JSON must contain both the "Phone" and "Name" fields. The "Phone" field must be a string in E164 format.
Do not run this topic for other formats, missing fields, or plain text input.
  1. In the next step, save the variable value into a new variable CustomerDetails.
  2. Use a powerfx function to set the variable to value: ParseJSON(System.Activity.Text)

⮑ Now we can access the fields of the CustomerDetails variable and store each value properly in its own variable.

  1. Set variable = Global.PhoneNumber
  2. To value = Text(Topic.CustomerDetails.Phone)
↪ Repeat the same steps for all values needed globally.
 
 

Orchestration disabled

If your Copilot has Orchestration disabled, then use the trigger “The user says a phrase” and define a couple of JSON phrases. The Nimbus “Initial Message to Bot” from the Virtual Users configuration are send as an Activity of type Message to Copilot.

Description Screenshot
  1. Start with the trigger: The user says a phrase . 
  2. Add several possible JSON payloads as phrases. These help the bot learn that JSON-formatted input is relevant.
  3. You can also use the Code Viewer to paste possible JSON values as trigger phrases to the topic:
  1. In the next step, save the variable value into a new variable JSONPayload
  2. Use a powerfx function to set the variable to value: ParseJSON(System.Activity.Text)

⮑ Now we can access the fields of the JSONPayload variable and store each value properly in its own variable.

  1. Set variable = Global.TaskId
  2. To value = Text(Topic.JSONPayload.TaskId)
 
 

Table of Contents