Set Up Related Record Grounding for Messaging (Optional)

Ground messaging service plans in related records using a prompt template.

Required Editions

View supported editions.
Checkmark This article applies to: Service Assistant for Messaging
X icon This article doesn't apply to: Service Assistant for Case and Voice
User Permissions Needed
To set up related record grounding for Messaging:

Customize Application OR System Administrator

AND

Service Planner Builder permission set

AND

Prompt Template Manager

Note
Note This section provides the setup steps for Messaging related record grounding. Reference information is provided in Grounding Messaging Service Plans with Related Records.

Before you set up related record grounding, confirm you have completed these tasks.

Related record grounding for messaging is executed through the Messaging Session Related Record Details prompt template. By default, the prompt template includes several Case and Account fields.

Messaging Session Related Record Details default prompt template

You can modify the template to reference additional fields or related records, such as Input:MessagingSession.Contact.FirstName, as long as the field is directly connected to the record you're grounding on. Referencing a record that's connected through another related record, such as MessagingSession.Case.Contact.FirstName, isn't supported in Prompt Builder.

Turn On Related Record Grounding

Turn the feature on from the Service Assistant Setup page.

  1. From the Service Assistant Setup page, go to the Customize Your Experience by Object section and select the Messaging tab.
  2. Go to the Include Context from Related Records section.
  3. Turn the feature on.
  4. Click Go to Prompt Template. The Messaging Session Related Record Details grounding prompt template opens.
Messaging related record grounding toggle

Configure the Prompt Template

Configure the Messaging Session Related Record Details grounding prompt template to ground service plans in related records.

By default, the template includes several Case and Account fields. If you want to use the standard template, no action is required. The template is already active. Go to the next procedure.

  1. From the Prompt Builder Workspace, click Deactivate.
  2. Click Save As and then click Save As New Version.
  3. Modify the template to your requirements.
  4. Save your changes and activate the prompt template.

Provide Access to Your Grounding Data

Grant the ServicePlanner User and service reps read access to the objects and fields included in your prompt template.

To include related record data in a messaging service plan, both the ServicePlanner User (agent user) and service reps require read access to all objects and fields included in the prompt template.

If you pass record data to the prompt template using input resources such as a flow or Apex action, the ServicePlanner User and service reps also require access to the fields, objects, and Apex classes that those resources reference.

We recommend providing access through a Messaging Record Grounding custom permission set. Service reps also need the Prompt Template User permission set.

The ServicePlanner User's access retrieves and passes the data into the plan, and the service rep's access lets that data appear in the service plan. Grant service reps access to the objects and fields included in your prompt template according to your data access and sharing rules.

User User License Permission Sets
ServicePlanner User (agent user) Einstein Agent
  • Agent Messaging Access custom permission set
  • Messaging Record Grounding custom permission set
Service Rep Salesforce
  • Prompt Template User permission set
  • Service Planner User permission set
  • Messaging Record Grounding Access permission set

Test and Troubleshoot

Test your setup by starting a service plan on a messaging session and work through the plan reviewing the steps to verify related record information is present in the plan.

For example, if you added a custom field like Input:MessagingSession.EndUserAccount.LoyaltyStatus__c to your prompt template for Account, the customer's loyalty status shows in plan steps along with other grounding field data.

Service plan step showing related record grounding data

Another way to quickly confirm that Service Assistant captures the data is to ask for record information using the agent chat.

Related record grounding testing using the agent chat

If Service Assistant can't access the data from the record, you'll see a message from Service Assistant in the form of "I can't assist you because there's no information in your company documents related to the provided context." Check that the object and field are included in your prompt template and that both Service Assistant and the service rep have access.

Related record grounding data access message

Service Assistant tracks any new information for your related record grounding fields. When new information is found in your grounding fields or you update the prompt template, Service Assistant captures the data and uses it as context to create the next plan step. Field or prompt template updates don't trigger Service Assistant to automatically regenerate the active plan step.

Keep in mind that not every step is grounded in or references the related-record data. Service Assistant reviews the grounded data in relation to the context of the active conversation. If the data isn't relevant to the conversation, the data isn't referenced in the plan steps.

If related record data isn't showing up in the plan steps, check the following.

  • Confirm that the prompt template is active.
  • Confirm that the Include Context from Related Records toggle is turned on from the Messaging tab of the Setup page.
  • Confirm that the agent user and service reps have read access to all objects and fields included in the prompt template.
  • If you have multiple Service Assistant for Messaging agents:
    • Confirm that all your agents are active.
    • Confirm that your agent assignment flow is active in Flow Builder and is selected in the Set Up Your Agent Assignment section of the Setup page.
    • Confirm that each agent has access to the objects and fields in your prompt template. All agents use the same prompt template, but you must grant access to each agent individually.