CRITICAL GUIDELINES
Windows File Path Requirements
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
- WRONG:
D:/repos/project/file.tsx
- CORRECT:
D:\repos\project\file.tsx
This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems
Documentation Guidelines
NEVER create new documentation files unless explicitly requested by the user.
- Priority: Update existing README.md files rather than creating new documentation
- Repository cleanliness: Keep repository root clean - only README.md unless user requests otherwise
- Style: Documentation should be concise, direct, and professional - avoid AI-generated tone
- User preference: Only create additional .md files when user specifically asks for documentation
Salesforce Data Cloud Integration Patterns (2025)
What is Salesforce Data Cloud?
Salesforce Data Cloud is a real-time customer data platform (CDP) that unifies data from any source to create a complete, actionable view of every customer. It powers AI, automation, and analytics across the entire Customer 360 platform.
Key Capabilities:
- Data Ingestion — Connect 200+ sources (Salesforce, external systems, data lakes)
- Data Harmonization — Map disparate data to unified data model
- Identity Resolution — Match and merge customer records across sources
- Real-Time Activation — Trigger actions based on streaming data
- Zero Copy Architecture — Query data in place without moving it
- AI/ML Ready — Powers Einstein, Agentforce, and predictive models
- Vector Database (GA March 2025) — Store and query unstructured data with semantic search
- Hybrid Search (Pilot 2025) — Combine semantic and keyword search for accuracy
Reference Map
Detailed material lives in references/. Load only what the current task needs.
| Topic |
File |
When to load |
| Data ingestion (CDC streaming, batch API, Snowflake/Databricks Zero Copy) |
references/ingestion-patterns.md |
Configuring data sources, importing CSV/SFTP/S3 data, setting up Zero Copy to a warehouse |
| Identity resolution & authentication |
references/identity-resolution.md |
Defining match rules, reconciliation, custom matching, JWT Bearer auth |
| Real-time activation (Flow, Agentforce, Reverse ETL, calculated insights, segmentation, Data Cloud SQL) |
references/activation-patterns.md |
Triggering downstream actions, segmentation, Agentforce grounding, SQL queries |
| Vector Database & semantic/hybrid search |
references/vector-database.md |
Unstructured data indexing, semantic search, Einstein Copilot Search, multi-language search |
Data Cloud Architecture
┌──────────────────────────────────────────────────────────┐
│ Data Sources │
│ Salesforce CRM │ External Apps │ Data Warehouses │ APIs │
└────────┬─────────────────┬──────────────┬───────────┬────┘
│ │ │ │
┌────▼─────────────────▼──────────────▼───────────▼────┐
│ Data Cloud Connectors & Ingestion │
│ ├─ Real-time Streaming (Change Data Capture) │
│ ├─ Batch Import (scheduled/on-demand) │
│ └─ Zero Copy (Snowflake, Databricks, BigQuery) │
└────────────────────────┬─────────────────────────────┘
│
┌────────────────────────▼─────────────────────────────┐
│ Data Model & Harmonization │
│ ├─ Map to Common Data Model (DMO objects) │
│ ├─ Identity Resolution (match & merge) │
│ └─ Data Transformation (calculated insights) │
└────────────────────────┬─────────────────────────────┘
│
┌────────────────────────▼─────────────────────────────┐
│ Unified Customer Profile (360° View) │
│ ├─ Demographics, Transactions, Behavior, Events │
│ └─ Real-time Profile API for instant access │
└────────────────────────┬─────────────────────────────┘
│
┌────────────────────────▼─────────────────────────────┐
│ Activation & Actions │
│ ├─ Salesforce Flow (real-time automation) │
│ ├─ Marketing Cloud (segmentation/journeys) │
│ ├─ Agentforce (AI agents) │
│ ├─ Einstein AI (predictions/recommendations) │
│ └─ External Systems (reverse ETL) │
└──────────────────────────────────────────────────────┘
Core Workflow
- Identify use case — Ingestion, identity, segmentation, activation, or unstructured/AI search? Pick the matching reference.
- Map data sources — CRM CDC (real-time), external batch (S3/SFTP), or warehouse Zero Copy.
- Define DMOs and matching — Map source fields to Data Model Objects; configure identity resolution match + reconciliation rules.
- Build insights / segments — Calculated insights for KPIs (LTV, churn risk); segments for activation targets.
- Activate — Flow / Platform Events / Agentforce actions / Reverse ETL data actions.
- Validate — Use Data Cloud SQL workbench, check sync logs, monitor identity resolution metrics.
Best Practices
Performance
- Use Zero Copy for large datasets (>10M records)
- Batch imports outside business hours
- Index frequently queried fields in Data Cloud
- Limit real-time triggers to critical events
- Cache unified profiles when possible
Security
- Field-level security applies to Data Cloud queries from Salesforce
- Data masking for PII in non-production environments
- Encryption at rest and in transit (TLS 1.2+)
- Audit logging for all data access
- Role-based access control (RBAC) for Data Cloud users
Data Quality
- Data validation before ingestion
- Deduplication rules at source and in Data Cloud
- Data lineage tracking (know source of each field)
- Quality scores for unified profiles
- Regular data audits and cleansing
Resources
1---2name: data-cloud-20253description: Salesforce Data Cloud integration patterns and architecture (2025). PROACTIVELY activate for: (1) Data Cloud setup and ingestion, (2) Data Streams (cloud, mobile, web SDK, ingestion API), (3) data model objects (DMO) and source objects (DSO), (4) identity resolution and unified profiles, (5) calculated insights and segmentation, (6) activations to Marketing Cloud, advertising platforms, Salesforce CRM, (7) Bring Your Own Lake (BYOL) with Snowflake, BigQuery, Databricks, (8) zero-copy data sharing, (9) Data Cloud + Agentforce grounding, (10) consent management and compliance. Provides: data-stream selection matrix, identity resolution rules, segmentation patterns, BYOL configuration, and activation playbook.4---5
6## CRITICAL GUIDELINES
7
8### Windows File Path Requirements
9
10**MANDATORY: Always Use Backslashes on Windows for File Paths**
11
12When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).
13
14Examples:
15- WRONG: `D:/repos/project/file.tsx`
16- CORRECT: `D:\repos\project\file.tsx`
17
18This applies to:
19- Edit tool file_path parameter
20- Write tool file_path parameter
21- All file operations on Windows systems
22
23### Documentation Guidelines
24
25NEVER create new documentation files unless explicitly requested by the user.
26
27- **Priority**: Update existing README.md files rather than creating new documentation
28- **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise
29- **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone
30- **User preference**: Only create additional .md files when user specifically asks for documentation
31
32---
33
34# Salesforce Data Cloud Integration Patterns (2025)
35
36## What is Salesforce Data Cloud?
37
38Salesforce Data Cloud is a real-time customer data platform (CDP) that unifies data from any source to create a complete, actionable view of every customer. It powers AI, automation, and analytics across the entire Customer 360 platform.
39
40**Key Capabilities:**
41- **Data Ingestion** — Connect 200+ sources (Salesforce, external systems, data lakes)
42- **Data Harmonization** — Map disparate data to unified data model
43- **Identity Resolution** — Match and merge customer records across sources
44- **Real-Time Activation** — Trigger actions based on streaming data
45- **Zero Copy Architecture** — Query data in place without moving it
46- **AI/ML Ready** — Powers Einstein, Agentforce, and predictive models
47- **Vector Database** (GA March 2025) — Store and query unstructured data with semantic search
48- **Hybrid Search** (Pilot 2025) — Combine semantic and keyword search for accuracy
49
50## Reference Map
51
52Detailed material lives in `references/`. Load only what the current task needs.
53
54| Topic | File | When to load |
55|-------|------|--------------|
56| Data ingestion (CDC streaming, batch API, Snowflake/Databricks Zero Copy) | `references/ingestion-patterns.md` | Configuring data sources, importing CSV/SFTP/S3 data, setting up Zero Copy to a warehouse |
57| Identity resolution & authentication | `references/identity-resolution.md` | Defining match rules, reconciliation, custom matching, JWT Bearer auth |
58| Real-time activation (Flow, Agentforce, Reverse ETL, calculated insights, segmentation, Data Cloud SQL) | `references/activation-patterns.md` | Triggering downstream actions, segmentation, Agentforce grounding, SQL queries |
59| Vector Database & semantic/hybrid search | `references/vector-database.md` | Unstructured data indexing, semantic search, Einstein Copilot Search, multi-language search |
60
61## Data Cloud Architecture
62
63```text
64┌──────────────────────────────────────────────────────────┐
65│ Data Sources │
66│ Salesforce CRM │ External Apps │ Data Warehouses │ APIs │
67└────────┬─────────────────┬──────────────┬───────────┬────┘
68 │ │ │ │
69 ┌────▼─────────────────▼──────────────▼───────────▼────┐
70 │ Data Cloud Connectors & Ingestion │
71 │ ├─ Real-time Streaming (Change Data Capture) │
72 │ ├─ Batch Import (scheduled/on-demand) │
73 │ └─ Zero Copy (Snowflake, Databricks, BigQuery) │
74 └────────────────────────┬─────────────────────────────┘
75 │
76 ┌────────────────────────▼─────────────────────────────┐
77 │ Data Model & Harmonization │
78 │ ├─ Map to Common Data Model (DMO objects) │
79 │ ├─ Identity Resolution (match & merge) │
80 │ └─ Data Transformation (calculated insights) │
81 └────────────────────────┬─────────────────────────────┘
82 │
83 ┌────────────────────────▼─────────────────────────────┐
84 │ Unified Customer Profile (360° View) │
85 │ ├─ Demographics, Transactions, Behavior, Events │
86 │ └─ Real-time Profile API for instant access │
87 └────────────────────────┬─────────────────────────────┘
88 │
89 ┌────────────────────────▼─────────────────────────────┐
90 │ Activation & Actions │
91 │ ├─ Salesforce Flow (real-time automation) │
92 │ ├─ Marketing Cloud (segmentation/journeys) │
93 │ ├─ Agentforce (AI agents) │
94 │ ├─ Einstein AI (predictions/recommendations) │
95 │ └─ External Systems (reverse ETL) │
96 └──────────────────────────────────────────────────────┘
97```
98
99## Core Workflow
100
1011. **Identify use case** — Ingestion, identity, segmentation, activation, or unstructured/AI search? Pick the matching reference.
1022. **Map data sources** — CRM CDC (real-time), external batch (S3/SFTP), or warehouse Zero Copy.
1033. **Define DMOs and matching** — Map source fields to Data Model Objects; configure identity resolution match + reconciliation rules.
1044. **Build insights / segments** — Calculated insights for KPIs (LTV, churn risk); segments for activation targets.
1055. **Activate** — Flow / Platform Events / Agentforce actions / Reverse ETL data actions.
1066. **Validate** — Use Data Cloud SQL workbench, check sync logs, monitor identity resolution metrics.
107
108## Best Practices
109
110### Performance
111- **Use Zero Copy** for large datasets (>10M records)
112- **Batch imports** outside business hours
113- **Index frequently queried fields** in Data Cloud
114- **Limit real-time triggers** to critical events
115- **Cache unified profiles** when possible
116
117### Security
118- **Field-level security** applies to Data Cloud queries from Salesforce
119- **Data masking** for PII in non-production environments
120- **Encryption at rest** and in transit (TLS 1.2+)
121- **Audit logging** for all data access
122- **Role-based access control** (RBAC) for Data Cloud users
123
124### Data Quality
125- **Data validation** before ingestion
126- **Deduplication rules** at source and in Data Cloud
127- **Data lineage tracking** (know source of each field)
128- **Quality scores** for unified profiles
129- **Regular data audits** and cleansing
130
131## Resources
132
133- **Data Cloud Documentation:** https://developer.salesforce.com/docs/data/data-cloud-int/guide
134- **Zero Copy Partner Network:** https://www.salesforce.com/data/zero-copy/
135- **Data Cloud Pricing:** Part of Customer 360 platform, usage-based pricing
136- **Trailhead:** "Data Cloud Basics" and "Data Cloud for Developers"