Einstein AI for Salesforce Commerce
Before Writing Code
Fetch live docs before implementing Einstein AI features.
- Web-search: "Salesforce Commerce Cloud Einstein Recommendations API 2026"
- Web-search: "Salesforce Einstein Search dictionaries relevance tuning 2026"
- Web-search: "Salesforce Data Cloud B2C Commerce personalization 2026"
- Web-search: "Salesforce Commerce Cloud PWA Kit Einstein recommendations 2026"
- Web-fetch the Einstein Recommendations API reference for current configuration parameters
- Web-fetch Data Cloud connector setup and unified profile schema docs
Conceptual Architecture
Einstein Recommendations
Recommender Types:
| Type |
Description |
Typical Placement |
| Product-to-Product |
Similar or complementary items (cross-sell) |
PDP |
| Recently Viewed |
User's browsing history |
Homepage, category |
| Also Bought |
Products frequently purchased together |
Cart, PDP |
| Trending |
Popular items across all users |
Homepage, category |
| Top Sellers |
Best-selling products by category/site |
Homepage, category |
| Personalized |
ML-driven per-user recommendations |
Homepage (returning users) |
Recommender Configuration (Business Manager):
- Create recommenders with specific types and filtering rules
- Configure zone placement (homepage, PDP, cart, category page)
- Set filtering: exclude out-of-stock, price range limits, category restrictions
- Map recommendation zones to recommenders
Activity Collection:
Einstein activity tracking uses a collect.js library loaded on storefront pages. It automatically captures product views, add-to-cart, purchases, and search events. Configured via Business Manager > Einstein > Activity Tracking.
Warning: The _etmc beacon pattern is for Marketing Cloud Einstein, not Commerce Cloud Einstein. Do not confuse the two.
Recommendation Zones:
- Define placement areas on storefront pages
- Map zones to recommenders in Business Manager
- Customize rendering per zone (carousel, grid, list)
Einstein Predictive Sort
Personalized category page sorting powered by ML.
| Aspect |
Detail |
| Input |
User behavior (clicks, purchases, browse history) |
| Output |
Per-user product ranking on category pages |
| Fallback |
Default sorting for new / anonymous users |
| Config |
Per-category toggle in Business Manager |
Einstein Search
Search Dictionaries:
| Dictionary Type |
Purpose |
Example |
| Synonyms |
Map equivalent terms |
sneakers -> running shoes |
| Hypernyms |
Broader category terms |
iPhone -> smartphone |
| Compound Words |
Multi-word phrases |
ice cream, swimming pool |
Search Relevance Tuning:
- Boost or bury specific products in search results
- Configured per site/locale in Business Manager
- Sorting rules: relevance, price, newest, custom
Typeahead Suggestions:
- Search-as-you-type with phrase suggestions and hit counts
- Configured via Business Manager search settings
Data Cloud Personalization
Integration Architecture:
B2C Commerce -> Data Cloud Connector -> Unified Profile
-> Segmentation + ML Models (Einstein)
-> Personalized Recommendations / Content
-> Commerce Storefront (SFRA / PWA Kit)
Key Concepts:
- Aggregates data from Commerce Cloud, Service Cloud, Marketing Cloud into unified profiles
- Real-time profile updates via Data Cloud connector
- Segment membership drives personalized content and recommendations
- Cross-channel offer consistency based on unified customer view
Data Cloud vs Commerce Cloud Einstein:
| Aspect |
Commerce Cloud Einstein |
Data Cloud Personalization |
| Data source |
Commerce activity only |
Cross-cloud unified profile |
| Setup |
Business Manager config |
Data Cloud connector + config |
| Segments |
Implicit (ML-driven) |
Explicit (rule-based + ML) |
| Best for |
Product recommendations |
Cross-channel personalization |
Zone Placement Strategy:
| Page |
Recommended Zones |
| Homepage |
Trending + personalized (returning users) |
| PDP |
Similar products + complementary items (cross-sell) |
| Cart |
Cross-sell + upsell opportunities |
| Category |
Predictive sort + trending in category |
| Search Results |
Einstein-ranked results |
Code Examples
// Pattern: SFRA recommendation zone
// Fetch live docs for Einstein Recommendations API
var recs = einsteinAPI.getRecommendations(zone, customer);
// Render recs in ISML template
// Pattern: PWA Kit recommendations hook
// Fetch live docs for commerce-sdk-react useRecommendations
const {data} = useRecommendations({recommenderName, products});
// Pattern: Fallback when Einstein unavailable
// Fetch live docs for CacheMgr and fallback strategies
// try Einstein -> catch -> return getTopSellers(zone)
Best Practices
Activity Collection
- Configure activity tracking before enabling recommendations (minimum 2-4 weeks of data)
- Track all key events: views, add-to-cart, purchases, search queries
- Validate tracking via Einstein Activity Dashboard
Performance
- Cache recommendations (5-15 min TTL) to reduce API calls
- Lazy-load recommendation zones below the fold
- Limit number of products per zone (8-12 typical)
Privacy and Consent
- Respect customer privacy preferences (GDPR, CCPA)
- Allow opt-out from personalized recommendations
- Implement clear data retention and right-to-be-forgotten policies
Rollout Strategy
- Start with one high-traffic zone (homepage); monitor 2-4 weeks
- A/B test Einstein vs. manual curation or top-sellers fallback
- Track CTR, conversion rate, revenue attribution per zone
- Gradually expand to PDP, category, cart after proven ROI
Fetch the Einstein Recommendations API reference and Data Cloud connector docs for exact configuration parameters and SDK versions before implementing.
1---2name: sf-einstein3description: Implement Einstein AI for Salesforce Commerce — Einstein Recommendations (product-to-product, user-to-product, trending), predictive sort, search ranking, Einstein Search Dictionaries, and Data Cloud personalization. Use when adding AI-powered features to commerce storefronts.4allowed-tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch5metadata:6 source: https://skillmd.com/skills/orcaqubits/sf-einstein7---89# Einstein AI for Salesforce Commerce1011## Before Writing Code1213**Fetch live docs before implementing Einstein AI features.**14151. Web-search: "Salesforce Commerce Cloud Einstein Recommendations API 2026"162. Web-search: "Salesforce Einstein Search dictionaries relevance tuning 2026"173. Web-search: "Salesforce Data Cloud B2C Commerce personalization 2026"184. Web-search: "Salesforce Commerce Cloud PWA Kit Einstein recommendations 2026"195. Web-fetch the Einstein Recommendations API reference for current configuration parameters206. Web-fetch Data Cloud connector setup and unified profile schema docs2122## Conceptual Architecture2324### Einstein Recommendations2526**Recommender Types:**2728| Type | Description | Typical Placement |29|---|---|---|30| Product-to-Product | Similar or complementary items (cross-sell) | PDP |31| Recently Viewed | User's browsing history | Homepage, category |32| Also Bought | Products frequently purchased together | Cart, PDP |33| Trending | Popular items across all users | Homepage, category |34| Top Sellers | Best-selling products by category/site | Homepage, category |35| Personalized | ML-driven per-user recommendations | Homepage (returning users) |3637**Recommender Configuration (Business Manager):**38- Create recommenders with specific types and filtering rules39- Configure zone placement (homepage, PDP, cart, category page)40- Set filtering: exclude out-of-stock, price range limits, category restrictions41- Map recommendation zones to recommenders4243**Activity Collection:**4445Einstein activity tracking uses a `collect.js` library loaded on storefront pages. It automatically captures product views, add-to-cart, purchases, and search events. Configured via Business Manager > Einstein > Activity Tracking.4647> **Warning:** The `_etmc` beacon pattern is for Marketing Cloud Einstein, not Commerce Cloud Einstein. Do not confuse the two.4849**Recommendation Zones:**50- Define placement areas on storefront pages51- Map zones to recommenders in Business Manager52- Customize rendering per zone (carousel, grid, list)5354### Einstein Predictive Sort5556Personalized category page sorting powered by ML.5758| Aspect | Detail |59|---|---|60| Input | User behavior (clicks, purchases, browse history) |61| Output | Per-user product ranking on category pages |62| Fallback | Default sorting for new / anonymous users |63| Config | Per-category toggle in Business Manager |6465### Einstein Search6667**Search Dictionaries:**6869| Dictionary Type | Purpose | Example |70|---|---|---|71| Synonyms | Map equivalent terms | sneakers -> running shoes |72| Hypernyms | Broader category terms | iPhone -> smartphone |73| Compound Words | Multi-word phrases | ice cream, swimming pool |7475**Search Relevance Tuning:**76- Boost or bury specific products in search results77- Configured per site/locale in Business Manager78- Sorting rules: relevance, price, newest, custom7980**Typeahead Suggestions:**81- Search-as-you-type with phrase suggestions and hit counts82- Configured via Business Manager search settings8384### Data Cloud Personalization8586**Integration Architecture:**8788```89B2C Commerce -> Data Cloud Connector -> Unified Profile90 -> Segmentation + ML Models (Einstein)91 -> Personalized Recommendations / Content92 -> Commerce Storefront (SFRA / PWA Kit)93```9495**Key Concepts:**96- Aggregates data from Commerce Cloud, Service Cloud, Marketing Cloud into unified profiles97- Real-time profile updates via Data Cloud connector98- Segment membership drives personalized content and recommendations99- Cross-channel offer consistency based on unified customer view100101**Data Cloud vs Commerce Cloud Einstein:**102103| Aspect | Commerce Cloud Einstein | Data Cloud Personalization |104|---|---|---|105| Data source | Commerce activity only | Cross-cloud unified profile |106| Setup | Business Manager config | Data Cloud connector + config |107| Segments | Implicit (ML-driven) | Explicit (rule-based + ML) |108| Best for | Product recommendations | Cross-channel personalization |109110**Zone Placement Strategy:**111112| Page | Recommended Zones |113|---|---|114| Homepage | Trending + personalized (returning users) |115| PDP | Similar products + complementary items (cross-sell) |116| Cart | Cross-sell + upsell opportunities |117| Category | Predictive sort + trending in category |118| Search Results | Einstein-ranked results |119120## Code Examples121122```javascript123// Pattern: SFRA recommendation zone124// Fetch live docs for Einstein Recommendations API125var recs = einsteinAPI.getRecommendations(zone, customer);126// Render recs in ISML template127```128129```javascript130// Pattern: PWA Kit recommendations hook131// Fetch live docs for commerce-sdk-react useRecommendations132const {data} = useRecommendations({recommenderName, products});133```134135```javascript136// Pattern: Fallback when Einstein unavailable137// Fetch live docs for CacheMgr and fallback strategies138// try Einstein -> catch -> return getTopSellers(zone)139```140141## Best Practices142143### Activity Collection144- Configure activity tracking before enabling recommendations (minimum 2-4 weeks of data)145- Track all key events: views, add-to-cart, purchases, search queries146- Validate tracking via Einstein Activity Dashboard147148### Performance149- Cache recommendations (5-15 min TTL) to reduce API calls150- Lazy-load recommendation zones below the fold151- Limit number of products per zone (8-12 typical)152153### Privacy and Consent154- Respect customer privacy preferences (GDPR, CCPA)155- Allow opt-out from personalized recommendations156- Implement clear data retention and right-to-be-forgotten policies157158### Rollout Strategy159- Start with one high-traffic zone (homepage); monitor 2-4 weeks160- A/B test Einstein vs. manual curation or top-sellers fallback161- Track CTR, conversion rate, revenue attribution per zone162- Gradually expand to PDP, category, cart after proven ROI163164Fetch the Einstein Recommendations API reference and Data Cloud connector docs for exact configuration parameters and SDK versions before implementing.