Microsoft Dynamics 365
Update Dynamics 365 Contact Phone
Changes the phone number on a Dynamics 365 contact.
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
Update the phone number on an existing Dynamics 365 contact. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email, and read the new number back to the customer to confirm it. A successful update returns no content.
Request
PATCHhttps://YOUR_ORG.crm.dynamics.com/api/data/v9.2/contacts({{contactId}})
Headers
AuthorizationBearer {{accessToken}}OData-MaxVersion4.0OData-Version4.0Acceptapplication/jsonContent-Typeapplication/json; charset=utf-8If-Match*
Body
{
"telephone1": "{{phone}}"
}Parameters
contactId stringThe contactid GUID, from Find Dynamics 365 Contact by Email.phone stringThe new phone number in international format.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": "ba157cbd-2466-4373-b0fd-4983ae1b8895",
"type": "HTTP_REQUEST",
"label": "Update Dynamics 365 Contact Phone",
"name": "update_dynamics_365_contact_phone",
"customName": false,
"description": "Update the phone number on an existing Dynamics 365 contact. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email, and read the new number back to the customer to confirm it. A successful update returns no content.",
"parameters": [
{
"name": "contactId",
"type": "string",
"description": "The contactid GUID, from Find Dynamics 365 Contact by Email."
},
{
"name": "phone",
"type": "string",
"description": "The new phone number in international format."
},
{
"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": "PATCH",
"url": "https://YOUR_ORG.crm.dynamics.com/api/data/v9.2/contacts({{contactId}})"
},
"headers": [
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
},
{
"name": "OData-MaxVersion",
"value": "4.0"
},
{
"name": "OData-Version",
"value": "4.0"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json; charset=utf-8"
},
{
"name": "If-Match",
"value": "*"
}
],
"body": "{\n \"telephone1\": \"{{phone}}\"\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.