Home / Dynamics 365 / Dynamics 365 Customer Engagement: Overview, Architecture, and Getting Started
Dynamics 365

Dynamics 365 Customer Engagement: Overview, Architecture, and Getting Started

Explore Dynamics 365 Customer Engagement architecture, understand the Common Data Model and Dataverse, configure sales and service modules, implement securit...

What you will learn

Practical execution with concise explanations, real implementation patterns, and production-ready recommendations.

  1. Navigate to admin.powerplatform.microsoft.com
  2. Select EnvironmentsNew
  3. Configure environment:
Name: Production Sales CRM
Type: Production
Region: United States
Purpose: Sales and customer service operations
Create Database: Yes
Language: English
Currency: USD (cannot be changed later)
Enable Dynamics 365 Apps: Yes
Apps to Deploy:
  - Dynamics 365 Sales
  - Dynamics 365 Customer Service
Security Group: None (or select specific Azure AD group)

Installing Dynamics 365 Applications

Available applications:

  • Dynamics 365 Sales: Lead and opportunity management
  • Dynamics 365 Customer Service: Case management and knowledge base
  • Dynamics 365 Field Service: Work order and scheduling
  • Dynamics 365 Marketing: Campaign management and customer journeys
  • Dynamics 365 Project Operations: Project management and billing

Installation via Power Platform Admin Center:

# Using Power Platform CLI
pac admin list
pac admin create --name "Sales CRM" --type Production --region unitedstates
pac application install --environment "Sales CRM" --application-name "D365Sales"

Core Modules Overview

Core Modules Overview

Dynamics 365 Sales

Key capabilities:

  • Lead Management: Capture, qualify, and convert leads
  • Opportunity Management: Track sales pipeline and revenue forecasting
  • Quote and Order Management: Generate quotes, orders, and invoices
  • Product Catalog: Configure products, price lists, and discounting
  • Sales Insights: AI-driven recommendations and predictions

Typical sales process:

Architecture Overview: Lead → Qualification → Opportunity → Quote → Order → Invoice

Dynamics 365 Customer Service

Key capabilities:

  • Case Management: Track customer issues from creation to resolution
  • Knowledge Base: Create and share articles for self-service
  • Entitlements: Manage service level agreements (SLAs)
  • Queues: Route cases to appropriate teams
  • Omnichannel: Engage via chat, SMS, social media, and voice

Case lifecycle:

Architecture Overview: Case Created → Assigned → In Progress → On Hold → Resolved → Closed

Table Customization

Creating Custom Tables

Via Power Apps:

  1. Navigate to make.powerapps.com
  2. Select TablesNew tableNew table
  3. Configure table properties:
Display Name: Project
Plural Name: Projects
Description: Custom table for project tracking
Primary Column: Project Name
Enable Options:
  - Activities: Yes (emails, phone calls, tasks)
  - Notes: Yes (attachments and notes)
  - Connections: Yes (relate to other records)
  - Queues: No
  - Auditing: Yes (track changes)
  - Change Tracking: Yes (for integration)

Adding Columns

Column types:

// Single Line of Text
Project Name (Required, Max Length: 100)

// Whole Number
Estimated Hours (Min: 0, Max: 10000)

// Decimal Number
Budget (Precision: 2, Min: 0, Max: 1000000)

// Currency
Actual Cost (Precision: 2)

// Date and Time
Start Date (Date Only)
End Date (Date Only)

// Lookup (Relationship)
Project Manager (Lookup to User)
Customer (Lookup to Account)

// Choice (Option Set)
Project Status:
  - Planning (Value: 1)
  - In Progress (Value: 2)
  - On Hold (Value: 3)
  - Completed (Value: 4)
  - Cancelled (Value: 5)

// Multi-Select Choice
Technologies Used:
  - .NET
  - Azure
  - Power Platform
  - Dynamics 365

Creating Relationships

1:N (One-to-Many) relationship:

Architecture Overview: Account (1) → Projects (N)

N:N (Many-to-Many) relationship:

Architecture Overview: Project (N) ↔ Contact (N)

Business Rules

Business Rules

Client-Side Validation

Business rule example:

Name: Validate Project Dates
Scope: All Forms
Conditions:
  - If: Start Date > End Date
