AI Agent + Dynamics 365: getting lead data into the agent, and creating a Case from a call

EVCX

Premier Customer
Advanced Certified
Joined
Sep 19, 2024
Messages
2
Reaction score
1
We run an AI Customer Service Agent for first-level technical support and we are trying to close the loop with our CRM.

Our setup:
3CX V20 Update 10 Alpha, build 20.0.10.1621, with an AI Customer Service Agent running on OpenAI gpt-realtime-2.1. Microsoft Dynamics 365 is connected through a custom CRM template, our own copy, renamed so the shipped template is never overwritten.


What already works:
our CRM template resolves the caller and walks two relationships in a single lookup, from the lead to the sales order to the product. On every call the contact card now shows the project number, the installation address, the project status, the battery storage model and the module type. That part is solid. The problem is that all of this is visible to a human who picks up the call, and to nobody else.


Question 1. Can any of that reach the agent?
We went through the agent's "Insert variable" list. There are 23 variables, and the only ones that describe the caller are other_party_name, other_party_phone, call_screening, is_internal and is_boss. None of them carries a CRM output field. Is there a supported way to pass additional CRM values into the agent prompt or context that we have missed?

Question 2. Can an AI Agent call a custom tool or API?
We checked the agent configuration across all six tabs, the knowledge sources and the Realtime API configuration. We could not find anywhere to register a function, a webhook or an external endpoint. The "Add MCP Client" button on the AI Agents page turns out to be the other direction: it hands out the PBX's own MCP server URL for an external AI platform to connect to. Is that correct, or is there a route we did not find?

Question 3. MCP for AI Agents.
In an earlier thread a 3CX staff member wrote that MCP integration for AI Agents was being actively worked on, with no ETA at the time. Is there anything new to share? This is the single feature that would solve our case cleanly.

Question 4. Creating a Case in Dynamics from a call.
Our CRM template already posts a phonecall activity at call end, including transcript, summary and sentiment. We would like to create a Case as well, but only for calls that actually need one, not one per call.
The template does not seem to expose any outcome of the call. There is CallType and there are the journaling texts, but nothing that says resolved, transferred or escalated. Without that we cannot narrow down case creation inside the template itself.
Is adding a scenario that posts to the incidents endpoint a supported approach, and is there any way to condition it on the call outcome? Or is the recommended path to do this outside 3CX, reading the transcript and summary through the API after the call and creating the case from there?


Any pointers appreciated.
 
Wait for the MCP client in 3CX. Otherwise there's no way currently other than custom CRM integration. We do have one for Dynamics that handles cases.
 
  • Like
Reactions: NikosT_3CX
Thanks, that is very helpful - and good to have it confirmed that the read direction has to wait for the MCP client.

The custom CRM integration is the part I would like to hear more about, because that is exactly where we got stuck.

Am I right that you added a scenario to the Dynamics template that posts to the incidents endpoint at call end, next to the existing phonecall activity?

The question we could not answer is how you decide which calls get a case. We do not want one per call, only the ones that actually need follow-up. As far as we can tell the template does not expose any outcome of the conversation - there is CallType and the journaling texts, but nothing that says resolved, transferred or escalated. Did you find a signal we missed, or do you create a case for every matched caller and filter afterwards in Dynamics?

And what do you put in the case - summary only, or the full transcript as well?

In case it is useful in return: the CRM template does handle nested expands. We walk lead -> sales order -> product in a single lookup and read the product name three levels deep with a dotted Path, which saved us a chained scenario. Navigation property names are case sensitive and differ from the column name, they can be pulled from the ManyToOneRelationships metadata.
 
  • Like
Reactions: Evolute IT
Thanks, that is very helpful - and good to have it confirmed that the read direction has to wait for the MCP client.

The custom CRM integration is the part I would like to hear more about, because that is exactly where we got stuck.

Am I right that you added a scenario to the Dynamics template that posts to the incidents endpoint at call end, next to the existing phonecall activity?

The question we could not answer is how you decide which calls get a case. We do not want one per call, only the ones that actually need follow-up. As far as we can tell the template does not expose any outcome of the conversation - there is CallType and the journaling texts, but nothing that says resolved, transferred or escalated. Did you find a signal we missed, or do you create a case for every matched caller and filter afterwards in Dynamics?

And what do you put in the case - summary only, or the full transcript as well?

In case it is useful in return: the CRM template does handle nested expands. We walk lead -> sales order -> product in a single lookup and read the product name three levels deep with a dotted Path, which saved us a chained scenario. Navigation property names are case sensitive and differ from the column name, they can be pulled from the ManyToOneRelationships metadata.
Currently, our custom integration can create cases for calls that went through specific queues. We can also map those queues to groups in Dynamics for case assignment. As for the nested expands, it is custom so we can add anything to it.

FYI, our custom integration uses a proxy, not just a template. You could never do all this in the template only.
 

Forum statistics

Threads
112,116
Messages
590,840
Members
165,113
Latest member
CXForumUser