TheVoĉoTheVoĉo

Dynamics 365 Integration

Connect Cloud-PBX with Microsoft Dynamics 365 for enterprise-grade telephony integration across Sales, Customer Service, Field Service, and custom entities.

Overview

Microsoft Dynamics 365 is an enterprise CRM and ERP platform deeply integrated with Microsoft 365 ecosystem. The Cloud-PBX integration brings comprehensive telephony features to Dynamics 365, enabling seamless communication with complete business context.

Key Features:

  • Screen pop with accounts, contacts, leads, opportunities, and cases
  • Automatic call logging to timeline (phone call activities)
  • Click-to-call from any Dynamics entity
  • Native Dynamics interface integration
  • Call recording embedded in activities
  • Integration with Power Automate (Flow)
  • Power BI call analytics
  • Support for custom entities and apps

Benefits:

  • Unified Microsoft ecosystem (Teams, Office, Dynamics)
  • Enterprise security and compliance
  • Advanced automation with Power Platform
  • Comprehensive business intelligence
  • Industry-specific solutions (Sales, Service, Field Service)

Features

Screen Pop

Incoming calls automatically display Dynamics 365 records:

Search Entities:

  1. Contacts: Customer contact records
  2. Accounts: Company/organization records
  3. Leads: Potential customers
  4. Opportunities: Sales deals
  5. Cases: Customer service cases
  6. Custom Entities: Industry-specific records

Unified Interface Screen Pop:

Incoming Call: +1-206-555-0123

Dynamics 365 Search: All entities by phone

Match Found: Jessica Martinez (Contact)

Information Panel Displays:
──────────────────────────────────────────
Contact: Jessica Martinez
Job Title: Chief Information Officer
Account: Contoso Manufacturing
Phone: +1-206-555-0123 (Business Phone)
Email: [email protected]
Owner: Alex Rivera

Business Card:
  - Company: Contoso Manufacturing
  - Industry: Manufacturing
  - Annual Revenue: $125M
  - Relationship: Customer (since 2019)
  - Account Manager: Alex Rivera
  - Support Tier: Premium

Timeline:
  - Email: Contract renewal discussion (2 days ago)
  - Appointment: Quarterly business review (last week)
  - Phone Call: Technical support (2 weeks ago, 18m)
  - Opportunity: System Upgrade ($250K) - Develop stage

Open Opportunities:
  - Cloud Migration Project ($250,000) - Develop (60%)
  - Additional Licenses ($45,000) - Qualify (40%)

Active Cases:
  - CASE-12489: API Integration Assistance (High Priority)
  - CASE-12501: Feature Request (Normal Priority)

Health Score: 82/100 (Healthy)
Contract: Expires in 90 days
Lifetime Value: $1.2M
──────────────────────────────────────────

App Side Pane: Screen pop appears in Dynamics side panel without navigating away from current work.


Automatic Call Logging

Every call creates a Phone Call Activity in Dynamics 365:

Phone Call Activity Fields:

  • Subject: Call with [Contact/Lead Name]
  • Direction: Incoming or Outgoing
  • Call Date: Date and time with timezone
  • Duration: Call length in minutes
  • Status: Open, Made, Received, Cancelled
  • Regarding: Related record (Account, Opportunity, Case)
  • Owner: Dynamics user who handled call
  • Priority: Normal, High, Urgent
  • Category: Custom categorization
  • Subcategory: Custom subcategorization
  • Description: Call notes and summary
  • Custom Fields: Call outcome, recording URL, quality score

Timeline Activity:

📞 Phone Call
Subject: Call with Jessica Martinez - Contract Renewal Discussion
Direction: Outgoing
Date: Today at 11:30 AM
Duration: 22 minutes
Status: Made
Owner: Alex Rivera
Priority: High
Call Outcome: Follow-up Required

Description:
Discussed upcoming contract renewal and cloud migration project.

Key Discussion Points:
- Contract renewal: Jessica confirmed budget approved
- Timeline: Decision expected by end of Q4
- Cloud migration: Technical concerns about downtime
- Integration: Needs seamless integration with SAP ERP
- Security: Requires SOC 2 compliance documentation