```yaml
Then:
  - Show Error: "Start date cannot be after end date"
  - Set Business Required: End Date
  • If: Project Status = "In Progress"
Then:
  - Set Field Visibility: Actual Cost = Visible
  - Set Business Required: Project Manager
  - Lock Field: Start Date

**Creating business rules:**

1. Open table → **Business rules** → **New**
2. Add conditions and actions:
   - **Conditions**: Field equals, contains, greater than, etc.
   - **Actions**: Show/hide fields, set required, set default value, show error, lock/unlock


## Security Model

### Security Roles





**Role-based security:**

Dynamics 365 uses a combination of:

- **Security Roles**: Define privileges on tables
- **Business Units**: Hierarchical organization structure
- **Teams**: Group users for access control


**Privilege levels:**


> **Architecture Overview:** Privilege Depth:


### Creating Custom Security Roles

**Example: Project Manager role:**

```yaml
Role Name: Project Manager
Business Unit: Root
Privileges:
  Project Table:
```yaml
Create: Business Unit
Read: Organization (view all projects)
Write: Business Unit (edit own BU projects)
Delete: User (delete own projects)
Assign: Business Unit
Share: Business Unit

Account Table:

Create: None
Read: Organization
Write: None
Delete: None

Contact Table:

Create: Business Unit
Read: Organization
Write: Business Unit
Delete: User

Activity Tables (Email, Phone, Task):

Create: Business Unit
Read: Business Unit
Write: Business Unit
Delete: User

### Field-Level Security

**Securing sensitive data:**

```yaml
Table: Contact
Secured Column: Social Security Number
Field Security Profile: HR Managers
Permissions:
  - Create: Yes
  - Read: Yes
  - Update: Yes

Integration Patterns

Integration Patterns

Web API

OData queries:

// C# example using HttpClient
var client = new HttpClient();
client.BaseAddress = new Uri("https://org.api.crm.dynamics.com/api/data/v9.2/");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");

// Retrieve accounts
var response = await client.GetAsync(
```text
"accounts?$select=name,accountnumber&$filter=revenue gt 1000000&$top=10");```
var accounts = await response.Content.ReadFromJsonAsync<AccountCollection>();

// Create contact
var contact = new
{
```text
firstname = "John",
lastname = "Doe",
emailaddress1 = "john.doe@contoso.com",
parentcustomerid_account@odata.bind = "/accounts(12345678-1234-1234-1234-123456789012)"```
};

var createResponse = await client.PostAsJsonAsync("contacts", contact);
var contactId = createResponse.Headers.Location.Segments.Last();

PowerShell example:

## Using Microsoft.Xrm.Data.PowerShell
Install-Module Microsoft.Xrm.Data.PowerShell





## Connect
Connect-CrmOnline -ServerUrl "https://org.crm.dynamics.com"





## Retrieve accounts
$accounts = Get-CrmRecords -EntityLogicalName account `
```text
-FilterAttribute "revenue" -FilterOperator "gt" -FilterValue 1000000 `
-Fields name,accountnumber -TopCount 10

Expected output:

Package installed successfully.

Terminal output for Install-Module

Create contact

$contact = @{

firstname = "John"
lastname = "Doe"
emailaddress1 = "john.doe@contoso.com"```
}
New-CrmRecord -EntityLogicalName contact -Fields $contact





Power Automate Integration

Automated workflow example:

Trigger: When a record is created (Dataverse)
  - Table: Opportunity
  - Scope: Organization

Condition: Amount > 100000
  If Yes:
```sql
- Send email notification to Sales Manager
- Create approval request
- Update Opportunity: Set "Requires Approval" = Yes

If No:

- Update Opportunity: Set "Auto-Approved" = Yes
- Log activity

### Azure Logic Apps Integration

**Enterprise integration:**

```json
{
  "definition": {
```text
"triggers": {
  "When_Opportunity_Won": {
    "type": "ApiConnection",
    "inputs": {
      "host": {
        "connection": {
          "name": "@parameters('$connections')['commondataservice']['connectionId']"
        }
      },
      "method": "get",
      "path": "/v2/datasets/@{encodeURIComponent('org.crm.dynamics.com')}/tables/@{encodeURIComponent('opportunities')}/onnewitems"
    },
    "conditions": [
      {
        "expression": "@equals(triggerBody()?['statecode'], 1)"
      }
    ]
  }
},
"actions": {
  "Create_SAP_Order": {
    "type": "ApiConnection",
    "inputs": {
      "host": {
        "connection": {
          "name": "@parameters('$connections')['sap']['connectionId']"
        }
      },
      "method": "post",
      "body": {
        "CustomerID": "@triggerBody()?['customerid']",
        "Amount": "@triggerBody()?['totalamount']"
      }
    }
  }
}```
  }
}

