---
name: crm-bidirectional-sync
description: Maintain synchronized customer data between support platform and CRM system including contact info, account tier, plan details, support history, and custom fields. Use when setting up CRM integration, syncing customer data between support and CRM, configuring bidirectional data flow, troubleshooting sync failures, or managing customer record consistency. Triggers on phrases like "CRM sync", "Salesforce integration", "HubSpot sync", "bidirectional sync", "customer data sync", "support CRM integration", "sync failure", "data consistency".
---

# CRM Bidirectional Sync

Maintain real-time, synchronized customer data between support platform and CRM system to ensure agents always work with complete, accurate customer context from both sales and support perspectives.

## Workflow

### 1. Sync Architecture and Configuration

1. **Field mapping and data flow design**:
   ```
   CRM → SUPPORT PLATFORM (Outbound Sync):
   ========================================
   Customer Record:
     Name (first, last, company)
     Email, phone, timezone
     Account tier (Free, Pro, Enterprise)
     Plan name and pricing
     Account owner (CSM, AE name)
     Contract start/end dates
     ARR/MRR value
     Industry, company size
     Custom fields (10-50 per org)
     
   Account Record:
     Parent company (for consolidated accounts)
     Billing contact
     Technical contact
     Implementation status
     Renewal date
   
   Activity Record:
     Sales calls logged in CRM
     Deal stages and history
     Notes from sales team
   
   SUPPORT → CRM (Inbound Sync):
   =============================
   Support Activity:
     Ticket created (activity type)
     Ticket subject and category
     Ticket status updates
     Support agent handling
     First response time
     Resolution time
     CSAT score (if collected)
   
   Support Health Score:
     Composite score (0-100)
     Trend (improving/declining)
     Risk level (green/yellow/red)
     Last ticket date
     Open ticket count
     Escalation count
   
   Support Tags:
     At-risk support flag
     VIP support designation
     Feature adoption gaps
     Recurring issue category
   ```

2. **Sync modes and triggers**:
   - **Real-time webhook sync**: Instant updates on record changes (<10 second latency)
   - **Scheduled batch sync**: Every 15 minutes for bulk updates and reconciliation
   - **Event-driven triggers**: Specific events trigger immediate sync (new customer, plan change, churn)
   - **Manual resync**: Admin can trigger full or partial resync on demand
   - **Conflict resolution**: Last-write-wins with audit trail; configurable per field

3. **Error handling and recovery**:
   - Retry logic: 3 attempts with exponential backoff (1min, 5min, 15min)
   - Dead letter queue: Failed syncs logged for manual review
   - Alerting: Slack/email notification when sync failure rate >1%
   - Partial sync recovery: Resume from last successful sync point
   - Data validation: Schema checks before sync to prevent corruption

### 2. Real-Time Sync Operations

1. **New customer creation flow**:
   - CRM: New opportunity marked "Closed Won" → account created
   - Webhook fires → support platform creates customer profile
   - Initial data synced: name, email, plan, account owner, custom fields
   - Support platform: Creates onboarding checklist, sets initial health score
   - Confirmation: Support record ID written back to CRM custom field
   - Timeline: Entire sync completes within 15 seconds

2. **Account change propagation**:
   - CRM: Plan upgrade, owner reassignment, contract renewal
   - Change detected → webhook → support platform updates profile
   - Support actions triggered: Updated tier routing, new CSM notifications
   - Bidirectional: Support health score change → CRM field updated → AE/CSM notified

3. **Activity sync for 360-degree view**:
   - Every support ticket → CRM activity record created
   - Every sales call → support context updated in customer profile
   - Activity timeline unified across CRM and support in agent view
   - Search: Agent can search sales activities from support ticket view

### 3. Data Quality and Reconciliation

1. **Automated reconciliation process**:
   - Daily reconciliation: Compare CRM and support records for all active accounts
   - Field-level comparison: Check each mapped field for consistency
   - Drift detection: Identify records that have diverged
   - Auto-correction: Apply "source of truth" rules (CRM = plan data, Support = ticket data)
   - Exception report: Unresolvable conflicts flagged for manual review
   - Typical result: 99.7% auto-resolved, 0.3% manual review

2. **Data quality monitoring**:
   - Sync success rate: Target >99.5% (tracked per hour)
   - Sync latency: Target <10 seconds (P95)
   - Data completeness: % of records with all required fields populated
   - Duplicate detection: Prevent duplicate customer records across systems
   - Audit trail: Every sync event logged with before/after values

3. **Custom field management**:
   - Field mapping UI: Admin configures field mappings without engineering
   - New field onboarding: 5-minute setup for new custom fields
   - Field deprecation: Archive old fields without breaking active sync
   - Validation rules: Data type enforcement, required field checks

## Templates & Frameworks

### CRM Sync Dashboard