Customer Sentiment: Positive but cautious
Decision Makers: Jessica (CIO) + CFO approval needed
Competition: Evaluating two other vendors
Price Sensitivity: Medium (value-focused)

Action Items:
- Send SOC 2 documentation (today)
- Schedule technical workshop on zero-downtime migration
- Prepare proposal with 3-year pricing options
- Coordinate with SAP integration team

Recording: [Play Recording] (22m 15s)

Regarding: Contoso Manufacturing (Account)
Related:
  - Opportunity: Cloud Migration Project ($250,000)
  - Contact: Jessica Martinez (CIO)
  - Task Created: Send compliance documentation (due: today)
  - Task Created: Schedule technical workshop (due: +3 days)

Click-to-Call

Call from Any Dynamics Entity:

EntityClick-to-Call Location
ContactsBusiness Phone, Mobile Phone, Home Phone
AccountsMain Phone, Other Phone
LeadsBusiness Phone, Mobile Phone
OpportunitiesContact's phone (related contact)
CasesCustomer's phone (case contact)
Custom EntitiesAny phone field
ActivitiesPhone call activity record
QueuesCall customer from queue item

Dynamics Command Bar: Cloud-PBX adds call button to Dynamics command bar for quick dialing.

Call Flow:

  1. Click phone icon in Dynamics record
  2. Cloud-PBX desktop client activates
  3. Call initiates on selected device (desk phone, softphone, mobile)
  4. Call status displayed in Dynamics
  5. During call: Update record, add notes in real-time
  6. End call: Phone Call activity auto-created

Power Automate Integration

Automate Business Processes from Calls:

Example Flow 1: High-Value Opportunity Alert:

Trigger: Phone Call Activity is created
Conditions:
  - Regarding = Opportunity
  - Opportunity Estimated Revenue > $100,000
  - Call Direction = Incoming
  - Call Duration > 5 minutes

Actions:
  - Send Teams message to Sales Director
    "High-value opportunity call: [Opportunity Name] - [Contact]"
  - Update Opportunity:
    - Priority = High
    - Estimated Close Date = +30 days
  - Create Task: "Send proposal" (due: +2 days)
  - Add to Campaign: High-Value Follow-up Sequence
  - Post to Yammer: Sales team updates

Example Flow 2: Case Escalation:

Trigger: Phone Call Activity is created
Conditions:
  - Regarding = Case
  - Case Priority = High or Urgent
  - Call Outcome contains "Unresolved" or "Escalate"
  - Call Duration > 10 minutes (extended support call)

Actions:
  - Update Case:
    - Escalate to: Tier 2 Support
    - Status Reason: Escalated
    - Priority: Urgent (if not already)
  - Assign Case: Senior Support Team (queue)
  - Send Email: Escalation notification to case team lead
  - Create Phone Call Activity: "Follow-up call" (schedule: +1 hour)
  - Update Service Level: Reset SLA clock for escalation

Example Flow 3: Lead Qualification:

Trigger: Phone Call Activity is created
Conditions:
  - Regarding = Lead
  - Call Direction = Outgoing
  - Call Duration > 3 minutes
  - Call Outcome = "Qualified"

Actions:
  - Qualify Lead: Create Account, Contact, Opportunity
  - Update Opportunity:
    - Sales Stage: Qualify
    - Estimated Revenue: [From lead scoring]
    - Estimated Close Date: +90 days
    - Owner: [Original lead owner]
  - Create Task: "Send welcome email" (due: today)
  - Add Contact to Marketing List: "New Opportunities"
  - Send internal email: Notify sales manager of qualification

Power BI Call Analytics

Call Intelligence Dashboards:

Sales Call Performance Dashboard:

Power BI → Import Data from Dynamics 365

Data Sources:
  - Phone Call Activities
  - Opportunities
  - Accounts
  - Users (Sales Team)

