Skip to content
TriedDocs
Integrations

Microsoft Dynamics 365

Create Dynamics 365 contacts with a call note from Tried calls, and let agents create contacts during the conversation.

Dynamics 365 (Dataverse) supports CRM sync and an integration app with a create_contact action.

Connect#

OAuth Needs keys#

Press Connect on the Dynamics 365 card. The dashboard asks for your organisation URL, for example https://contoso.crm.dynamics.com, then sends you to the Microsoft identity platform. Tried requests <organisation URL>/user_impersonation offline_access with PKCE.

  • The deployment needs DYNAMICS365_OAUTH_CLIENT_ID and DYNAMICS365_OAUTH_CLIENT_SECRET from a Microsoft Entra app registration with the redirect URI https://api.tried.com.au/oauth/callback.
  • The tenant defaults to organizations. Pass options.tenant to /oauth/start to sign in to one tenant.

Access token#

Credential Required Description
instance_url Yes Organisation URL
access_token Yes A Dataverse access token

POST /test-crm-auth/dynamics365 calls WhoAmI to check the token.

Contact sync#

Each push uses the Dataverse Web API (/api/data/v9.2):

  1. POST /contacts creates a contact.
  2. POST /annotations creates a note linked to the contact, with subject the note title and notetext the body.
Dynamics field Value
lastname Contact last name, else first name, else phone number
firstname Contact first name
emailaddress1 Contact email
telephone1 Contact phone number
Mapped fields From field_mapping
Warning

Each push creates a new contact; there is no lookup by phone first. Use Dynamics duplicate detection, or push selected contacts with a contact sync job.

Default fields shown in mock mode: firstname, lastname, emailaddress1, telephone1, description. With credentials, GET /get-crm-schema/dynamics365 reads the contact entity's attributes.

Agent functions#

Action Arguments Output
dynamics365.create_contact phone (required), first_name, last_name, email {"contact": {"id": "<contactid>"}}

Mock mode#

Without credentials, operations are recorded and return ids like mock_dynamics365_5c1a7e3b9d2f.