Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Custom Extraction Templates

          Create Custom Extraction Templates

          Create extraction templates tailored to your organization's specific document types and business requirements. Define what information Document AI extracts by setting up context definitions with nodes (objects) and attributes (fields) for your unique document structure. Capture data from sources such as physician summaries or referral documents, including demographic information, care instructions, identified risks, or medication details. Define mappings to ensure Document AI maps the extracted information accurately to the Health Cloud data model.

          Required Editions

          Available in: Lightning Experience

          Available in: Enterprise and Unlimited Editions with the Health Cloud and Agentforce for Health Cloud add-on licenses

          User Permissions Needed
          To create extraction templates: Document AI permission set
          To create context definitions: Context Service Admin
          1. Create a context definition to define the objects and fields that structure how data is extracted and stored from a document.
            Important
            Important When you add an attribute for a field that has a lookup relationship, always set the attribute data type to reference.

            Multiple lookups to one object: If an object includes multiple lookup fields that reference the same target object, define each field as a separate attribute. For example, the Clinical Service Request object includes the Patient, Requester, and Performer fields, and all three fields reference the Account object. Create three distinct attributes that reference the Account object. Give each field a clear, role-based name to accurately reflect its purpose.

            Polymorphic lookups: If a field references multiple target objects, define one attribute for each possible referenced object. For example, the Clinical Service Request Detail object includes the Detail Record field, which can reference the Care Plan, Service Request object, the Medication Request object, or the Healthcare Facility object. Create separate attributes, such as CarePlan, ServiceRequest, MedicationRequest, and HealthcareFacility, and set each attribute to reference its corresponding object to ensure accurate extraction and mapping.

          2. To make sure that your objects and fields are updated with the right input data, Salesforce objects, or context definition objects, create a mapping structure for your context definition.
          3. In Setup, find and select Document AI for Health.
            Make sure that Document AI for Health is turned on.
          4. Click Create Extraction Template.
          5. Enter a name and a description for the template.
          6. Select the Large Language Model (LLM) you want to use for document extraction.
          7. To specify when extraction data is flagged for an additional manual review, enter a low confidence score value between 0 and 99.
            For example, if you set the low confidence score to 80, any extracted field with a confidence score below 80 is flagged.
          8. Save your changes.
          9. On the Configuration tab, select a context definition and a context mapping you want to use for the extraction.
            The list of objects and fields appears. Review the prompts that the LLM uses to extract each field. Make sure the prompts accurately describe the information you want captured.
          10. To validate the prompts, go to the Playground tab, upload a file, and view extraction results in the Extraction Preview tab.
            Verify that the prompts align with your structure and revise them, if necessary.
          11. Save your changes and activate the template.

          The extraction templates that you create appear in the Extraction Templates table on the setup page of Document AI for Health.

           
          Loading
          Salesforce Help | Article