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.4---56# Einstein AI for Salesforce Commerce78## Before Writing Code910**Fetch live docs before implementing Einstein AI features.**11121. Web-search: "Salesforce Commerce Cloud Einstein Recommendations API 2026"132. Web-search: "Salesforce Einstein Search dictionaries relevance tuning 2026"143. Web-search: "Salesforce Data Cloud B2C Commerce personalization 2026"154. Web-search: "Salesforce Commerce Cloud PWA Kit Einstein recommendations 2026"165. Web-fetch the Einstein Recommendations API reference for current configuration parameters176. Web-fetch Data Cloud connector setup and unified profile schema docs1819## Conceptual Architecture2021### Einstein Recommendations2223**Recommender Types:**2425| Type | Description | Typical Placement |26|---|---|---|27| Product-to-Product | Similar or complementary items (cross-sell) | PDP |28| Recently Viewed | User's browsing history | Homepage, category |29| Also Bought | Products frequently purchased together | Cart, PDP |30| Trending | Popular items across all users | Homepage, category |31| Top Sellers | Best-selling products by category/site | Homepage, category |32| Personalized | ML-driven per-user recommendations | Homepage (returning users) |3334**Recommender Configuration (Business Manager):**35- Create recommenders with specific types and filtering rules36- Configure zone placement (homepage, PDP, cart, category page)37- Set filtering: exclude out-of-stock, price range limits, category restrictions38- Map recommendation zones to recommenders3940**Activity Collection:**4142Einstein 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.4344> **Warning:** The `_etmc` beacon pattern is for Marketing Cloud Einstein, not Commerce Cloud Einstein. Do not confuse the two.4546**Recommendation Zones:**47- Define placement areas on storefront pages48- Map zones to recommenders in Business Manager49- Customize rendering per zone (carousel, grid, list)5051### Einstein Predictive Sort5253Personalized category page sorting powered by ML.5455| Aspect | Detail |56|---|---|57| Input | User behavior (clicks, purchases, browse history) |58| Output | Per-user product ranking on category pages |59| Fallback | Default sorting for new / anonymous users |60| Config | Per-category toggle in Business Manager |6162### Einstein Search6364**Search Dictionaries:**6566| Dictionary Type | Purpose | Example |67|---|---|---|68| Synonyms | Map equivalent terms | sneakers -> running shoes |69| Hypernyms | Broader category terms | iPhone -> smartphone |70| Compound Words | Multi-word phrases | ice cream, swimming pool |7172**Search Relevance Tuning:**73- Boost or bury specific products in search results74- Configured per site/locale in Business Manager75- Sorting rules: relevance, price, newest, custom7677**Typeahead Suggestions:**78- Search-as-you-type with phrase suggestions and hit counts79- Configured via Business Manager search settings8081### Data Cloud Personalization8283**Integration Architecture:**8485```86B2C Commerce -> Data Cloud Connector -> Unified Profile87 -> Segmentation + ML Models (Einstein)88 -> Personalized Recommendations / Content89 -> Commerce Storefront (SFRA / PWA Kit)90```9192**Key Concepts:**93- Aggregates data from Commerce Cloud, Service Cloud, Marketing Cloud into unified profiles94- Real-time profile updates via Data Cloud connector95- Segment membership drives personalized content and recommendations96- Cross-channel offer consistency based on unified customer view9798**Data Cloud vs Commerce Cloud Einstein:**99100| Aspect | Commerce Cloud Einstein | Data Cloud Personalization |101|---|---|---|102| Data source | Commerce activity only | Cross-cloud unified profile |103| Setup | Business Manager config | Data Cloud connector + config |104| Segments | Implicit (ML-driven) | Explicit (rule-based + ML) |105| Best for | Product recommendations | Cross-channel personalization |106107**Zone Placement Strategy:**108109| Page | Recommended Zones |110|---|---|111| Homepage | Trending + personalized (returning users) |112| PDP | Similar products + complementary items (cross-sell) |113| Cart | Cross-sell + upsell opportunities |114| Category | Predictive sort + trending in category |115| Search Results | Einstein-ranked results |116117## Code Examples118119```javascript120// Pattern: SFRA recommendation zone121// Fetch live docs for Einstein Recommendations API122var recs = einsteinAPI.getRecommendations(zone, customer);123// Render recs in ISML template124```125126```javascript127// Pattern: PWA Kit recommendations hook128// Fetch live docs for commerce-sdk-react useRecommendations129const {data} = useRecommendations({recommenderName, products});130```131132```javascript133// Pattern: Fallback when Einstein unavailable134// Fetch live docs for CacheMgr and fallback strategies135// try Einstein -> catch -> return getTopSellers(zone)136```137138## Best Practices139140### Activity Collection141- Configure activity tracking before enabling recommendations (minimum 2-4 weeks of data)142- Track all key events: views, add-to-cart, purchases, search queries143- Validate tracking via Einstein Activity Dashboard144145### Performance146- Cache recommendations (5-15 min TTL) to reduce API calls147- Lazy-load recommendation zones below the fold148- Limit number of products per zone (8-12 typical)149150### Privacy and Consent151- Respect customer privacy preferences (GDPR, CCPA)152- Allow opt-out from personalized recommendations153- Implement clear data retention and right-to-be-forgotten policies154155### Rollout Strategy156- Start with one high-traffic zone (homepage); monitor 2-4 weeks157- A/B test Einstein vs. manual curation or top-sellers fallback158- Track CTR, conversion rate, revenue attribution per zone159- Gradually expand to PDP, category, cart after proven ROI160161Fetch the Einstein Recommendations API reference and Data Cloud connector docs for exact configuration parameters and SDK versions before implementing.