Metrics:
  - Total Calls (by direction, by owner)
  - Average Call Duration
  - Calls per Opportunity Stage
  - Conversion Rate (calls → closed-won)
  - Response Time (inbound call pickup)
  - Call Volume Trends
  - Call Outcome Distribution

Visualizations:
  - Call Volume Trend (line chart)
  - Calls by Owner (bar chart)
  - Call Outcome Funnel
  - Average Duration by Stage (column chart)
  - Heat Map: Call activity by day/hour
  - KPI Cards: Total calls, avg duration, connect rate

Filters:
  - Date Range (this quarter, last 30 days, etc.)
  - Owner (sales rep selection)
  - Business Unit
  - Call Outcome

Customer Service Call Dashboard:

Data Sources:
  - Phone Call Activities
  - Cases
  - Service Level Agreements
  - Queue Items

Metrics:
  - Average Handle Time (AHT)
  - First Call Resolution Rate
  - Abandoned Call Rate
  - Service Level Met (%)
  - Calls by Case Priority
  - Agent Availability and Utilization

Insights:
  - Peak call times (staffing optimization)
  - Common call issues (knowledge base gaps)
  - Resolution time by case category
  - Agent performance comparison

Setup Guide

Prerequisites

Requirements:

  • Dynamics 365 (Sales, Customer Service, or Customer Engagement)
  • System Administrator or System Customizer role
  • Cloud-PBX Enterprise plan
  • Azure AD admin access (for OAuth)
  • Dynamics 365 Plan 1 license minimum

Check Dynamics 365 Version:

Settings → About
Version: Dynamics 365 Online (or on-premises with IFD)

Required Dynamics Features:

  • Activities (Phone Call entity) enabled
  • Custom fields permission
  • Web API access enabled
  • Azure AD authentication

Verify API Access:

Advanced Settings → Customizations → Developer Resources
→ Service Root URL
→ Web API Endpoint
Should be accessible

Register Application in Azure AD

Create App Registration:

  1. Sign in to Azure Portal
  2. Navigate to Azure Active DirectoryApp Registrations
  3. Click New Registration
  4. Configure application:
    • Name: Cloud-PBX for Dynamics 365
    • Supported account types: Single tenant
    • Redirect URI: https://admin.voco.us/auth/dynamics365/callback
  5. Click Register
  6. Note Application Details:
    • Application (client) ID
    • Directory (tenant) ID

Create Client Secret:

  1. Navigate to Certificates & Secrets
  2. Click New client secret
  3. Description: Cloud-PBX Integration Secret
  4. Expires: 24 months
  5. Click Add
  6. Copy secret value immediately (only shown once)

Configure API Permissions:

  1. Navigate to API Permissions
  2. Click Add a permissionDynamics CRM
  3. Select Delegated permissions:
    • user_impersonation (Access Dynamics 365 as user)
  4. Click Add permissions
  5. Click Grant admin consent for organization
  6. Verify status shows "Granted"

Configure Dynamics 365 Connection

  1. Sign in to Cloud-PBX Admin Portal
  2. Navigate to SettingsIntegrationsCRM
  3. Select Microsoft Dynamics 365
  4. Enter connection details:
    • Dynamics 365 URL: Your organization URL
      • Example: https://contoso.crm.dynamics.com
      • Or on-premises: https://crm.contoso.com
    • Azure AD Tenant ID: From app registration
    • Application (Client) ID: From app registration
    • Client Secret: The secret value you copied
  5. Click Connect to Dynamics 365
  6. Authorize in Microsoft login:
    • Sign in with Dynamics admin account
    • Review permissions
    • Click Accept
  7. Configure features:
    • ☑ Enable Screen Pop
    • ☑ Automatic Call Logging
    • ☑ Click-to-Call
    • ☑ Call Recording Links
    • ☑ Entity Sync (Contacts, Accounts, Leads)
    • ☑ Power Automate Webhooks
  8. Click Save Configuration
  9. Test Connection: Should show "Connected ✅"

Map Users

Automatic Mapping: Cloud-PBX maps by Azure AD email:

