For a scalable Visit Recommendation strategy, Salesforce recommends implementing the selection logic through an Apex class. Visit Recommendations can use programmable logic to determine which stores should receive recommendations based on organization-specific criteria, and Apex is appropriate when the strategy must operate at business scale.
Salesforce allows an Apex class to select the stores for which Einstein should provide Visit Recommendations. The Apex method is exposed to automation by using @InvocableMethod, after which the class can be invoked from the Visit Recommendation strategy or from an autolaunched flow.
Salesforce also supports a Flow strategy for Visit Recommendations, but its documentation specifically notes that the flow-only method is not scalable for a business use case and recommends using Apex for scalable implementations. An Apex implementation gives developers greater control over bulk processing, complex filtering, reusable business logic, and Salesforce governor-limit considerations.
The strategy can return the recommended Store IDs and recommendation reasons so sales managers and field representatives understand both which stores should be visited and why those stores have been prioritized.
Workflow and Process Builder are not the architecture Salesforce defines for this Visit Recommendation capability.
Study Guide Topics:Visit Planning - > Einstein Visit Recommendations - > Apex - > Invocable Methods - > Scalable Recommendation Strategies
===============
Submit