The latest treasure from Salesforce, Einstein Copilot, has arrived and I can say other treasure hunters will soon be plotting a course to this gem.
Currently, you can spin up a 5-Day developer org with the Salesforce Copilot ( Einstein Copilot ) already available. My first step on the Einstein AI journey was with the prompt builder tool. I stumbled upon a bounty of excitement, yet my journey was not without its fair share of rough seas and unexpected squalls. Let me tell you the tales of adventure and the occasional hiccup I encountered along the path.
Setting Up the Prompt Builder
Currently, the different prompt types are Flex, Field Generation or Record Summary. I went through the prompt type of Field Generation.
Trying the Field Generation Prompt
Field Generation Prompt template allows your users to get an AI generated value for the field using the merge fields and prompt that was created in the prompt builder. For example, you can create a prompt that can be used to generate a summary of the case record using merge fields for the Field Generation prompt template.
When setting up your prompt template you can choose from several generative AI models:
- OpenAI GPT 3.5 Turbo
- OpenAI GPT 3.5 Turbo16k
- OpenAI GPT 4
- OpenAI GPT 4 32k
- OpenAI GPT 4 Turbo
- Azure OpenAI GPT 3.5 Turbo
- Azure OpenAI GPT 3.5 Turbo 16k
- Azure OpenAI GPT 4 Turbo
This gives some flexibility with the AI models and admins can start testing out where they are getting better responses.
The idea behind the prompt builder for field generation is to have administrators enter in the prompt that would be sent to the generative AI system to give users an idea, example or standard type of input. I tend to think text fields would be the most common use case. And, similar to the example, collecting information from related lists or other fields on the object record to give users a value would be most useful.
One of the issues I found while using the is that you can’t just type the fields into the prompt builder and expect it to resolve the merge field; you have to place the cursor where you want the merge field to go in the prompt workspace and then use the Resource box field to select the merge fields you want to add to the prompt. I find this to be an extra step that isn’t needed for other merge fields in Salesforce like in formula fields or workflows.
You also have to select the object or other resource first in the resource box from the drop down menu and then do a search for the field in that object or resource. The search field does not find the resources automatically and is confusing because it states that the field is not found until selecting the object.
A great feature is having a test preview section where you can test out the prompt with the chosen Gen AI model. I liked that you can see the resolution from a detailed perspective but just testing out the prompt to see what users would receive gives you the ability to tweak the prompt, set tone and make sure the variables are being filled in as expected. It also helped me determine that the value wasn’t being filled in correctly when just typing in the merge field versus using the Resource field.
You can see below in the different responses that Copilot did not search for the merge field but kept the value “Input:Case.Type”.
Response without the merge field:
The case, titled "Seeking guidance on electrical wiring installation for GC5060," has a low priority and falls under the category of "Input:Case.Type". The case comments indicate that the engineering team was contacted to obtain a PDF of the wiring diagram. This diagram was then emailed to the customer, and a response is currently being awaited. Additional information provided states that the generator in question was manufactured in 2019.
Response with the corrected merge field:
The case, titled "Seeking guidance on electrical wiring installation for GC5060", has a low priority and is categorized as an electrical case. The comments on the case indicate that the engineering team was contacted to obtain a wiring diagram, which was then emailed to the customer. The customer's response is being awaited. Additionally, it was noted that the generator in question was manufactured in 2019.
Once you have a good prompt with a response that you feel will work for your users. You can Save the the prompt and then add the functionality to your page layout.
What Happens in the Page Layout with Einstein Copilot
Fields with Einstein Generative AI have a little orange Einstein when editing the page on the page layout.
You can click on the Einstein enabled field and then you can choose the prompt template that you want to use. I’m not sure if you can choose different templates for each page layout on the field but that is something I will test out in future.
After you setup the page layout and prompt you wish to use you can then test it out on the actual record.
It took a few refreshes for the actual page to update and show the Einstein Gen AI as active next to the field. The edit icon (the pencil) shows up with a star above it when the Einstein Copilot prompt builder is available for the record. Its a subtle change but noticeable enough for users to understand that the field edit works differently.
Once you click on the copilot edit you have another button to click to activate the Einstein Copilot. The field shows up with a star button to the right in the edit page and then you need to click this button to activate Einstein Copilot. This is a two step process that I wasn’t expecting and users might not be expecting either.
Also once you click on the button, then another window pops up in the bottom of the page. Users might not be expecting this either and might ignore or automatically close out of the popup as it is similar to the walkthroughs that Salesforce has used before. For now, giving users a brief training on using these fields would be best to eliminate these issues.
Once you have the Einstein window up then the prompt will take a few minutes to send to the AI model and get a response. You then select the “Use” button to have the generated value automatically added to the field or ask for another generation with your own changes. This gives some flexibility but not sure if these changes are being saved for the field generation in future to help the model to generate better responses.
You can hover over the result and give it a thumbs up or thumbs down for automatic feedback to the system.
When you have a value you like then you can save your changes on the edit page or make other changes to the record and then save. Overall it was a lot of steps to even generate the value but I believe walking through it once with users will make the process easier.
The summary example was a great use of generative AI and definitely give an idea of how an admin can set up a prompt to help users automatically fill out fields on their records. But it also brought up thoughts about how the information for the field might change in which case users would need to re-generate a summary or edit the value. As a next step having this generated from a formula that automatically re-generates the value for these Einstein AI prompted fields would be ideal.
I will be trying out the other prompt template types (Flex and Record Summary) so look out for more posts on the prompt builder and Einstein Copilot.
Need help finding the Salesforce gems?
Let us help! Were seasoned Salesforce treasure hunters.