Microsoft Dynamics 365
Add Dynamics 365 Note to Contact
Adds a note to a contact in Dynamics 365.
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
Add a note to an existing Dynamics 365 contact, for example a summary of the conversation. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email. Keep the note factual and brief. Returns the saved note.
Request
POSThttps://YOUR_ORG.crm.dynamics.com/api/data/v9.2/annotations?$select=annotationid,subject
Headers
AuthorizationBearer {{accessToken}}OData-MaxVersion4.0OData-Version4.0Acceptapplication/jsonContent-Typeapplication/json; charset=utf-8Preferreturn=representation
Body
{
"subject": "{{title}}",
"notetext": "{{text}}",
"objectid_contact@odata.bind": "/contacts({{contactId}})"
}Parameters
contactId stringThe contactid GUID, from Find Dynamics 365 Contact by Email.title stringA short title for the note.text stringThe text of the note.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": "96865075-0be6-4772-9f7c-8f3a7a3abde7",
"type": "HTTP_REQUEST",
"label": "Add Dynamics 365 Note to Contact",
"name": "add_dynamics_365_note_to_contact",
"customName": false,
"description": "Add a note to an existing Dynamics 365 contact, for example a summary of the conversation. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email. Keep the note factual and brief. Returns the saved note.",
"parameters": [
{
"name": "contactId",
"type": "string",
"description": "The contactid GUID, from Find Dynamics 365 Contact by Email."
},
{
"name": "title",
"type": "string",
"description": "A short title for the note."
},
{
"name": "text",
"type": "string",
"description": "The text of the note."
},
{
"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": "POST",
"url": "https://YOUR_ORG.crm.dynamics.com/api/data/v9.2/annotations?$select=annotationid,subject"
},
"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": "Prefer",
"value": "return=representation"
}
],
"body": "{\n \"subject\": \"{{title}}\",\n \"notetext\": \"{{text}}\",\n \"objectid_contact@odata.bind\": \"/contacts({{contactId}})\"\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.