How Variables improve user experience in AI Agents

AI Agents are now a part of our everyday reality. They can improve business processes, get work done, and save you a lot of time. One of the most important aspects of their design is how they communicate with the end user – this is what builds the user experience.

Think about an old IVR system where you had to go through an entire conversation just to find what you needed: “For English, press 1. For Polish, press 2. For orders, press 1. For product information, press 2.” And all you really wanted was to check your order status.

This illustrates how much the way an AI interacts with users can affect satisfaction.

Interaction types in Copilot Studio

In Copilot Studio, there are several ways to interact with the end user:

1. Topics with questions

You can use topics that ask users questions one by one. Each question stores a value in a variable. This means your bot collects information step by step.

Asking questions one by one.

2. Adaptive Cards

Adaptive Cards allow you to create user-friendly forms that gather multiple pieces of data at once.
They let you ensure that all required information is provided, and you can store multiple variable values simultaneously.

Using Adaptive Cards

3. AI and Prompt Actions

The newest method is using AI and Prompt Actions. With AI, you can extract all needed information directly from the user’s request, making the interaction feel more like a conversation with a human.

Extracting all information from the user’s request with AI.

Choosing the right method

There’s no single best approach. You need to choose the interaction type based on your use case.

Efficient communication through Variables

Another important element of smooth communication with your AI Agent is avoiding repetitive questions.

Your Agent should remember what the user has already shared – and this is where variables come in.

Topic Variables

These are custom variables created and used within a single topic.
For example, if a user provides their information in one topic, the Agent won’t remember it once the conversation switches to another topic.

Global Variables

To store information across topics, use Global Variables. They can also receive values from external sources and maintain context throughout the conversation.

System Variables

Copilot Studio also includes built-in variables that store user information like first name, last name, and email address.
You don’t need to ask for these: they’re already stored in the System Variables.

Context Variables

When your Agent supports a Model-Driven App (for example, Dynamics 365), you can also use Context Variables.
These help the Agent understand what the user is referring to.

For instance, if a user is viewing an Account form and wants to see related orders, they can simply ask: “Show me all open orders for this account”, instead of typing the full name like “Show me all open orders for Account XYZ.”

The Agent knows what “this” refers to, because the context variable tells it that the user is currently on the Account form with ID:12344.

Why Variables matter

All these variable types work together to make your AI Agent more human-like and context-aware. Even small improvements in user experience can significantly impact satisfaction.

Combined with previous insights about forms of communication (covered in earlier blog posts), this creates a complete guide to building the perfect Virtual Assistant.

Summary: Variable types and Data types in Copilot Studio

Variable type

System Variables

Scope
Global
Description
Predefined variables like user name, ID, timestamp, etc.
How it's created / used
Automatically available in all topics.

Topic Variables

Local
Store user input or action outputs within a topic.
Created via Question nodes, Set Variable nodes, or connectors.

Global Variables

Global
Variables promoted from topic scope for reuse across topics.
Change scope in variable settings.

Environment Variables

External
Read-only variables from Power Platform environments.

Defined in Power Platform Admin Center.

Session Variables

Session
Persist across a single conversation session related to the app context.
Useful for contextual memory (e.g., pageContext.id.guid).
Data type

String

Description
Text values.

Boolean

True/False values.

Number

Numeric values.

DateTime

Date and time values.

Record

Name-value pairs (like JSON objects).

Table

List of records with consistent schema.

Choice

Predefined list of options with synonyms.

Blank

Represents null or no value.

Benefits of using Variables

Variables make interactions personalized, efficient, and contextual. Here’s how they enhance your Copilot (for example, in Dynamics 365 Sales):

Benefit

Personalization

How Variables help
Store user-specific data like name, role, preferences.
Example in Dynamics 365 Sales
“Hi Paweł, would you like to review your top opportunities this week?”

Context awareness

Track session data, previous inputs, and entity context.
Automatically reference the current opportunityId when discussing deal status.

Dynamic responses

Adapt responses based on variable values.
If dealValue > 100000, Copilot suggests an executive review.

Efficient data handling

Reuse data across topics and flows.

contactEmail used for both follow-up email generation and CRM update.

Automation integration

Pass data to Power Automate, plugins, or external systems.
Trigger a workflow to assign a lead based on leadTerritory.

Error reduction

Avoid repeated user input.
Once accountName is captured, it’s reused throughout the conversation.

Decision making

Enable conditional logic and branching.

If customerSentiment = negative, Copilot escalates to support.

By using these variable types wisely, you can make your AI Agent feel more intuitive, responsive, and human, ultimately creating a better, smarter user experience.
Netwise assets

Empower every team with AI-driven copilots and agents.

[wp_add_post_tags]

See the latest insights from Netwise

15 years at Netwise: a conversation with our Chief Delivery Officer

In this article, you’ll learn about Adrian Wieczorek’s journey from developer to Chief Delivery Officer and how Netwise has evolved over the past 15 years.

Read more

Simplifying AI Agent Integration with Model Context Protocol

In this article, you’ll learn how MCP connects Copilot Studio agents with external systems for faster deployment, lower costs, and greater autonomy.

Read more

How Variables improve user experience in AI Agents

Learn how variables enhance AI Agent interactions and see how different variable and data types work in Copilot Studio.

Read more