Dynamics User               Cloud-PBX User
──────────────────────────────────────────────
[email protected][email protected]
[email protected][email protected]
[email protected]    →   Not Mapped ✗ (external user)

Manual Mapping:

Settings → Integrations → Dynamics 365 → User Mapping

Cloud-PBX User          Dynamics 365 User
────────────────────────────────────────────
Alex Rivera        →    [email protected]
Maria Garcia       →    [email protected]
John Smith         →    [email protected]

Security Roles: Ensure Dynamics users have permissions:

  • Read/Write: Phone Call activities
  • Read: Contacts, Accounts, Leads
  • Read/Write: Related entities (Opportunities, Cases)

Configure Screen Pop

Settings → Integrations → Dynamics 365 → Screen Pop

Enable Screen Pop: Yes

Search Entities:
  ☑ Contacts (Priority: 1)
  ☑ Accounts (Priority: 2)
  ☑ Leads (Priority: 3)
  ☑ Opportunities (Priority: 4)
  ☑ Cases (Priority: 5)
  ☐ Custom Entities: [Select if needed]

Pop Behavior:
  Display: Side pane (Unified Interface)
  Multiple Matches: Show list for selection
  No Match: Offer to create new Lead

Phone Matching:
  ☑ Fuzzy matching (ignore formatting)
  ☑ Search all phone fields
  ☑ International format support
  Match Fields:
    - Contacts: Business Phone, Mobile Phone, Home Phone
    - Accounts: Main Phone
    - Leads: Business Phone, Mobile Phone

Test Screen Pop:

  1. Have colleague call from known Dynamics contact phone
  2. Verify Dynamics side pane opens with contact info
  3. Answer call with full context

Configure Call Logging

Phone Call Activity Settings:

Settings → Integrations → Dynamics 365 → Call Logging

Entity: Phone Call (phonecall)

Standard Fields:
  ☑ Subject (auto-generate: "Call with [Contact Name]")
  ☑ Direction Code (Incoming/Outgoing)
  ☑ Call Start Time
  ☑ Actual Duration (minutes)
  ☑ Status (Completed)
  ☑ Priority (Normal/High based on rules)
  ☑ Regarding (Account, Opportunity, Case)
  ☑ Description (call notes)

Custom Fields (create if needed):
  - Call Recording URL (cloudpbx_recordingurl)
  - Call Outcome (cloudpbx_outcome)
  - Call Quality Score (cloudpbx_qualityscore)
  - Call Direction (cloudpbx_direction)

