> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamics 365

> Dynamics 365 helps manage sales, service, and operations records via your connected account.

Use Dynamics 365 when you need to create, find, or update CRM records in your workflow. It also works for tasks, notes, and case resolution.

## Configuration

| Option | Required | Description |
| - | - | - |
| Name | No | Label for the step in the workflow canvas. |
| Authentication | Yes | The connected Dynamics 365 account to use for this step. |
| Action | Yes | The Dynamics 365 action to perform (for example Get Caller Identity, Create Account, Query Accounts, Create Contact). |
| Arguments | Yes | Per-action form fields generated from the action's schema. Each text field has an **Insert Variable** button for injecting `{{placeholder}}` values. A **Raw JSON** tab is available for advanced usage. |
| When the step fails | No | Controls whether the workflow should **Terminate Workflow** or **Continue** if this step fails. |

Before you configure this step, connect Dynamics 365 in **Integrations** for your workspace using the sign-in flow. If no active connection is available, the step shows a warning with a link to **Integrations** instead of the account selector.

## Arguments form

When you select an action, the **Arguments** section renders a form driven by the action's input schema. Fields that refer to existing records include dropdown pickers.

Switch to the **Raw JSON** tab when you prefer to write the full arguments object by hand. Changes in either tab stay in sync.

## Common actions

| Action | Description |
| - | - |
| **Get Caller Identity** | Return the connected Dataverse caller's identity IDs. |
| **Create Account** | Create a new account record in Dynamics CRM. |
| **Query Accounts** | List or filter Dynamics accounts with selected fields. |
| **Create Contact** | Create a new contact record in Dynamics CRM. |
| **Query Contacts** | List or filter Dynamics contacts with selected fields. |
| **Create Lead** | Create a new lead record in Dynamics CRM. |
| **Get Lead** | Retrieve a lead by its ID. |
| **Update Lead** | Update an existing lead record in Dynamics CRM. |
| **Create Opportunity** | Create a new opportunity record in Dynamics CRM. |
| **Update Opportunity** | Update an existing opportunity record in Dynamics CRM. |
| **Create Case** | Create a new case record in Dynamics CRM. |
| **Update Case** | Update an existing case record in Dynamics CRM. |
| **Resolve Case** | Resolve an active case by creating its resolution activity. |
| **Create Invoice** | Create a new invoice record in Dynamics CRM. |
| **Get Invoice** | Retrieve an invoice by its ID. |

Destructive actions, such as deleting records, are not available in the workflow action picker.

## Output

This step stores the Dynamics 365 response as the step output. The shape of the response depends on the action.

Use the full output reference in later steps:

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

## Example

1. Open **Integrations** and connect Dynamics 365 if you have not already done that.
2. Add a **Dynamics 365** step to your workflow.
3. Select a connected account in **Authentication**.
4. Choose **Get Caller Identity** in **Action**.
5. Fill in the required fields. Use **Insert Variable** to reference an earlier step's output for any field value.
6. Click **Run** in the step header to test the action, then review the returned payload in **Output**.

## Use cases

### Add a new sales lead

1. Create Lead
2. Get Lead
3. Update Lead

### Log support work

1. Create Case
2. Create Task
3. Resolve Case

### Track customer billing

1. Create Invoice
2. Get Invoice
3. Update Invoice

## Notes

* This step depends on a connected Dynamics 365 integration in your workspace.
* The workflow action picker shows a curated set of actions. Agents with the Dynamics 365 tool can use more of them.
* The sign-in screen may show third-party authorization branding.

## Using Dynamics 365 as an Agent Tool

You can also add Dynamics 365 as a tool in the **Agent Editor**. Open the agent, click **Add tool**, and select **Dynamics 365**. In the tool settings panel, choose the connected account the agent should use. The agent calls Dynamics 365 actions when they are relevant to the conversation.

See also: [Integrations](https://docs.fetchhive.com/workspace/integrations.md), [Creating and Editing](https://docs.fetchhive.com/workflows/creating-and-editing.md), and [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.