Skip to main content
Die Trailblazer Community auf Slack befindet sich jetzt in der offenen Betaphase – treten Sie bei und tauschen Sie sich in Echtzeit aus. Kommen Sie zu uns auf Slack

Create a Document AI Schema Configuration

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the parts of a Document AI schema configuration.
  • Create a Document AI schema configuration.

How Document AI Works

Document AI works based on a schema configuration and LLM models. In a schema configuration, you define what fields to pull from the document, prompt instructions on how to find and format the fields, and which model to use. The configuration is then passed to the LLM so the LLM can process the document and extract data based on the prompts.

Let’s compare examples of ineffective and effective prompt instructions for the order_date field.

Ineffective

Effective

Prompt

“Find the date on the PO.”

“Date the PO was issued or signed. Return in YYYY-MM-DD format.”

Explanation

This prompt doesn’t specify which date to find. There might be multiple dates on the PO. It also doesn’t specify the format.

This prompt specifies which dates are acceptable. It also specifies the format.

Source Object Versus Without Source Object

You can create a schema configuration with or without a source object. Your best option depends on where your unstructured data is and what your desired output is.

With Source Object

Without Source Object

Where data resides

Data is already ingested into Data 360 and resides in an unstructured data model object (UDMO).

Data currently resides outside of Data 360. You’ll upload files directly to Salesforce (such as to an Opportunity record).

Output

Automatically updates DLOs and DMOs.

Returns data into a flow, Apex, or API response.

Since you want to provide the data directly to a flow that updates the opportunity record, you create a configuration without a source object.

Create a Document AI Schema Configuration

  1. Locate and click the App Launcher, the grid icon in the top left corner.
  2. Search for and select Data Cloud.
  3. Click Process & Enrich, then click Document AI.
  4. Click New.
  5. Click Without a source object, then click Next.
  6. Download this PO file.
  7. Click Upload Files, choose the PO file, click Open, and click Done.
  8. From the model dropdown, select Gemini 3.5 Flash.
  9. Click Create Manually, then click Next.
  10. Click + Add Field
  11. For the Field Name, enter po_number. Make sure the API Name is also po_number.
  12. Leave the default String Field Type.
  13. For the Prompt Instructions, enter Purchase Order number or reference ID.
  14. Click Add.
  15. Repeat steps 10-14 four more times to add all the fields below.

Field Name and API Name

Field Type (all are default String)

Prompt Instructions

order_date

String

Date the PO was issued or signed. Return in YYYY-MM-DD format.
total_amount

String

Total order value including all taxes and fees. Return as a numeric value only, no currency symbols.
payment_terms

String

Payment terms stated on the PO (for example, Net 30, Net 60).
line_item_summary

String

One-sentence summary of the goods or services ordered.
  1. Click Test. Verify all 5 fields come back correctly.
    • po_number = BFL/PO/2025-26/00412
    • order_date = 2026-03-15
    • total_amount = 58300
    • payment_terms = Net 45
    • line_item_summary = Purchase of Data Integration Tool Premium Edition, Document Processing Tool Add-On, and Premier Success Planning.
  2. Click Save Draft.
  3. For the Document Schema Name, enter po_config. Make sure the API name is also po_config.
  4. Click Save.

Now you have a schema configuration that can extract data from a PO. Next, create Apex classes.

Resources

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"