DataCloud

Data Ingestion

Data Integration

Best for:
  • Customer 360 data consolidation
  • Multi-source data integration
  • Real-time event streaming
  • Batch data imports from legacy systems
Availability & Implementation:
Generally Available

Unified data ingestion from multiple sources including Salesforce, external systems, and real-time streams

Setup: Data Cloud Setup > Data Streams

Key Benefits
  • Unified data model across sources
  • Real-time and batch processing
  • Automatic schema detection
  • Built-in data quality checks
Requirements
  • Data Cloud license
  •  Source system connectivity
  • Data mapping configuration
Data Ingestion Example

// Data Cloud API - Create Data Stream
{
  "name": "Customer_Interactions_Stream",
  "sourceType": "S3",
  "configuration": {
    "bucketName": "customer-data-lake",
    "fileFormat": "JSON",
    "compressionType": "GZIP",
    "schedule": {
      "frequency": "HOURLY",
      "startTime": "2024-01-01T00:00:00Z"
    }
  },
  "targetObject": "CustomerInteraction__dlm",
  "fieldMappings": [
    {
      "sourceField": "customer_id",
      "targetField": "CustomerId__c"
    },
    {
      "sourceField": "interaction_type",
      "targetField": "InteractionType__c"
    },
    {
      "sourceField": "timestamp",
      "targetField": "InteractionDate__c"
    }
  ]
}

// Apex: Query Data Cloud Objects
List<Interaction__dlm> interactions = [
  SELECT CustomerId__c, InteractionType__c, InteractionDate__c
  FROM CustomerInteraction__dlm
  WHERE InteractionDate__c = LAST_N_DAYS:30
  ORDER BY InteractionDate__c DESC
];

Identity Resolution

Data Quality

Best for:
  • Duplicate customer record management
  • Cross-channel customer identification
  • Customer journey unification
  • Data quality improvement
Availability & Implementation:
Generally Available

Advanced matching and merging of customer identities across multiple data sources and touchpoints

Setup: Data Cloud Setup > Identity Resolution

Key Benefits
  • Single view of customer
  • Improved data quality
  • Better customer experience
  • Reduced duplicate marketing
Requirementts
  • Data Cloud license with Identity Resolution
  • Quality data sources
  • Matching rule configuration
Important Notes
  • Manual review recommended for high-value matches
  • Performance scales with data volume
  • Continuous learning improves accuracy
Identity Resolution Example

// Identity Resolution Rule Configuration
{
  "name": "Customer_Email_Phone_Match",
  "matchRules": [
    {
      "field": "Email__c",
      "matchType": "EXACT",
      "weight": 0.4
    },
    {
      "field": "Phone__c",
      "matchType": "FUZZY",
      "weight": 0.3
    },
    {
      "field": "LastName__c",
      "matchType": "FUZZY",
      "weight": 0.3
    }
  ],
  "threshold": 0.8,
  "autoMerge": false,
  "reviewQueue": true
}

// Apex: Work with Unified Individuals
List<UnifiedIndividual__dlm> customers = [
  SELECT Id, Email__c, Phone__c, FirstName__c, LastName__c,
         SourceRecordCount__c, LastModifiedDate
  FROM UnifiedIndividual__dlm
  WHERE Email__c != null
  ORDER BY LastModifiedDate DESC
];

// Query related source records
List<IndividualIdentityMap__dlm> sourceRecords = [
  SELECT SourceRecordId__c, SourceSystem__c, UnifiedIndividualId__c
  FROM IndividualIdentityMap__dlm
  WHERE UnifiedIndividualId__c IN :customerIds
];

Calculated Insights

Analytics & AI

Best for:
  • Customer lifetime value calculation
  • Engagement scoring
  • Propensity modeling
  • Real-time segmentation
Availability & Implementation:
Generally Available

Real-time computed metrics and KPIs derived from unified customer data across all touchpoints

Setup: Data Cloud Setup > Calculated Insights

Key Benefits
  • Real-time insights
  • Actionable customer metrics
  • Personalization enablement
  • Predictive capabilities
Requirements
  • Data Cloud license
  • Unified customer data
  • Business logic definition
Calculated Insights Example

// Calculated Insight Definition - Customer Lifetime Value
{
  "name": "Customer_Lifetime_Value",
  "description": "CLV based on purchase history and engagement",
  "calculationType": "AGGREGATION",
  "sourceObject": "CustomerInteraction__dlm",
  "groupBy": ["CustomerId__c"],
  "aggregations": [
    {
      "field": "PurchaseAmount__c",
      "function": "SUM",
      "alias": "TotalPurchases"
    },
    {
      "field": "InteractionDate__c",
      "function": "COUNT",
      "alias": "TotalInteractions"
    }
  ],
  "formula": "TotalPurchases * (TotalInteractions / 12) * 0.8",
  "schedule": {
    "frequency": "DAILY",
    "time": "02:00"
  }
}

