Introducing Bulk Activation for Match My Email. View announcement

MME Technology Blog

How to Summarize Salesforce Activity Timelines with AI

How to Summarize Salesforce Activity Timelines with AI

Imagine this. You are a sales rep. You just learned in 5 minutes you have to hop on a call with a client you have never met before. The client’s contact record is populated with details and there is a comprehensive activity timeline but you don’t have the time to read it.
 

Allow reps to instantly create digestible summaries of activity timelines using AI

New AI technology offers a perfect solution for a situation like this. With some of Salesforce’s AI tools, you can add fields to your records that your sales reps can use to automatically generate a short summary of the important information in the activity timeline. With these fields, sales reps can get the information they need to help their clients, whether they are in a time crunch or just trying to be more efficient.

This is possible by having your email data stored in Salesforce, which is possible today using our email integration tool, Match My Email.

Setting this up in your Salesforce org is actually very easy. We show you how to create the field in the video below and break down each step in the blog below.
 


 

Get started by enabling Einstein if you haven’t yet

Before creating an AI field like this activity summary field or doing most things with AI in Salesforce, you will need to enable Einstein and Agentforce. There is a free offering called Foundations as well as other ways to get Einstein and Agentforce enabled through your Salesforce rep. You can also learn about this on the Agentblazer trailhead courses.

However you do it, make sure Einstein and Agentforce are enabled before going to the next step.
 

Create a custom field on the object you want to do this for

Once your AI tools are enabled, you will want to create a custom field the way you create any custom field in Salesforce. These summary fields are object specific so our example shows how to create an activity summary field on the Contact object but you can also create these for other objects like the Lead, Account or Opportunity objects.

  1. Create a new custom field on the Contact object.
  2. Make the a field a text area (rich) format.
  3. Name the field “Activity Summary” or anything you want.
  4. Save the field.

 

Create a prompt template to summarize activities in a record’s timeline

Now we have an empty rich text field on the Contact object. This is the field we will put our AI output into. The next step is to set up the AI part of the Activity Summary field. We will be creating a prompt template in Prompt Builder. Prompt templates are reusable AI prompts that you can pull Salesforce data into.

  1. Go to Prompt Builder.
  2. Create a New Prompt Template.
  3. Set the Prompt Template Type to “Field Generation” on the dropdown.
  4. Name the Template “Activity Summary for Contacts” or anything you want.
  5. Set the object to Contact.
  6. Set the Object Field to the field you just create.
  7. Optional: In the configuration side panel, set the model to “OpenAI GPT 4 Turbo”
  8. In the Prompt Template Workspace enter this prewritten prompt: If there are activities in the “activities” section: Write “There are no activities with this contact yet” only. If there are activities in the “activities” section: The information within activities pertains to a contact likely engaged in a business deal with your company. In 1 to 3 sentences, create a summary for a sales rep of activity with the contact summarizing only the data in the “activities” section and “recordFields” section in the data below. Mention information related to deals and opportunities with the contact. If a specific product, service or offering interests the contact, mention the product, service or offering. If that product, service or offering has a price or estimate related to it, mention that. Keep the sentences as short as possible. Data to use:
    {!$RecordSnapshot:Contact.Snapshot
    }
  9. Optional: Preview the prompt with a contact.
  10. Optional: Customize the prompt above to better suit the kind of summary your reps need specific to your business.
  11. Save the prompt.
  12. Activate the prompt.

 

Activate the prompt template for the field

With the custom field and prompt template set up, we have just one final step to get the field set up on the record page.

  1. Go to a contact record page.
  2. Under the setup icon, click “edit page”
  3. Once in the Lightning App Builder, select the new custom field you created.
  4. On the right panel, under the “Einstein Generative AI” section, select the prompt template you just created.
  5. Click save on the record page.

 

And you are done!

Go to a contact with some activities on their activity timeline and see a summary for yourself.
 

Start summarizing

Thanks for following along on this demo. If you have gone through all the steps, your reps now have a great new tool to use to save time and better serve their clients. Feel free to start customizing the prompt template, implement this for other object like the Lead or Account object or explore any other ideas you may have.

Liked this demo, check out our other Agentforce demo showing how to use AI prompt templates within a flow.

Interested in storing you email data in Salesforce with Match My Email? Start a free trial today

Read More From The Email Technology Blog