Add a Related List with File Inputs to a Flex Prompt Template

Create a flex prompt template that includes a related list with file inputs.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations
User Permissions Needed
To create and manage prompt templates in Prompt Builder:

Prompt Template Manager permission set

  • Manage Prompt Templates
  • Execute Prompt Templates

OR

Customize Application permission set

Say you’re a Business Analyst that evaluates potential service providers for your clients. Your team spends a lot of time reviewing multiple files and images for each provider to determine if they meet the client’s needs. By using an LLM that can process file input, you can automate the analysis and summary of these details. This will help you quickly decide if a company is right for the client's specific problems.

To get started, create a prompt template.

  1. In the Prompt Template Type dropdown, select Flex.
  2. For the Prompt Template Name, enter Analyze Account.
  3. In the description field, enter Summarize a company description and check its relevance using files.
  4. Define a resource.
    1. Name: Account
    2. API Name: Account
    3. Source Type: Object
    4. Object: Account
  5. Click Next, and you’re redirected to the Prompt Template Workspace.
  6. Copy and paste the example prompt template
    1. To use the example prompt, copy the Image Verification for Account Relevance prompt in the Flex Example Templates. Then, paste it into the Prompt Template Workspace.
    2. Before you can run this template in Prompt Builder, in the Prompt section, click Insert Resource. The search field appears the first time you click this option.
    3. Use the Resource field to replace the description placeholder with a real merge field. Add the related list to the prompt template, from the Resource picker, click Account, and click then Notes & Attachments.
      Prompt Builder grounds files in this related list that are Salesforce Files. Classic Attachment records aren’t included in the resolved prompt. See Grounding with Related List Merge Fields.
  7. In Template Properties, under Models, select GPT 4 Omni.
  8. Click Save.
  9. Select an account to test the prompt template.
  10. Click Preview to test the prompt template. In the Resolution, the attached images can also be previewed.

Prompt Builder grounds related-list files that are Salesforce Files. Classic Attachment records aren’t supported. If a file from Notes & Attachments doesn’t appear in the resolved prompt, then convert it to a Salesforce File or upload it from the Files related list, and preview again. File size and system limits aren’t the cause. See Grounding with Related List Merge Fields.