What You'll Learn
The NBA architecture: recommendation strategies, action flows, the Einstein NBA LWC component, the optional predictive model layer, where NBA succeeds in the real world, and where it underwhelms relative to the marketing narrative.
What Einstein Next Best Action Actually Is
Einstein Next Best Action (NBA) is a declarative recommendation engine embedded on Salesforce record pages. It surfaces contextual recommendations to agents and sales reps — "Offer the customer the premium upgrade," "Escalate this case to a specialist," "Follow up with this lead today" — based on rules, predictive models, or a combination of both.
The name includes "Einstein" which implies AI, and AI is optional — the core system is a rules engine. Many successful NBA deployments use zero machine learning. The "predictive" layer (Einstein Prediction Builder integration) is an optional enhancement that ranks recommendations based on likelihood of acceptance, but it requires sufficient historical data to train the model.
Architecture: The Three Layers
Layer 1 — Recommendations: Each recommendation is a Salesforce record (on the Recommendation object) with a name, description, image, and action link. Think of recommendations as product offerings, suggested actions, or service offerings. They are the "what" — what should the agent offer or do.
Layer 2 — Strategy: A recommendation strategy (built in the Strategy Builder or via Apex) defines the eligibility rules — which recommendations are relevant for the current record, in what order, and how many to show. The strategy is the "when" — when should this recommendation appear.
Layer 3 — Action Flow: Each recommendation can link to a Salesforce Flow that guides the agent through fulfilling the recommendation. A "Upsell Premium" recommendation might trigger a Flow that captures the customer's response, updates the Opportunity, and sends a follow-up email. The action flow is the "how" — how does the agent complete the action.
// Recommendation strategy (Apex-based)
public class UpsellStrategy implements ConnectApi.RecommendationStrategy {
public ConnectApi.RecommendationStrategyResult evaluate(
ConnectApi.RecommendationContext context) {
List<ConnectApi.Recommendation> recs = new List<ConnectApi.Recommendation>();
// Rule: Only show upsell if customer is on basic plan
if (context.contextMap.get('Plan__c') == 'Basic') {
ConnectApi.Recommendation r = new ConnectApi.Recommendation();
r.name = 'Upgrade to Premium';
r.description = 'Customer has been on Basic for 12+ months';
r.acceptanceLabel = 'Offer Upgrade';
r.rejectionLabel = 'Not Now';
recs.add(r);
}
// Rule: Show retention offer if at-risk
if (Decimal.valueOf(context.contextMap.get('ChurnScore__c')) > 0.7) {
ConnectApi.Recommendation r = new ConnectApi.Recommendation();
r.name = 'Retention Offer';
r.description = 'High churn risk — offer loyalty discount';
r.acceptanceLabel = 'Apply Offer';
recs.add(r);
}
ConnectApi.RecommendationStrategyResult result =
new ConnectApi.RecommendationStrategyResult();
result.recommendations = recs;
return result;
}
}The Predictive Layer: Einstein Prediction Builder Integration
When a predictive model is attached to a strategy, NBA uses the model's output (a probability score) to rank recommendations. Instead of showing all eligible recommendations in static order, NBA shows the recommendations most likely to be accepted first.
Requirements for the predictive layer:
- At minimum 1,000 historical acceptance/rejection records for the recommendation type (Einstein's minimum training data threshold)
- Einstein Prediction Builder licence or Einstein for Service/Sales licence
- Consistent feedback capture — agents must actually click Accept/Reject for the model to learn
In practice, the predictive layer is useful for high-volume customer service or inside sales scenarios where thousands of interactions occur daily. For lower-volume use cases, the training data is insufficient for reliable predictions and rule-based ranking works better.
Where NBA Delivers Value vs Where It Disappoints
NBA works well when:
- The recommendation logic maps cleanly to Salesforce field values (plan type, tenure, churn score, account tier)
- Agents have clear actions to take from the recommendation (the flow is short and the outcome is measurable)
- There are 5-20 distinct recommendation types — enough variety to be useful, few enough to manage
NBA disappoints when:
- Recommendation logic requires external data not in Salesforce — the strategy cannot access it without custom Apex
- The organisation has no feedback loop — agents who don't click Accept/Reject provide no signal for improvement
- Recommendations are too generic — "Follow up with customer" without context is useless
- The product catalogue changes rapidly — recommendation records need manual updates when offerings change
Key Takeaways
- Einstein NBA is primarily a rules engine — the "Einstein" / AI layer is optional and requires substantial historical data.
- Three layers: Recommendations (what), Strategy (when/who), Action Flow (how the agent completes it).
- Strategy Builder handles most cases declaratively; Apex strategies are needed for complex logic or external data.
- The predictive layer requires 1,000+ historical acceptance records and consistent agent feedback capture to work reliably.
- Start with 3-5 high-impact recommendations and measure acceptance rates before expanding.
- NBA disappoints when recommendations are generic or when the logic requires data that lives outside Salesforce.
Check Your Understanding
1. A contact centre wants to deploy Einstein NBA with predictive ranking. They have 6 months of data with approximately 150 recommendation interactions. Will the predictive model work reliably?
2. Which NBA layer defines who sees a recommendation and under what conditions?
3. The NBA eligibility logic needs to call an external API to check a customer's loyalty tier. Which strategy type handles this?
Discussion & Feedback