Microsoft Dynamics 365

Find Dynamics 365 Contact by Email

Looks up a contact in Dynamics 365 by email address.

Unverified

Add this first. This tool needs an access token, so add Get Dynamics 365 Access Token to the same bot. The bot calls it first and passes the token in.

What the model is told

Look up a contact in Dynamics 365 by the exact email address the customer gives you. Get an access token first if you do not have one. Returns the matching contact with its contactid, name, email and phone number. The contactid is needed by other Dynamics 365 tools. If the list is empty, no contact has that email.

Request

GEThttps://YOUR_ORG.crm.dynamics.com/api/data/v9.2/contacts?$select=contactid,fullname,emailaddress1,telephone1&$filter=emailaddress1%20eq%20'{{email}}'&$top=1

Headers

  • AuthorizationBearer {{accessToken}}
  • OData-MaxVersion4.0
  • OData-Version4.0
  • Acceptapplication/json

Parameters

  • email stringThe customer's full email address.
  • accessToken stringThe access_token value returned by Get Dynamics 365 Access Token. Reuse it for the rest of the conversation.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "007b53cc-a0c9-4ae8-a0de-1ee9e2971cae",
    "type": "HTTP_REQUEST",
    "label": "Find Dynamics 365 Contact by Email",
    "name": "find_dynamics_365_contact_by_email",
    "customName": false,
    "description": "Look up a contact in Dynamics 365 by the exact email address the customer gives you. Get an access token first if you do not have one. Returns the matching contact with its contactid, name, email and phone number. The contactid is needed by other Dynamics 365 tools. If the list is empty, no contact has that email.",
    "parameters": [
      {
        "name": "email",
        "type": "string",
        "description": "The customer's full email address."
      },
      {
        "name": "accessToken",
        "type": "string",
        "description": "The access_token value returned by Get Dynamics 365 Access Token. Reuse it for the rest of the conversation."
      }
    ],
    "config": {
      "endpoint": {
        "method": "GET",
        "url": "https://YOUR_ORG.crm.dynamics.com/api/data/v9.2/contacts?$select=contactid,fullname,emailaddress1,telephone1&$filter=emailaddress1%20eq%20'{{email}}'&$top=1"
      },
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        },
        {
          "name": "OData-MaxVersion",
          "value": "4.0"
        },
        {
          "name": "OData-Version",
          "value": "4.0"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "body": null,
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.