Model Builder, part of Einstein Copilot Studio, is a user-friendly platform that enables you to create and operationalize AI models in Salesforce. Model Builder is capable of deeply integrating with external AI platforms, such as Google Cloud Vertex AI and Amazon SageMaker, so you can build, train, and deploy custom AI models externally using data from Salesforce Data Cloud.
Salesforce previously announced the launch of Model Builder with Amazon SageMaker in August 2023. Today, we are happy to announce that Google Vertex AI models are now generally available in Model Builder. As part of this latest release, Model Builder now supports authentication using Google Service account credentials as well as streaming ingestion of data.
We are excited about this new innovation from Salesforce’s expanded partnership with Google Cloud, which we see as having huge potential for developers. As Kaushal Kurapati, Senior Vice President of Product, AI, and Search at Salesforce emphasized:
“With this partnership with Google Cloud, Model Builder offers a convenient way for customers to leverage their Vertex AI models across their Salesforce data sources, workflows, and applications and deliver personalized experiences, continuing on the vision to build out an open Salesforce AI platform with a robust model ecosystem.”
What is a bring your own model (BYOM) capability?
Model Builder lets you easily connect to external predictive models, such as from a third-party model provider or your own proprietary model, and use them in the flow of work across Salesforce. For example, you can use predictive models to score leads, recommend products, or detect churn.
Model Builder’s BYOM capability allows you to easily integrate your model with Data Cloud to access real-time predictions and insights, and use those insights in various ways, like enriching customer profiles, creating segments, and customizing the end-user experience across different channels.
Why bring your own model to Data Cloud?
Here are some benefits of using a Google Cloud Vertex AI model with data from Data Cloud in Model Builder:
- Gives you access to highly curated, harmonized, and near real-time data across Customer 360, in Vertex AI
- Eliminates tedious, costly, and error-prone ETL jobs; the zero-copy federation approach to data reduces the overhead of managing data copies, and storage costs, and improves efficiencies
- Enables you to build, train, test, and tune models quickly on a single platform and connect them with Data Cloud
- Supports real-time, streaming, and batch ingestion of data to fuel relevant AI outputs
- Leverages Vertex AI predictions to automate business processes in Salesforce Data Cloud with Flow and Apex
To learn more, watch our short video.
Application workflow for using Model Builder with Google Cloud’s Vertex AI
In this section, we briefly discuss the application workflow using Model Builder.
In the workflow pictured above, the Python connector gives Vertex AI secure access to Salesforce Data Cloud objects. After authentication, data specialists can explore and prepare data, and perform feature engineering tasks for AI model development and inference using the Vertex AI platform.
Please note that if an API key-based authentication is being performed, an API gateway is needed in front of the Vertex AI endpoint.
NEW feature: Authentication using Google Service account credentials
The newest release of Model Builder now allows Google Service account credentials to be used for authentication. This adds to the existing key-based and JWT authentication methods. To use a JWT bearer token flow, enter your service account email, private key ID, and private key from your Google Cloud account as shown below.
NEW feature: Streaming ingestion of data
The latest release of Model Builder allows you to automatically trigger an inference when data mapped to the model input variable is changed in the source data model object (DMO). We also offer batch inference, but you need to click the Refresh button manually to trigger new inferences. With streaming inference, new inferences are triggered only when there is a change to the input variable.
To enable streaming inference, you will need to check the Yes checkbox under Update model when data is updated? as shown below.
You can also specify which of the input features need to be refreshed by choosing Yes in the Refresh Score dropdown menu.
How to consume predictions from your model in Salesforce
There are two ways to consume predictions: using invocable actions in Flow and Apex, or using Query API to perform ad hoc analysis.
Use Flow Builder and Apex to get predictions
Here is an example of how to use invocable actions for Model Builder models in Flow. Once you have a model activated in Model Builder, select New Action → Data Cloud and then click on the desired model name.
The screenshot below shows an example flow that uses an invocable action to create product recommendations for a customer. Here, an admin uses Flow Builder to loop through Unified Individual records to check if a recent purchase happened. If the purchase was made, the invocable action gets the model inference from Model Builder and recommends the next best product to a customer.
This invocable action can also be called in Apex. See the example below.
For instructions on using invocable actions in Flow and Apex, check out Salesforce Help.
Use Query API to get predictions
Query API is another quick way to get prediction scores for data that resides in Data Cloud. With the Query API, you can use the inference endpoint and call prediction functions to test the endpoint. See the example below.
For instructions about using invocable actions in QueryAPI, check out Salesforce Help.
Model Builder is an easy-to-use AI platform that enables data science and engineering teams to build, train, and deploy AI models using external platforms and data in Data Cloud. External platforms include Google Cloud Vertex AI, Amazon SageMaker, and other predictive or generative AI services. Once ready, you can use the AI models in real time to power any sales, service, marketing, commerce, and other applications in Salesforce.
To learn more about how you can elevate your AI strategy using Model Builder, attend our free webinar with AI experts from Salesforce and Google Cloud.
- Model Builder Release Notes
- Model Builder release with Amazon SageMaker
- Model Builder Help documentation
- Newsroom BYOM release announcement
- To learn more about Generative AI and large language models (LLMs), check out posts on the Salesforce 360 blog and Salesforce Developers blog.
About the authors
Daryl Martis is the Director of Product at Salesforce for Einstein. He has over 10 years of experience in planning, building, launching, and managing world-class solutions for enterprise customers, including AI/ML and cloud solutions. Follow him on LinkedIn or Twitter.