```
CRM BIDIRECTIONAL SYNC DASHBOARD — January 2026
=================================================

SYNC HEALTH:
  Overall status: ✅ OPERATIONAL
  Last full sync: 2026-01-15 14:30 UTC (completed in 4.2 minutes)
  Last real-time sync: 2026-01-15 14:47:23 UTC (3.1 seconds)
  
  Success rates (last 24 hours):
    CRM → Support: 99.7% (14,230/14,262 records synced)
    Support → CRM: 99.8% (12,890/12,921 records synced)
    Failed syncs: 31 (0.2%)
    Auto-recovered: 28 (90.3%)
    Manual intervention needed: 3 (9.7%)

SYNC VOLUME:
  Records created today: 47 (new customers from CRM)
  Records updated today: 14,215 (two-way)
  Activities logged today: 2,340 (support → CRM)
  Health scores updated: 1,890 (support → CRM)
  
  Peak sync hour: 10:00-11:00 UTC (2,890 syncs)
  Average sync latency: 4.7 seconds (P50), 8.2 seconds (P95)

DATA CONSISTENCY:
  Records fully synchronized: 23,847 of 24,100 (99.0%)
  Records with field-level drift: 253 (1.0%)
    Drift breakdown:
      Custom field 12 (industry): 89 records (CRM updated, not synced yet)
      Custom field 23 (renewal date): 67 records (support health score delayed)
      Account owner: 45 records (CSM reassigned in CRM 2 hours ago)
      Plan tier: 34 records (batch upgrade in CRM, sync in progress)
      Custom field 8 (implementation status): 18 records (outdated)

SYNC FAILURES (Last 24 Hours):
  Time          | Direction | Record ID | Error                  | Status
  --------------|-----------|-----------|------------------------|--------
  14:12 UTC     | CRM→Sup   | ACC-8832  | Timeout (CRM API)      | ✅ Recovered
  13:45 UTC     | Sup→CRM   | TKT-9124  | Field validation error | ✅ Fixed (data corrected)
  11:30 UTC     | CRM→Sup   | ACC-7721  | Rate limit exceeded    | ✅ Recovered (3 retries)
  09:15 UTC     | Sup→CRM   | ACT-5543  | Duplicate detected     | ⚠ Manual review pending
  
  Failure trend: ↓ 23% from last week (improving)

FIELD MAPPING STATUS:
  Active field mappings: 34
  CRM → Support: 22 fields (all operational)
  Support → CRM: 12 fields (all operational)
  Custom fields: 18 mapped (14 CRM → Support, 4 Support → CRM)
  
  Recently added fields:
    ✅ "Contract Renewal Date" — added 2025-12-20, syncing 24,100 records
    ✅ "Primary Technical Contact" — added 2025-12-18, syncing 18,200 records
    ✅ "Support Risk Level" — added 2026-01-05, syncing 23,847 records

CUSTOMER ONBOARDING SYNC:
  New customers synced today: 47
  Average time from CRM won → support profile: 18 seconds
  Onboarding checklist auto-created: 47/47 (100%)
  Initial health score set: 47/47 (100%)
  CSM notification sent: 47/47 (100%)

INTEGRATION METRICS:
  CRM API calls today: 28,460 (of 100,000 daily limit — 28.5%)
  Webhook deliveries: 15,670 (success rate: 99.8%)
  Batch sync jobs: 96/day (all completed)
  Dead letter queue items: 3 (pending manual review)
  
  CRM system response time: 230ms avg
  Support system response time: 180ms avg
  Network latency: 45ms avg

ALERTS:
  ⚠ 3 items in manual review queue (target: <5)
  ✅ No critical failures in last 24 hours
  ✅ Sync latency within SLA (<10s P95)
  ✅ Success rate above threshold (99.5%)
```

### Conflict Resolution Framework

```
CRM ↔ SUPPORT DATA CONFLICT RESOLUTION RULES
==============================================

SOURCE OF TRUTH ASSIGNMENT:
  CRM owns (always syncs CRM → Support, never overwrites CRM):
    Plan tier and pricing
    Account owner (CSM, AE)
    Contract dates
    Company information (name, size, industry)
    Billing contact and method
    Custom sales fields
    
  Support owns (always syncs Support → CRM, never overwrites Support):
    Ticket history
    Support health score
    Last support interaction
    CSAT scores
    Support risk flags
    Agent notes and tags
    
  Shared ownership (both systems can update, conflict possible):
    Customer email and phone
    Customer name (spelling corrections)
    Timezone and language preference
    Account status (active, suspended, churned)
    
CONFLICT RESOLUTION RULES FOR SHARED FIELDS:
  Rule 1: Customer self-service updates take highest priority
    (Customer changes email in product → syncs to both systems)
    
  Rule 2: CRM update wins for contact info changes by sales team
    (Sales updates phone number → syncs to support)
    
  Rule 3: Support update wins for account status changes due to support events
    (Support suspends account for security → syncs to CRM)
    
  Rule 4: Time-based resolution for simultaneous changes
    (Most recent update wins, older change flagged for review)
    
  Rule 5: Manual review for unresolvable conflicts
    (Both systems changed in <5 second window → human review)

CONFLICT HANDLING WORKFLOW:
  1. Detect conflict during sync (same field changed in both systems)
  2. Apply source of truth rule → auto-resolve
  3. If rule doesn't apply → flag for manual review
  4. Manual review queue → data admin resolves within 24 hours
  5. Log resolution and update both systems
  6. Adjust rules if pattern detected (reducing future conflicts)

CONFLICT STATISTICS:
  Total syncs: 27,151/day
  Conflicts detected: 23/day (0.08%)
  Auto-resolved: 21/day (91.3%)
  Manual review: 2/day (8.7%)
  Average resolution time: 4.2 hours
```

