Auto-Email Replies Using Agentforce Agents in Salesforce

First, let me explain a scenario to quickly understand how service replies for email work in Salesforce Agentforce. Then I will explain how we can achieve this in Salesforce.

So, let’s say you are a support user and the customer has a question about the Wi-Fi router not working. Now, to provide the proper information for the customer’s query, you will review the relevant knowledge article.

Once you find the correct information, you type out the answer manually and send it to the customer. Isn’t it lengthy to go through all the information and respond to the customer’s query?

We can implement AI automation in Agentforce using AI agents to simplify the process. Now, I will explain how we can set up this process for auto-email replies using Agentforce agents in Salesforce.

Einstein Service Replies for Email in Salesforce Agentforce

The Einstein Service reply features help agents quickly draft emails from the knowledge article.

We know that the knowledge recommendation feature in Service Clouds shows all relevant knowledge articles on the case detail page, and agents can use them to resolve a case.

To help agents, send an email to the customer Einstein to generate replies quickly from the knowledge articles.

Once it is enabled, the agent can click the drop-down and select Draft Einstein email, and Einstein will generate the email from the knowledge article, which agents can edit and send quickly to resolve the case.

Einstein automatically reads the customer’s message and understands the problem. It quickly checks the related knowledge articles for you and finds the most helpful information.

Then, it gives you short and ready-to-send reply suggestions, so you don’t have to search or type everything yourself.

Set up Auto-Email Replies Using Agentforce Agents in Salesforce

Now, we will understand how to enable Einstein service replies for email, which helps agents draft email content quickly from the knowledge articles displayed on the recommended articles on the case detail page.

I created a new Salesforce developer org because Salesforce launched a new Developer Edition on March 3rd, 2025, which now includes Agentforce and Data Cloud.

Now, we need to enable Einstein AI. So, let’s get started with the setup. Search for the Einstein Setup and the ‘Turn on Einstein option.

Turn On Einstein Agent in Agentforce

After that, we need to enable Agentforce. Again, search for the Agents and ‘Enable the Agentforce,’ which is the default agent for Salesforce, by clicking on the toggle button.

Enable Agentforce in Salesforce

Enable Knowledge User and Article in Salesforce

The Einstein service replies that they utilize existing knowledge articles to draft the email. For that, we need to enable and load a few knowledge articles in this org so that they can appear in the recommendations section.

Now, when searching for knowledge in the setup, it no longer appears in the search results. This is because to work with knowledge, our user needs to be a knowledge user.

To do that, navigate to the users, select the user you want to become a knowledge user, and check the checkbox.

Enable Knowledge User in Salesforce

After enabling the knowledge user, we need to activate knowledge. To do that, search for the Knowledge Setting in Quick Find.

To enable knowledge, check the checkbox, click Enable Salesforce Lightning Knowledge, and click Okay to proceed. So now knowledge is enabled in this org.

Enable Knowledge Setting in Salesforce

Now, we need to edit the knowledge settings as listed below. To do that, click the Edit button and enable the following settings.

Customize Knowledge Settings in Salesforce

Now, check the “Activate Validation Status” checkbox. Then, ‘Enable Lightning Knowledge‘ so that the knowledge article appears in the Lightning UI as well.

Next, make this article available to the internal apps, customers, and partners communities.

Activate General Knowledge Settings in Salesforce

Next, this is the most important point: Suggest related articles on cases. This checkbox ensures that the recommended knowledge articles start appearing on cases based on the field you define.

Right now, you see that the Subject field is selected by default, which means that when Salesforce recommends knowledge articles, it will look for the content of the subject.

Then it will find that, in all the knowledge articles, the relevant article starts showing up in the recommended knowledge articles section.

Then click the Save button to apply the changes.

Setup Knowledge Setting in Salesforce

Insert Knowledge Articles in Salesforce

As of now, we have enabled Agentforce and knowledge settings, and the next step is to load some knowledge articles into this org. So, for that, I have one Excel file with a few knowledge articles.

Knowledge Articles in Salesforce

We only need the title, summary, and URL name to create the knowledge articles. So copy these, then go to the knowledge article again and click the Inspector button.

There, you will have the Data Import operation to insert the knowledge articles.

Salesforce Inspector Extension

Now, paste the copied content in the Data option. Then, the Object where knowledge articles are stored. So here, we need to select Knowledge__kav.

In the Field Mapping, you can see that the external file columns and internal fields are mapped. These are the three mandatory fields for creating a knowledge article.

After that, click on the Run Insert button to create the knowledge articles.

Import Knowledge Article in Salesforce

