> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Dynamics 365 Sales

**Authentication:** OAuth or access token. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* List every account in the `Enterprise` segment with no activity in the last 30 days.
* Update the close date on every open opportunity in my pipeline that's past its expected close.
* Pull the win/loss breakdown for opportunities that closed last quarter.

## Available Tools

#### create\_account

Create a new account (company/organization) in Dynamics 365. Accounts represent businesses or organizations you work with.

#### get\_account

Retrieve a Dynamics 365 account by ID. Returns full account details including company info, contact details, and custom fields.

#### update\_account

Update an existing Dynamics 365 account. Modify company information, contact details, or custom fields.

#### delete\_account

Delete a Dynamics 365 account. This is a permanent operation - consider deactivating instead.

#### list\_accounts

List Dynamics 365 accounts with filtering, sorting, and pagination. Find accounts by name, industry, location, or custom criteria.

#### search\_accounts

Search Dynamics 365 accounts by text query. Find accounts matching name, description, or other text fields.

#### create\_appointment

Create an appointment in Dynamics 365. Schedule meetings associated with accounts, contacts, or opportunities.

#### get\_appointment

Retrieve an appointment by ID from Dynamics 365.

#### update\_appointment

Update an appointment in Dynamics 365. Reschedule, change location, or mark as completed.

#### delete\_appointment

Delete an appointment from Dynamics 365.

#### list\_appointments

List appointments in Dynamics 365 with filtering by date range, status, or related records.

#### create\_case

Create a new case (incident) in Dynamics 365. Cases track customer service issues, support requests, and inquiries.

#### get\_case

Retrieve a Dynamics 365 case by ID. Returns case details including priority, status, customer, and SLA information.

#### update\_case

Update an existing Dynamics 365 case. Modify priority, status, description, or resolve the case.

#### delete\_case

Delete a Dynamics 365 case. Consider resolving or canceling instead to preserve service history.

#### list\_cases

List Dynamics 365 cases with filtering. Find cases by status, priority, customer, or SLA dates.

#### search\_cases

Search Dynamics 365 cases by text query. Find cases matching title or description.

#### create\_contact

Create a new contact in Dynamics 365. Contacts represent individual people you work with, often associated with accounts.

#### get\_contact

Retrieve a Dynamics 365 contact by ID. Returns full contact details including personal info, contact methods, and relationships.

#### update\_contact

Update an existing Dynamics 365 contact. Modify personal information, contact methods, or preferences.

#### delete\_contact

Delete a Dynamics 365 contact. This is a permanent operation.

#### list\_contacts

List Dynamics 365 contacts with filtering, sorting, and pagination. Find contacts by account, name, email, or custom criteria.

#### search\_contacts

Search Dynamics 365 contacts by text query. Find contacts matching name, email, or other text fields.

#### discover\_entity\_metadata

Discover available fields and their properties for a Dynamics 365 entity. Essential for understanding what fields can be used in create, update, and filter operations.

#### list\_entities

List all available entities in the Dynamics 365 organization. Useful for discovering what data types are available.

#### create\_email

Create an email activity in Dynamics 365. Track sent or received emails associated with CRM records.

#### get\_email

Retrieve an email activity by ID from Dynamics 365.

#### update\_email

Update an email activity in Dynamics 365. Modify subject, content, or mark as completed.

#### delete\_email

Delete an email activity from Dynamics 365.

#### list\_emails

List email activities in Dynamics 365 with filtering by date, status, or related records.

#### create\_lead

Create a new lead in Dynamics 365. Requires subject (topic) and lastname. If no contact name provided, lastname defaults to 'Contact'. Use list\_leads to verify creation.

#### get\_lead

Retrieve a Dynamics 365 lead by ID or name. Accepts GUID or subject/company name. Use search\_leads if multiple matches expected.

#### update\_lead

Update an existing Dynamics 365 lead. Modify contact information, qualification status, or estimated value.

#### delete\_lead

Delete a Dynamics 365 lead. Consider qualifying the lead instead to preserve data.

#### list\_leads

List Dynamics 365 leads with filtering, sorting, and pagination. Find leads by status, rating, source, or custom criteria.

#### search\_leads

Search Dynamics 365 leads by text query. Find leads matching name, company, or subject.

#### qualify\_lead

Qualify (convert) a Dynamics 365 lead to Account, Contact, and/or Opportunity. This is the standard way to advance a lead in the sales process.

#### create\_note

Create a new note (annotation) in Dynamics 365. Notes can include text content and file attachments, attached to any record.

#### get\_note

Retrieve a Dynamics 365 note by ID. Returns note content including text and attachment metadata.

#### update\_note

Update an existing Dynamics 365 note. Modify the text content, subject, or attachment.

#### delete\_note

Delete a Dynamics 365 note. This is a permanent operation.

#### list\_notes

List Dynamics 365 notes with filtering. Find notes by parent record, date, or content.

#### create\_opportunity

Create a new opportunity in Dynamics 365. Opportunities represent potential sales deals in your pipeline.

#### get\_opportunity

Retrieve a Dynamics 365 opportunity by ID. Returns full deal details including value, probability, and stage.

#### update\_opportunity

Update an existing Dynamics 365 opportunity. Modify deal value, probability, stage, or other fields.

#### delete\_opportunity

Delete a Dynamics 365 opportunity. Consider closing as won/lost instead to preserve history.

#### list\_opportunities

List Dynamics 365 opportunities with filtering, sorting, and pagination. Find deals by stage, value, customer, or custom criteria.

#### search\_opportunities

Search Dynamics 365 opportunities by text query. Find deals matching name or description.

#### win\_opportunity

Close a Dynamics 365 opportunity as Won. Records the successful deal closure with revenue and date.

#### lose\_opportunity

Close a Dynamics 365 opportunity as Lost. Records the unsuccessful deal closure with reason.

#### get\_owner

Retrieve a Dynamics 365 system user (owner) by ID. Get user details for record assignment or team management.

#### list\_owners

List Dynamics 365 system users (owners) with filtering. Find users for record assignment or team management.

#### create\_phonecall

Create a phone call activity in Dynamics 365. Log incoming or outgoing calls with notes and duration.

#### get\_phonecall

Retrieve a phone call activity by ID from Dynamics 365.

#### update\_phonecall

Update a phone call activity in Dynamics 365. Add notes, mark as completed, or update details.

#### delete\_phonecall

Delete a phone call activity from Dynamics 365.

#### list\_phonecalls

List phone call activities in Dynamics 365 with filtering by date, status, or related records.

#### create\_task

Create a new task in Dynamics 365. Tasks are activities for tracking follow-up work related to accounts, contacts, leads, opportunities, or cases.

#### get\_task

Retrieve a Dynamics 365 task by ID. Returns task details including subject, due date, priority, and related records.

#### update\_task

Update an existing Dynamics 365 task. Modify subject, due date, priority, completion status, or other fields.

#### delete\_task

Delete a Dynamics 365 task. Consider completing or canceling instead to preserve history.

#### list\_tasks

List Dynamics 365 tasks with filtering. Find tasks by status, priority, due date, or related records.

#### search\_tasks

Search Dynamics 365 tasks by text query. Find tasks matching subject or description.