Variables and Entities Explained in Microsoft Copilot Studio (Day 12)
Part 5 of 5 in 365 Days of Copilot Studio — view the full series
Day 12 of the 365 Days of Microsoft Copilot Studio series explains variables and entities: what they are, how they work together, common examples, a real-world HR leave request scenario, best practices, and key takeaways.
Welcome to Day 12 of 365 Days of Microsoft Copilot Studio. Today we are focusing on variables and entities — two core concepts that help your AI agent understand user input, remember important information, and reuse that information throughout a conversation.
Without variables and entities, every conversation starts from scratch. With them, your agent can collect details once, keep the conversation context, and use the right values when it replies or takes action.
What are variables and entities?
Entities identify important values from what the user says. Variables store those values so the agent can use them later.
Simple rule: an entity finds it. A variable stores it.
Think of entities as the agent’s ability to recognize meaningful information in natural language. Think of variables as the agent’s short-term memory during the conversation.
What are variables?
Variables temporarily store information collected during a conversation. They help your AI agent remember what matters and reuse it when needed.
Common variable examples include:
- UserName — the person interacting with the agent.
- EmailAddress — the user’s email or contact address.
- Department — the user’s business unit, such as HR or Finance.
- LeaveDate or PreferredDate — a date selected by the user.
- TicketNumber — a support or service request identifier.
- Location — a city, office, or region.
Variables help your agent personalize responses, pass data to actions and flows, and continue conversations naturally.
What are entities?
Entities identify important values from natural language. Instead of asking every question again, Copilot Studio can understand values already present in the user’s message.
For example, if a user says, “I need leave next Monday.”, the agent can detect a Date entity with the value next Monday.
Common entity examples include:
- Dates — next Monday, July 20, 2026.
- Locations — New York, Hyderabad, London.
- Phone numbers — formatted phone values.
- Numbers — 10, 500, 42%.
- Email addresses — user or business email addresses.
- Names — people names such as John or Sarah.
- Currency — $150 or 250 USD.
- Custom entities — product, leave type, employee ID, or any business-specific value.
Entities help your AI agent understand what users mean, even when they phrase the same request in different ways.
Variables vs entities
Variables and entities have different purposes, but they work together to create smarter conversations.
- Variables store information collected during the conversation.
- Entities detect information from user input.
- Variables can be created, updated, reused, and cleared.
- Entities are extracted from natural language based on patterns, context, and entity type.
- Variables pass values to topics, actions, and Power Automate flows.
- Entities help understand intent and input.
Entity finds the value. Variable keeps the value available for the next step.
How they work together
A typical conversation flow looks like this:
- User input — the user sends a message, such as “My name is John and I need leave next Friday.”
- AI detects entities — Copilot Studio detects Name: John and Date: Next Friday.
- Stores in variables — the detected values are saved as variables, such as UserName = John and LeaveDate = Next Friday.
- Uses the values — the variables personalize replies, trigger actions, and continue the conversation.
- AI responds and acts — the agent replies with context, such as “Hi John, your leave request for next Friday has been submitted.”
Together, variables and entities make conversations personalized, accurate, and action-ready.
Real-world example: HR leave request
Let’s apply the concept to a real business scenario: an employee wants to submit a leave request.
- User says — “I want leave on July 20.”
- Entity detected — Copilot Studio detects the Date entity with the value July 20.
- Value stored in variable — the value is saved as LeaveDate = July 20.
- Power Automate triggered — the agent passes LeaveDate to a flow that creates the leave request.
- AI responds — “Your leave request for July 20 has been submitted.”
In this scenario, the entity finds the right information, the variable remembers it, and the automation uses it to produce a smart outcome.
Best practices
Good use of variables and entities leads to accurate responses, better user experience, and reliable automation.
- Use meaningful variable names — choose clear names that describe the purpose of the value, such as LeaveDate instead of Date1.
- Reuse variables whenever possible — reusing variables keeps topics simpler and conversations consistent.
- Validate user input — confirm important values before submitting requests or triggering workflows.
- Avoid unnecessary variables — store only what you need to keep conversation logic clean and efficient.
- Use built-in entities first — leverage built-in entity types before creating custom entities.
- Test with different user phrases — validate multiple ways users may ask for the same thing.
- Clear variables when no longer needed — reset values to prevent unwanted data from affecting future conversation paths.
Better data creates better conversations.
Key takeaways
- Entities identify information — they extract key details from natural language.
- Variables store information — they hold the data collected during the conversation.
- Together they personalize conversations — agents can deliver relevant, context-aware replies.
- They improve automation accuracy — accurate data capture leads to better actions and decisions.
- They reduce repetitive questions — your agent understands and remembers information across the conversation.
- They enable enterprise workflows — values can be passed to Power Automate, Dataverse, and other systems.
The bottom line
Variables and entities are the foundation of intelligent, personalized conversations in Microsoft Copilot Studio. Entities understand the data. Variables store it the right way. Together, they help your agent deliver smarter experiences.
Understand the data. Store it the right way. Deliver great experiences.
References: Variables overview — Microsoft Copilot Studio documentation; Work with variables — Microsoft Copilot Studio documentation; Use entities and slot filling in agents — Microsoft Copilot Studio documentation.
Keywords: Microsoft Copilot Studio variables, Copilot Studio entities, variables and entities explained, entity detection, slot filling, topic variables, global variables, custom entities, Power Automate, Dataverse, conversation design, 365 Days of Copilot Studio, Power Platform, Microsoft 365.
Share this:
Frequently asked questions
What is a variable in Microsoft Copilot Studio?
A variable stores information collected during a conversation, such as a user name, selected date, department, ticket number, location, or any value your agent needs to reuse later.
What is an entity in Microsoft Copilot Studio?
An entity identifies important values from natural language input. For example, if a user says "I need leave next Monday", the Date entity can detect "next Monday".
How do variables and entities work together?
Entities find the important information in a user message, and variables store that detected value so the agent can personalize replies, call actions, trigger flows, and continue the conversation.
Learn Microsoft 365 with new tutorials every week
Subscribe on YouTube and follow on LinkedIn for hands-on Power Platform, SharePoint, Copilot Studio, and Microsoft 365 guides.
Related articles
- Mastering Knowledge Sources in Microsoft Copilot Studio (Day 11)Day 11 of the 365 Days of Microsoft Copilot Studio series explains knowledge sources: what they are, the supported sources, how knowledge works, choosing the right source, best practices, common mistakes, a real-world HR example, and key takeaways.
- Understanding Topics in Microsoft Copilot Studio: The Foundation of Every Conversation (Day 10)Day 10 of the 365 Days of Microsoft Copilot Studio series explains what topics are, why they matter, how they process a conversation, system and custom topics, common node types, best practices, and mistakes to avoid.
- Core Components of Microsoft Copilot Studio — The Building Blocks of Every AI Agent (Day 9)Week 2 of the 365 Days series: meet the core components that power every Copilot Studio agent — Topics, Knowledge, Generative AI, Actions, Variables and Entities — plus the production-ready areas like Instructions, Tools, Evaluation, Analytics, Channels and Test Canvas.