Enhance workflows with Einstein Copilot's real-time insights

Enhance Workflows with Einstein Copilot’s Real-Time Insights

By

Einstein Copilot is Salesforce’s artificial intelligence (AI) assistant ready to help admins empower their users to get work done faster. It comes with key capabilities out of the box and can be customized and extended to your needs. Learn more about how you can use this tool in our recent post, Get to Know Einstein Copilot.

A common use case is getting Einstein Copilot to provide real-time, actionable insights. Your knowledge of your org’s processes is the key to leveraging Copilot’s functionalities. Imagine your users are browsing an opportunity and they want to know how likely they are to close it so they can prioritize their time. Or, they might be looking at some leads and trying to figure out if they’ll convert or not.

With Einstein Copilot custom actions, you can enable your users to receive that information directly within their workflows, empowering them to make informed decisions and take proactive measures.

Define your use case

To get started, you must define your use case. Are you looking to predict the win rate of an opportunity? The conversion rate for a lead? Maybe create customer segments for marketing? In order for Copilot to surface real-time insights, you’ll need to first train and create a predictive model. Your use case will inform the data you need to prepare for it.

Here at Salesforce, we have two ways of creating a model: our no-code Model Builder and our bring-your-own-model option. 

We’ll focus on our no-code option here. This is a quick, low-friction way of creating models for deployment. It supports binary classification and regression models, and it’s a fast and easy way for anyone to onboard onto model building.

You can read about the Bring Your Own Model (BYOM) option in the Resources section at the end of this post.

Prepare your data

The key to a good model is good data. First, ensure that you have a sufficient and organized amount of data; this is what your model will be trained on. With this data, your model can recognize patterns and trends that enable it to make informed predictions in real life. Luckily, with Data Cloud, we have a centralized way to ingest and prepare data for model building. 

Start by ingesting your desired data as a data stream. In Data Cloud, select the Data Streams tab and click New. You can ingest Salesforce objects or external data.

Data Streams section of Data Cloud showing list of data streams.

Next, map your data to a data model object (DMO). By doing so, you make your data recognizable to the Salesforce ecosystem. If you leave your data unmapped, you won’t be able to leverage it.

Data Cloud DMO mapping page showing a data lake object being mapped to a DMO.

After mapping your data, you’re ready to move on to preparing your model.

Prepare your model

Select the Einstein Studio tab. From there, click Add Predictive Model to launch into Model Builder.

Einstein Studio section of Data Cloud showing button to Add Predictive Model.

Choose the no-code model option and click Next.

Model Builder page showing choice to create a model from scratch or connect an external model.

Select the DMO that you just created. This will be the data your model is trained on.

Model Builder page showing data space and DMO choice for model training.

You also have options to filter or choose all of that data for your model.

Model Builder page showing ability to filter down records for model training.

Next, set the goal for your model. Think of this as what you want your model to predict.

Model Builder page showing ability to set which field the model should predict and set the goal of prediction.

You can also choose if you want to include all variables or just a subset of them in your model. This can be helpful if you don’t want to take some variables into consideration.

Model Builder page showing ability to choose variables needed for model training.

Copilot will suggest the right algorithm for your model, but you also have the option to choose your own.

Model Builder page showing ability to choose the algorithm for model training.

Click Next, then Save. Now, you can start training your model!

Activate your model 

Once your model is trained, don’t immediately activate it. A good model depends on good data, and this step will tell you if there are any data issues you should be aware of. 

On the model details page, click View Training Metrics to launch Model Builder again. Here, you’ll see a robust set of training metrics that provide more information on your data and your model performance.

Model Builder training metrics page showing metrics such as AUC, prediction frequencies, threshold, F1 score, etc.

Not sure what some of the metrics mean? Don’t worry, hover over the ℹ symbol for more information. You can also be assured that if there are major issues in model accuracy, Model Builder will flag it to you.

If everything looks good, go to the top right and click to Activate the model.

Create an invocable action

Now that you have a predictive model, you can have Copilot apply that model conversationally to provide real-time insights. 

You can do this with a flow. First, launch the Flow Builder interface and create an autolaunched flow. Let’s use the example of getting the win rate of an opportunity.

Flow Builder showing Autolaunched Flow start node.

Your first node will be a Get Records element. This node will retrieve what Copilot will look at to provide a prediction. For example, if you want Copilot to provide the likelihood of winning an opportunity, you want this Get Records element to get an opportunity record. Make sure to describe what the input is.

Flow Builder showing Get Records element that retrieves Opportunity object.

Your second node will be a Data Cloud action. From Action, choose Data Cloud Action, then look for the name of the predictive model you created. After selecting that model, make sure you map the model inputs to fields on the record from the first node. This is very important because you want the model to look at the right fields before making a prediction.

Flow Builder showing Action node that maps object fields to input fields for a predictive model.

Your third node will be an Assignment element, where you assign the output of the previous node to the overall flow output. Make sure to describe what the output is.

Flow Builder showing Assignment element that provides prediction output.

Lastly, click Save and give your flow a description. In three nodes, you’ve set up your invocable action.

Save the flow page showing Flow Label, Flow API Name, and Description fields.

Create a copilot custom action

This is the last step! Go to Setup and search for “Einstein Copilot Actions”. From there, create a new action. 

Choose Flow as your Reference Action Type and select the name of the flow you just created.

Create a Copilot Action page showing Reference Action, Copilot Action Label, and Copilot Action API Name fields.

If you populated descriptions for your flow, you’ll notice that it auto-populates your action descriptions as well, saving you extra steps! If you haven’t populated them, it’s time to populate your action descriptions here.

Create a Copilot Action page where Copilot Action Instructions, Input, and Output are populated.

Create and test your action in Copilot Builder, then click Assign to Copilot and Activate.

Copilot Builder interface; new copilot action is available in Action Library.

Now, Copilot can provide real-time, in-context insights to you and your users.

Salesforce org with Copilot panel open on Opportunity object; Copilot provides win rate of opportunity.

Explore the extended possibilities

We just covered one use case today, but with all our platform tools, there are infinite possibilities for leveraging Einstein Copilot! The more invocable actions you create, the more custom actions you can create, and the more robust your copilot can be. 

What will you do with Einstein Copilot? We can’t wait to see! 

Resources

Help sellers succeed with Sales Cloud Pipeline Inspection

Help Sellers Succeed with Sales Cloud Pipeline Inspection

In today’s fast-paced world, it’s harder than ever to stay on top of everything happening in your business. Managers and sellers constantly juggle multiple priorities, jumping from prospect meetings to pipeline reviews and forecast calls, and need to react quickly to changes to accelerate their pipeline. They need a clear, comprehensive view of their pipeline, […]

READ MORE
Unlocking the power of Data Cloud for Salesforce Admins

Unlocking the Power of Data Cloud for Salesforce Admins

Admins are being tasked at a growing rate to integrate with more sources of information to tie back to their Salesforce implementations. You might be hearing a lot of questions about Data Cloud, like how it can help with modern integrations and where it fits into Einstein and artificial intelligence (AI). The good news is […]

READ MORE
Einstein Copilot analytics and AI for organizational success

Harness Einstein Copilot Analytics and AI for Organizational Success

As a Salesforce Admin, you know that the rollout of any new solution comes with a few stock questions in tow. No matter how good it feels to accomplish quick tasks with artificial intelligence (AI), eventually someone will ask, “How much is this really helping our company?” As a component of Salesforce’s Einstein Platform, Einstein […]

READ MORE