Best Practices

  1. Data Model Design: Leverage standard tables before creating custom ones
  2. Security First: Apply principle of least privilege
  3. Business Logic Location: Use business rules for simple logic, plugins for complex
  4. Naming Conventions: Use prefixes for custom tables (e.g., contoso_project)
  5. Solution Management: Always work within solutions for ALM
  6. Testing: Create separate environments for Dev, Test, and Production
  7. Documentation: Document customizations and business processes

Troubleshooting

Plugin Registration Tool errors:

Error: "User does not have required privileges"
Solution: Ensure user has "System Administrator" or "System Customizer" role

Web API authentication failures:

// ✅ Correct Azure AD authentication
var credential = new ClientSecretCredential(
```yaml
tenantId: "your-tenant-id",
clientId: "your-client-id",
clientSecret: "your-client-secret");

var token = await credential.GetTokenAsync(

new TokenRequestContext(new[] { "https://org.crm.dynamics.com/.default" }));

## Architecture Decision and Tradeoffs

When designing business applications solutions with Dynamics 365, consider these key architectural trade-offs:

| Approach | Best For | Tradeoff |
|----------|----------|----------|
| Managed / platform service | Rapid delivery, reduced ops burden | Less customisation, potential vendor lock-in |
| Custom / self-hosted | Full control, advanced tuning | Higher operational overhead and cost |

> **Recommendation:** Start with the managed approach for most workloads and move to custom only when specific requirements demand it.

## Validation and Versioning

- Last validated: April 2026
- Validate examples against your tenant, region, and SKU constraints before production rollout.
- Keep module, CLI, and SDK versions pinned in automation pipelines and review quarterly.

## Security and Governance Considerations

- Apply least-privilege access using RBAC roles and just-in-time elevation for admin tasks.
- Store secrets in managed secret stores and avoid embedding credentials in scripts or source files.
- Enable audit logging, data protection policies, and periodic access reviews for regulated workloads.

## Cost and Performance Notes

- Define budgets and alerts, then monitor usage and cost trends continuously after go-live.
- Baseline performance with synthetic and real-user checks before and after major changes.
- Scale resources with measured thresholds and revisit sizing after usage pattern changes.

## Official Microsoft References

- https://learn.microsoft.com/dynamics365/
- https://learn.microsoft.com/power-platform/admin/
- https://learn.microsoft.com/power-platform/alm/

## Public Examples from Official Sources

- These examples are sourced from official public Microsoft documentation and sample repositories.
- Documentation examples: https://learn.microsoft.com/dynamics365/
- Sample repositories: https://github.com/microsoft/PowerApps-Samples
- Prefer adapting these examples to your tenant, subscriptions, and governance requirements before production use.

## Key Takeaways

- Dynamics 365 CE provides comprehensive CRM capabilities built on Dataverse
- Microsoft Dataverse offers a standardized data model and robust security
- Security roles combine with business units for flexible access control
- Web API and Power Automate enable powerful integration scenarios
- Solution-driven development ensures proper application lifecycle management





## Next Steps

- Explore **Solution Layers** and **Application Lifecycle Management (ALM)**
- Implement **Plugins** for server-side business logic
- Build **Custom Workflows** with Power Automate
- Create **Model-Driven Apps** for tailored user experiences


## Additional Resources

- [Dynamics 365 Customer Engagement Documentation](https://learn.microsoft.com/en-us/dynamics365/customer-engagement/)
- [Microsoft Dataverse Developer Guide](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/)
- [Power Platform Admin Center](https://admin.powerplatform.microsoft.com)
- [Dynamics 365 Community](https://community.dynamics.com/)


---

*Engage customers, empower teams.*

Discussion