Dynamics 365 Telephony Integration for Developers (Part 1): Architecture & Setup
This is Part 1 of a developer series on setting up end-to-end telephony integration with Dynamics 365. If you're a developer tasked with connecting a phone system to Dynamics 365, the ecosystem can look confusing at first: there's the Channel Integration Framework, channel providers, widgets, iframes, and a handful of JavaScript APIs. This post walks through the core architecture in plain language, so you understand the "why" before you write a single line of code.
The Big Picture: How It All Fits Together
Dynamics 365's model-driven app runs inside something called the Unified Interface. Microsoft built a framework specifically for embedding third-party communication tools into that interface called the Channel Integration Framework, usually shortened to CIF (currently on version 2, or CIF v2). Instead of Microsoft trying to natively support every phone system in the world, they created a plug-in style architecture: your telephony provider, or you as the developer, builds a small web application called a "widget," and CIF v2 embeds that widget as a panel inside Dynamics 365, similar to a dialer pad docked in the corner of the screen.
That widget talks to Dynamics 365 using a JavaScript library Microsoft provides, and it talks to your actual phone system using whatever SDK or API that provider exposes, such as Twilio, RingCentral, a SIP softphone, or your own custom voice backend. CIF v2 acts as the translator in the middle, letting the widget request things like opening a contact's record or logging a call, without needing direct access to the CRM database.
Core Building Blocks You'll Work With
Before setup, it helps to know the vocabulary. A Channel Provider is a configuration record inside Dynamics 365 that tells the platform where your widget lives (its URL) and how it should be displayed. The widget is your custom web page, hosted on your own server or cloud service, that renders the dialer UI and contains your integration logic. The CIF API (delivered through a JavaScript file called CIFramework.js) is the bridge your widget uses to communicate with the CRM, working through the browser's postMessage mechanism since your widget runs inside an iframe. Finally, your telephony backend is whatever system actually places and receives calls, which is completely separate from Microsoft and is something you either build or subscribe to.
Prerequisites
You'll need a Dynamics 365 Customer Service (or similar) environment where you have system administrator access, since registering a channel provider requires elevated permissions. You'll also need somewhere to host your widget, since it must be served over HTTPS. Finally, you need credentials or an SDK from whichever telephony provider you're integrating, since CIF v2 has no built-in calling capability of its own; it only provides the docking and communication layer.
Registering a Channel Provider
This is done inside the Customer Service admin center (or the Contact Center admin area, depending on your Dynamics 365 setup). You create a new channel provider record and supply a name, a label that agents will see, and the URL of your widget. You can also configure the panel's width and whether it should load automatically when an agent opens the app. Once saved and published, Dynamics 365 will render your widget inside an iframe docked to the interface whenever an agent using that app profile logs in.
What's Next
Now that you understand the architecture and have a channel provider registered, Part 2 of this series covers building the actual widget: initializing the CIF connection, and structuring your code so it's ready to handle real events from Dynamics 365.