Microsoft Dynamics 365
Create Dynamics 365 Task for Contact
Creates a follow-up task regarding 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
Create a follow-up task linked to an existing Dynamics 365 contact, such as a call-back the customer has asked for. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email. Confirm the subject with the customer. Returns the new task.
Request
POSThttps://YOUR_ORG.crm.dynamics.com/api/data/v9.2/tasks?$select=activityid,subject
Headers
AuthorizationBearer {{accessToken}}OData-MaxVersion4.0OData-Version4.0Acceptapplication/jsonContent-Typeapplication/json; charset=utf-8Preferreturn=representation
Body
{
"subject": "{{subject}}",
"description": "{{description}}",
"regardingobjectid_contact_task@odata.bind": "/contacts({{contactId}})"
}Parameters
contactId stringThe contactid GUID, from Find Dynamics 365 Contact by Email.subject stringA short name for the task.description stringExtra detail for the person who will do the task.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": "1c50f3aa-b26c-4bb0-8210-8168306ce6ed",
"type": "HTTP_REQUEST",
"label": "Create Dynamics 365 Task for Contact",
"name": "create_dynamics_365_task_for_contact",
"customName": false,
"description": "Create a follow-up task linked to an existing Dynamics 365 contact, such as a call-back the customer has asked for. Get an access token first if you do not have one. Find the contactid first with Find Dynamics 365 Contact by Email. Confirm the subject with the customer. Returns the new task.",
"parameters": [
{
"name": "contactId",
"type": "string",
"description": "The contactid GUID, from Find Dynamics 365 Contact by Email."
},
{
"name": "subject",
"type": "string",
"description": "A short name for the task."
},
{
"name": "description",
"type": "string",
"description": "Extra detail for the person who will do the task."
},
{
"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/tasks?$select=activityid,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\": \"{{subject}}\",\n \"description\": \"{{description}}\",\n \"regardingobjectid_contact_task@odata.bind\": \"/contacts({{contactId}})\"\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.