## Integration Points

- **CRM systems** (Salesforce, HubSpot, Microsoft Dynamics, Pipedrive): Primary data source for customer and account records
- **Support platforms** (Zendesk, Freshdesk, Intercom): Destination for enriched customer profiles and source of support activity data
- **API management** (Kong, Apigee): Rate limiting, authentication, request routing for sync traffic
- **Monitoring** (Datadog, New Relic): Sync health monitoring, latency tracking, error alerting
- **Data warehouse** (Snowflake, BigQuery): Historical sync data for analytics and reconciliation
- **Webhook services** (Zapier, Make): Event-driven sync triggers for non-native integrations
- **Identity management** (Okta, Auth0): Authentication for API access between systems
- **Communication** (Slack, Teams): Sync failure alerts and operational notifications

## Edge Cases

- **CRM API rate limits exceeded during bulk operations**: 500+ new customers synced simultaneously after major campaign:
  - Implement request queuing with priority (new customers > updates > activity logs)
  - Batch size optimization: 50 records per request (vs default 100)
  - Retry with exponential backoff, respect rate limit headers
  - Fallback: Switch to scheduled batch sync mode temporarily
  - Alert: Slack notification to ops team when rate limit reached
  - Recovery: Full catch-up within 2 hours post-burst
- **Customer record exists in one system but not the other**: Data migration from old CRM left orphaned records:
  - Reconciliation job runs daily, flags unmatched records
  - Matching algorithm: Try email → phone → company name → manual
  - Auto-merge: >95% confidence match → merge records automatically
  - Manual review: <95% confidence → flag for data admin
  - Prevention: Real-time sync on creation prevents future orphaned records
- **Field mapping breaks after CRM schema update**: Salesforce org customization adds/renames 20 fields:
  - Schema change detection: Poll CRM metadata daily for changes
  - Alert: Immediate notification of field changes to admin
  - Impact assessment: Identify which sync mappings are broken
  - Admin action: Update field mappings via UI (5 min per field)
  - Rollback: Previous mapping preserved until new one verified
  - Testing: Validate sync on sample records before full deployment
- **Customer data privacy request conflicts with sync**: GDPR deletion request for customer data in support but not CRM:
  - GDPR request → support platform anonymizes record
  - Sync conflict: Support tries to push anonymized data to CRM
  - Resolution: GDPR request takes precedence, CRM record flagged for deletion
  - Notification: Legal/compliance team alerted of cross-system GDPR action
  - Audit: Full deletion chain documented for compliance reporting
- **Sync creates duplicate customer records**: Same customer has two emails across CRM and support:
  - Duplicate detection: On sync, check for existing records by email+name+company
  - Merge workflow: Consolidate tickets, activity history, and preferences
  - Master record selection: More recent record becomes master
  - CRM alert: Sales team notified of duplicate found and merged
  - Prevention: Email validation on new record creation to catch duplicates

## Output

### Monthly CRM Sync Report

```
CRM SYNC MONTHLY REPORT — January 2026
========================================

SYNC PERFORMANCE:
  Total sync events: 814,530 (↑ 12% from December)
  Success rate: 99.7% (↑ 0.1% from December)
  Average latency: 4.7 seconds (↓ 0.8s — improving)
  P95 latency: 8.2 seconds (within SLA of 10s)
  Failed syncs: 2,443 (0.3%)
  Auto-recovered: 2,267 (92.8%)
  Manual resolution: 176 (7.2%)

DATA CONSISTENCY:
  Records fully synchronized: 24,100 of 24,100 (100%)
  Field-level drift (at month end): 0 (clean state)
  Peak drift during month: 253 records (Jan 3, resolved within 6 hours)
  Duplicate records detected and merged: 12
  Orphaned records resolved: 8

BUSINESS IMPACT:
  New customers synced CRM → Support: 1,240
  Average time to support profile creation: 18 seconds
  Support health scores pushed to CRM: 56,700 (daily updates × 31 days)
  CSAT scores logged in CRM: 8,930
  Support activities created in CRM: 72,600
  CSM notifications triggered by support data: 430

FIELD MAPPING MAINTENANCE:
  Active mappings: 34 fields (18 CRM → Support, 12 Support → CRM)
  New fields added this month: 3
  Fields deprecated: 1 ("Legacy Tier" → replaced by "Current Tier")
  Mapping changes: 5 (data type updates, validation rules)

RECOMMENDATIONS:
  1. Add "Customer Success Manager" field mapping (requested by 3 CSMs)
  2. Optimize batch sync timing: Move from 2:00 AM to 3:00 AM (lower CRM load)
  3. Implement change data capture (CDC) for Salesforce (reduces API calls by ~40%)
  4. Add "Support Escalation Count" field to CRM (requested by AE team)
```