Again, click the Insert button to see that the knowledge articles are inserted into this system.

But it needs to be published to work with knowledge, so if I open any record by clicking on ID, you will see it is in draft mode.

Insert Knowledge Articles in Salesforce
Salesforce Knowledge Articles

You can see that the Knowledge object tab is still in draft mode, and all knowledge in draft mode does not appear in the recommended section.

To edit this object, click the Gear icon and the Edit Object option.

How to Create Knowledge Articles in Salesforce

Then go to Page Layout -> Mobile & Lightning Actions -> We want to drag the publish button to the UI, so we have to enable this lightning action.

After that, drag and drop the publish button into the page layout.

Add Publish Button to Knowledge Page Layout

You can also drag other buttons. For example, you have Delete Draft or Delete Article. Then click the Save button to apply the changes.

Add Publish Button to Knowledge Layout

Again, as you navigate to the knowledge tab and refresh the page, you will see the buttons that you added to the page layout. Now, we have to publish draft articles by clicking on the Publish button.

Publish Article in Salesforce

When you click the publish button here, select Publish now, then click the Publish button again.

How to Publish Draft Knowledge Articles in Salesforce

The article’s Publication Status has changed from Draft to Published. Thus, this organization now has a few knowledge articles, one of which has been published.

If Salesforce finds that this knowledge is relevant to the case we are working on, this article should appear in the recommended section.

Publish Draft Knowledge Articles in Salesforce

Enable Einstein Service Replies For Email

Now, let’s move on to the next step: enabling Einstein Service replies for email. For that, in Quick Find, search for Einstein Service.

You can see Einstein service replies for email. Let’s open this, and we have to turn this on. So let’s click on the toggle button, and now service replies are turned on.

But to generate the content from the knowledge article, we have to ground the data from the knowledge as well as the case object. To do that, click this button to Set Up Grounding.

Enable Einstein Service Replies For Email

So, turn on this Service AI Grounding. This is useful while generating the content for the email and chat features.

We need to tell Einstein which field to use on the knowledge article and on the case object to ground the response.

Turn on Service AI Grounding in Salesforce Agentforce

For that, as you scroll down on the Knowledge, click the Edit button. Here, we are saying that the Title should be found in the title field of our knowledge article, and the Summary should be found in the summary field of the knowledge article.

Then click on the Save button. Also, you need to enable the Grounding with Knowledge option.

Select Knowledge Fields For AI Grounding in Agentforce

Similarly, click on Edit for the Case. Here, we can say that the Subject is in the subject field, and the description is in the description field.

Then click the Save button. You also need to enable the Grounding with Case option.

Select Case Fields For AI Grounding in Agentforce

Now, let’s go to the Service app and see if these knowledge articles appear on the case. To do that, click the App Launcher and switch to the service app.

Open any case. On the left side, the suggested knowledge article section will appear. There, you will find articles related to your case Subject.

If you don’t have any knowledge articles related to the case subject, you will not find any articles there.

But when you click on the drop-down, you will not see the Einstein Draft email feature enabled yet because this user needs to have one permission set.

Einstein Service Replies For Email in Salesforce Agentforce

So, let’s go to the logged-in user and assign the Email response user permission set. So, go to this user, go to the permission set assignment, and assign this permission set.

Here is a search for the user who responded to the email. We need to assign this permission set to this user, so let’s click on Save.

Assign Email Response Permission Set to User in Salesforce

After that, we need to enable the Email-to-Case feature to send the emails.

Enable Email to Case in Salesforce

So now the agent can write the email using standard email writing, or they can use this knowledge article to generate it for them.

So let’s just utilize this and click on Draft Einstein Email.

Auto-Email Replies Using Agentforce Agents in Salesforce

Here, you can see that the agent generated this email. If you look at the content of this email, you will see the name of the contact for this case. And then it generated this content.

This was generated based on the knowledge article. Again, if the agent wants to change this content, they can. Otherwise, you can directly send this email.

Einstein Service Replies for Email in Salesforce Agentforce

Proof of Concept

Here you can see the customer received the email with the steps to resolve his query.

In this way, we can set up and use Einstein service reply emails in Salesforce Agentforce to make the support agent’s tasks easier and more accurate.

Conclusion

I hope you have an idea of the process for auto-email replies using Agentforce agents in Salesforce, and I have explained how we can achieve this.

To set up this automation, I have explained the prerequisites: enabling knowledge users and articles, inserting knowledge articles, and enabling Einstein service replicas for email in Salesforce.

Salesforce AgentForce Live Webinar

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.