// Query Calculated Insights in Apex
List<CustomerLifetimeValue__dlm> clvScores = [
  SELECT CustomerId__c, LifetimeValue__c, LastCalculated__c,
         TotalPurchases__c, TotalInteractions__c
  FROM CustomerLifetimeValue__dlm
  WHERE LifetimeValue__c > 1000
  ORDER BY LifetimeValue__c DESC
  LIMIT 100
];

// Use in Flow or Process Builder
// Create segments based on CLV
Flow.Interview customerSegmentation = new Flow.Interview.Customer_Segmentation_Flow(
  new Map{
    'CustomerId' => customerId,
    'CLVScore' => clvScore.LifetimeValue__c
  }
);
customerSegmentation.start();

Data Activation

Marketing & Sales

Best for:
  • Personalized marketing campaigns
  • Sales opportunity identification
  • Customer service personalization
  • Real-time offer management
Availability & Implementation:
Generally Available

Seamless activation of unified customer data in Salesforce applications for personalized experiences

Setup: Data Cloud Setup > Activation Targets

Key Benefits
  • Real-time personalization
  • Improved conversion rates
  • Better customer experience
  • Unified customer view in apps
Requirements
  • Data Cloud license
  • Target platform connectivity
  • Activation permissions
Data Activation Example

// Data Action Configuration - Marketing Cloud Activation
{
  "name": "High_Value_Customer_Segment",
  "targetPlatform": "MARKETING_CLOUD",
  "segmentCriteria": {
    "calculatedInsight": "Customer_Lifetime_Value",
    "operator": "GREATER_THAN",
    "value": 5000
  },
  "activationFields": [
    "Email__c",
    "FirstName__c",
    "LastName__c",
    "LifetimeValue__c",
    "PreferredChannel__c"
  ],
  "schedule": {
    "frequency": "REAL_TIME",
    "batchSize": 1000
  }
}

// Apex: Create Data Action for Real-time Activation
public class DataCloudActivation {
  
  @InvocableMethod(label='Activate Customer Segment')
  public static void activateCustomerSegment(List<ActivationRequest> requests) {
    for(ActivationRequest request : requests) {
      // Query unified customer data
      List<UnifiedIndividual__dlm> customers = [
        SELECT Email__c, FirstName__c, LastName__c
        FROM UnifiedIndividual__dlm 
        WHERE Id IN :request.customerIds
      ];
      
      // Send to activation target
      callActivationAPI(customers, request.targetPlatform);
    }
  }
  
  private static void callActivationAPI(List<UnifiedIndividual__dlm> customers, String platform) {
    HttpRequest req = new HttpRequest();
    req.setEndpoint('callout:DataCloud_Activation');
    req.setMethod('POST');
    req.setHeader('Content-Type', 'application/json');
    req.setBody(JSON.serialize(customers));
    
    Http http = new Http();
    HttpResponse res = http.send(req);
    
    System.debug('Activation response: ' + res.getBody());
  }
  
  public class ActivationRequest {
    @InvocableVariable public List<Id> customerIds;
    @InvocableVariable public String targetPlatform;
  }
}

Data Cloud Comparison

Choose the right Data Cloud features based on your data strategy needs

Feature Comparison Table

Flow Type Security Level Use Case Type
Data Ingestion
Data Integration
Generally Available
Centralized data collection
Identity Resolution
Data Quality
Generally Available
Customer identity unification
Calculated Insights
Analytics & AI
Generally Available
Customer analytics and scoring
Data Activation
Marketing & Sales
Generally Available
Personalized customer engagement

Decision Tree

What is your primary data goal?

Unify customer data from multiple sources: Start with Data Ingestion + Identity Resolution

Generate customer insights and analytics: Focus on Calculated Insights

Personalize customer experiences:
Implement Data Activation

Do you have data quality issues?

Yes, many duplicate customers:: Prioritize Identity Resolution

No, data is clean: Focus on Analytics and Activation

Implementation Strategy

Getting Started

  • Phase 1: Start with Data Ingestion from key sources
  • Phase 2: Implement Identity Resolution for data quality
  • Phase 3: Build Calculated Insights for analytics
  • Phase 4: Enable Data Activation for personalization

Success Factors

  • Ensure high-quality source data
  • Define clear identity resolution rules
  • Start with simple calculated insights
  • Test activation use cases iteratively
  • Monitor data freshness and accuracy