This repository contains a lightweight Databricks / PySpark notebook that demonstrates how customer segmentation models can be operationalized within Salesforce Data Cloud and Agentforce.
A marketing team wants to identify high-value and at-risk customers using transaction data processed in Databricks.
The enriched dataset is exported to Salesforce Data Cloud for downstream activation in CRM Analytics and Agentforce.
Databricks (PySpark DataFrames) β Feature Engineering β Segment CSV β Salesforce Data Cloud (DMO) β CRM Analytics β Agentforce Actions
| Path | Description | 
|---|---|
notebooks/segmentation_notebook.ipynb | 
Jupyter/Databricks notebook that computes customer RFM-style segments | 
data/sample_transactions.csv | 
Synthetic dataset for demo | 
images/architecture_diagram.png | 
Visualization of architecture | 
docs/demo_story.md | 
Full enablement context and storytelling guide | 
- Load sample transactions in Databricks or local PySpark.
 - Aggregate by customer and compute metrics (total spend, recency, frequency).
 - Label segments (High/Medium/Low value).
 - Export results as 
segments.csv. - Ingest into Salesforce Data Cloud and visualize in CRM Analytics.
 
- Shows integration of external AI/ML pipelines with Data Cloud.
 - Demonstrates how DataFrames (PySpark/pandas) fit into Salesforce architecture.
 - Storytelling bridge for SEs: external data β unified Data Cloud profile β AI-driven actions.
 
Salesforce Solution Engineers, Data Cloud & AI practitioners, and community learners building Data CloudβAI demo flows.
MIT Β© Lakshmi Achary
(Sample enablement demo β not affiliated with Salesforce.)