Auto-Association Rules:
  ☑ Link to Contact (matched by phone)
  ☑ Link to Account (from contact's parent account)
  ☑ Link to Opportunity (if open opp exists for contact)
  ☑ Link to Case (if open case exists)

Post-Call Actions:
  ☑ Create follow-up task (optional)
  ☑ Trigger Power Automate Flow
  ☐ Update opportunity stage (manual)

Create Custom Fields (if needed):

Dynamics 365 → Settings → Customizations → Customize the System

Entities → Phone Call → Fields → New

Field 1:
  Display Name: Call Recording URL
  Name: cloudpbx_recordingurl
  Data Type: Single Line of Text (URL format)
  Max Length: 500

Field 2:
  Display Name: Call Outcome
  Name: cloudpbx_outcome
  Data Type: Option Set
  Options: Connected, No Answer, Voicemail, Busy, etc.

Save and Publish Customization

Test Integration

Test 1: Inbound Call with Screen Pop:

  1. Call from known Dynamics contact number
  2. Verify screen pop displays contact in side pane
  3. Answer call
  4. Add notes during call
  5. End call
  6. Verify: Phone Call activity created and visible in timeline

Test 2: Outbound Click-to-Call:

  1. Open contact record in Dynamics
  2. Click Cloud-PBX call button next to Business Phone
  3. Call initiates
  4. Complete call
  5. Verify: Phone Call activity logged with correct duration

Test 3: Power Automate Trigger:

  1. Create simple test flow:
    • Trigger: Phone Call is created
    • Action: Send email notification
  2. Make test call
  3. Verify: Email received after call ends

Test 4: Unknown Caller:

  1. Call from number not in Dynamics
  2. Answer call
  3. Option to create new Lead during/after call
  4. Verify: Lead created with phone number populated

Deploy to Organization

Rollout Strategy:

  1. Pilot (1-2 weeks):

    • Deploy to small group (5-10 users)
    • Sales managers and power users
    • Collect feedback and refine
  2. Department Rollout (2-4 weeks):

    • Sales team first
    • Customer Service team
    • Field Service (if applicable)
  3. Organization-Wide:

    • All Dynamics 365 users
    • Monitor adoption and usage
    • Provide ongoing training

Training Materials:

  • Quick Start Guide (PDF)
  • Video Tutorial: Screen Pop and Click-to-Call
  • Power Automate Flow examples
  • FAQ document

User Communication:

Subject: New Phone Integration in Dynamics 365

We've integrated Cloud-PBX with Dynamics 365!

Key Features:
✅ Incoming calls show customer info automatically
✅ Click phone numbers to call instantly
✅ All calls logged automatically to timeline
✅ Call recordings available in activities

How to Use:
1. Click any phone number in Dynamics to call
2. When calls arrive, customer info pops up
3. Add notes during or after call
4. Call automatically logged - no manual entry!

Training: [Video Tutorial] | [Quick Start Guide]
Support: IT Helpdesk x1234

Advanced Configuration

Custom Entity Integration

Integrate with Industry-Specific Entities:

Example: Real Estate Industry

Custom Entity: Property (new_property)
Fields: Property Address, Property Phone, Listing Agent

Integration Setup:
  Settings → Dynamics 365 → Custom Entities

  Add Entity: new_property (Property)
    Display Name: Property
    Primary Field: new_propertyaddress
    Phone Field: new_propertyphone
    Enable Screen Pop: Yes
    Enable Call Logging: Yes
    Call Association: Link to Property record

Usage:
  - Call from property phone → Screen pops property details
  - Call logged to property timeline
  - Associate with related entities (Contact, Opportunity)

Field Service Integration

For Dynamics 365 Field Service:

Settings → Integrations → Dynamics 365 → Field Service

Enable Field Service: Yes

Features:
  ☑ Click-to-call from Work Orders
  ☑ Call field technicians (mobile numbers)
  ☑ Log calls to Work Order timeline
  ☑ Emergency dispatch via phone
  ☑ Customer call-ahead notifications

Work Order Call Integration:
  - Dispatcher calls technician about urgent work order
  - Call logged to work order record
  - Technician status updated automatically
  - Customer notified of technician ETA via SMS

Unified Service Desk (USD) Integration

For Contact Center Operations:

Integration with USD:
  - Screen pop appears in USD hosted control
  - Call controls integrated into USD toolbar
  - Agent scripts triggered by call events
  - Queue management and routing
  - Real-time supervisor monitoring

Benefits:
  - Unified agent desktop experience
  - No context switching
  - Streamlined call handling
  - Improved agent productivity

Troubleshooting

OAuth Authentication Issues

Problem: "AADSTS65001: User or administrator has not consented"

Solution:

Azure Portal → App Registrations → Cloud-PBX for Dynamics 365
→ API Permissions → Grant admin consent for [organization]
→ Confirm all permissions show "Granted" status

Problem: "Invalid redirect URI"

Solution: Verify redirect URI exactly matches:

https://admin.voco.us/auth/dynamics365/callback

No trailing slash, correct subdomain, https (not http).


Call Logging Issues

Problem: Phone Call activities not being created

Diagnostic Steps:

  1. Check Integration Status:

    Settings → Integrations → Dynamics 365 → Status
    Should show: Connected ✅
  2. Verify User Mapping: Agent must be mapped to Dynamics user

  3. Check Security Roles:

    Dynamics 365 → Settings → Security → Security Roles
    → User's role must have:
      - Create: Phone Call activities
      - Append: Contacts, Accounts, Leads
      - Append To: Phone Call activities
  4. Review Dynamics Logs:

    Advanced Settings → System → System Jobs
    → Filter: Failed jobs
    → Look for: Web API errors
  5. API Throttling: Dynamics 365 has API limits (verify not exceeded):

    • Service Protection Limits: 6,000 requests per 5 minutes per user

Screen Pop Issues

Problem: No screen pop or wrong record

Phone Format: Ensure phone formats match:

Dynamics: +1-206-555-0123
Incoming: 2065550123

Enable: Normalize Phone Numbers
  - Strip country codes
  - Remove special characters
  - Match last 10 digits (US) or 8-9 (international)

Multiple Records with Same Phone:

Settings → Screen Pop → Duplicate Handling

Options:
  - Show most recently modified
  - Show Contact over Lead over Account
  - Display selection dialog (user chooses)

Best Practices

Dynamics 365 Reports

Call Activity Report:

Dynamics 365 → Reports → New Report

Report Type: Phone Call Activities
Group By: Owner, Direction, Status
Filters:
  - Activity Date: This Quarter
  - Status: Completed
  - My Team's Activities

Chart: Bar chart showing calls per user

Security and Compliance

Field-Level Security:

Dynamics 365 → Settings → Security → Field Security Profiles

Profile: Call Recording Access
Secured Fields:
  - cloudpbx_recordingurl (URL)
  - cloudpbx_qualityscore (score)

Permissions:
  - Sales Managers: Read
  - System Administrators: Create, Read, Update
  - Standard Users: No Access

Rationale: Protect sensitive call recordings

Microsoft Ecosystem Integration

Microsoft Teams Integration

Cloud-PBX + Dynamics + Teams:

Unified Experience:
  - Phone calls via Cloud-PBX
  - Meetings and chat via Teams
  - CRM data in Dynamics 365
  → All integrated

Features:
  - Call from Dynamics, presence synced to Teams
  - Screen pop shows Dynamics record during Teams call
  - Call logged to Dynamics after Teams meeting
  - Teams chat references Dynamics records

Office 365 Integration

Click-to-Call from Outlook:

With Microsoft 365 integration:
  - Outlook contact → Synced with Dynamics
  - Click phone in Outlook → Call via Cloud-PBX
  - Call automatically logged to Dynamics

Benefit: Unified contact management across Outlook and Dynamics

Frequently Asked Questions

Q: Does this work with Dynamics 365 On-Premises? A: Yes, if Internet-Facing Deployment (IFD) configured and accessible from internet. Cloud (Online) recommended for best experience.

Q: Can we integrate with multiple Dynamics organizations? A: Yes (Enterprise Cloud-PBX plan). Each organization requires separate configuration.

Q: What about Dynamics NAV or Business Central? A: Different product. Separate integration available for Business Central. Contact support.

Q: Does this support multiple currencies? A: Yes, respects Dynamics multi-currency settings. Call-related opportunities track in appropriate currency.

Q: Can we customize call logging beyond standard fields? A: Absolutely. Create custom fields on Phone Call entity and map in Cloud-PBX settings.

Q: Integration with Power Virtual Agents? A: Yes! Route calls to chatbots, then escalate to human agent with context. Custom integration required.

Q: Does this work with Dynamics 365 mobile app? A: Cloud-PBX mobile app + Dynamics mobile app work together. Click-to-call from Dynamics mobile triggers Cloud-PBX mobile app.


Getting Help

Dynamics 365 Integration Support

Need help with Dynamics 365 integration?

  • Setup: Review Azure AD app registration and OAuth
  • Errors: Check security roles and field permissions
  • Custom Entities: Contact support for custom integration
  • Microsoft Support: Open case in Microsoft 365 Admin Center

Resources:

  • Dynamics 365 Web API Documentation: docs.microsoft.com/dynamics365
  • Video Tutorial: Cloud-PBX + Dynamics 365 Setup (22 min)
  • Microsoft Community: Dynamics 365 forums

Next Steps