> ## Documentation Index
> Fetch the complete documentation index at: https://docs.a2v2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI File Extraction

> Upload a PDF or Word document and let A2V2.ai read the values into a form or a health reading — you review before anything saves.

A patient emails a three-page PDF intake sheet. A partner faxes over a referral
letter. A lab sends a results report. Instead of retyping any of it, open the
contact, start **AI File Extraction**, and let A2V2.ai read the document and fill the
fields for you — leaving you to check the values and save.

It's the same button and the same upload flow in two places:

* **CRM form submissions** — pre-fill a form from a document.
* **Health readings** (Medical Agents only) — pre-fill an **Add Health Reading** from a
  lab report or medical record.

Look for the **AI File Extraction** button (marked with a sparkle) on a form submission
or on the **Add Reading** screen.

## Why it's worth using

* **No more re-keying.** Intake paperwork, quotes, referral letters, and lab reports get
  read into the right fields automatically.
* **You stay in control.** Extraction never saves a record on its own — it fills the
  fields and hands them back to you to review, correct, and submit.
* **It won't overwrite your work.** Only *empty* fields are filled. Anything you've
  already typed is left exactly as it is.

## Prerequisites

* **Admin role.** AI File Extraction is available to organization **Admins**.
* **Something to fill.** Either a form template with fields (see [Forms](/crm/forms)) or,
  for health readings, a [Medical Agent](/medical/overview) with health parameters set up.
* **Credits — for forms only.** Extracting into a **form** uses credits, like other AI
  operations. Extracting a **health reading is free**. See the table below.

## How it works

<Steps>
  <Step title="Start an extraction">
    Select **AI File Extraction** on a form submission or on the **Add Reading** screen.
  </Step>

  <Step title="Choose a document">
    Drag a file onto **Drag & drop your file here**, or click to browse. You can upload a
    **PDF, DOC, or DOCX up to 20MB**. Or, under **or choose from existing files**, pick a
    document already attached to this contact and search it by name.
  </Step>

  <Step title="Let A2V2.ai read it">
    You'll see **Processing document with AI…** while it works. When it finishes, a toast
    reads **Document processed successfully!** followed by how many fields it filled and
    with what confidence — for example, *Extracted 7/9 fields with 92% confidence*.
  </Step>

  <Step title="Review, then save">
    The fields are pre-filled for you to check. Extraction **only fills empty fields**, so
    nothing you already entered is touched. Correct anything that looks off — pay closest
    attention to values with lower confidence — then save or submit.
  </Step>
</Steps>

## What it can fill

<Tabs>
  <Tab title="CRM form submissions">
    Use it while **creating a new submission** with a template selected, or while **editing
    a draft** submission. The button appears once a template is chosen; on an already-
    submitted form there's nothing to pre-fill, so it won't show.

    Extraction only fills fields you've marked **Allow this field for AI** in the form
    builder — so you decide exactly what the AI is allowed to populate. Fields that aren't
    AI-enabled (or aren't active) are skipped. When it's done you'll see **Form data
    extracted! Please review and submit** — review the values, then submit as usual.

    This surface **uses credits**. For how to build the form itself, see [Forms](/crm/forms).
  </Tab>

  <Tab title="Health readings (Medical Agents)">
    On a Medical Agent, open a patient's **Health** tab and start an **Add Reading**, then
    use AI File Extraction on a lab report or medical record. It reads values for the
    parameters your agent tracks and pre-fills the reading.

    A few things make this smoother for clinical documents:

    * **Automatic unit conversion** — if a lab reports a value in a different unit than your
      parameter is configured for, A2V2.ai converts it for you before filling the field.
    * **Automatic sample date** — if the document carries a consistent draw date and time,
      the reading's **Date** and **Time** default to that instead of "now".

    A **Review Reading** step then shows everything with *Confirm the details below before
    saving.* Select **Confirm & Save** to record it. Health-reading extraction is **free —
    it doesn't use credits**. For the full readings workflow, see
    [Health Tracking](/medical/health-tracking).
  </Tab>
</Tabs>

## At a glance

|                      | Details                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------- |
| **Where it lives**   | Form submissions (any agent with forms) and **Add Reading** (Medical Agents only)                         |
| **File types**       | PDF, DOC, DOCX                                                                                            |
| **Max file size**    | 20MB                                                                                                      |
| **File source**      | Upload a new file, or pick an existing file on the contact                                                |
| **Who can use it**   | Organization **Admins**                                                                                   |
| **Credits**          | Forms: **uses credits** · Health readings: **free**                                                       |
| **What gets filled** | Forms: active fields marked **Allow this field for AI** · Readings: your agent's active health parameters |
| **Saving**           | Never automatic — you always review before submitting or confirming                                       |

## Tips

<Tip>
  Cleaner documents extract better. A crisp digital PDF or a well-lit scan gives A2V2.ai
  much more to work with than a faint fax or a photo taken at an angle.
</Tip>

<Tip>
  Already uploaded the file to the contact? Skip re-uploading — pick it from **or choose
  from existing files** in the extraction dialog.
</Tip>

<Tip>
  Treat the confidence percentage as a review guide. High confidence usually means the
  value is clean; give lower-confidence fields a second look before you save.
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="It won't accept my file">
    AI File Extraction supports **PDF, DOC, and DOCX** files up to **20MB**. Convert other
    formats (or compress a large file) first, then try again.
  </Accordion>

  <Accordion title="Some fields came back empty">
    Extraction only fills fields it can confidently read, and — on forms — only fields
    marked **Allow this field for AI**. If a field stayed blank, either the document didn't
    contain that value clearly or the field isn't AI-enabled. Fill those in by hand.
  </Accordion>

  <Accordion title="It says I don't have enough credits">
    Extracting into a **form** uses credits. If you're short, top up or wait for your
    monthly reset — see [Credits explained](/billing/credits-explained). (Health-reading
    extraction is free and isn't affected.)
  </Accordion>

  <Accordion title="I don't see the AI File Extraction button">
    On a form, choose a **template** first (or open a **draft** submission) — the button
    doesn't appear on an already-submitted form. For health readings, the button is only on
    **Medical Agents**; a standard agent won't show it on readings.
  </Accordion>

  <Accordion title="No existing files to choose from">
    The dialog only lists files A2V2.ai can extract from (PDF, DOC, DOCX) that are already
    attached to this contact. If there are none, upload a new file instead.
  </Accordion>
</AccordionGroup>

## Prefer to extract via API?

If you're building your own workflow, you can extract from a document programmatically —
see **[Document extraction](/api/endpoints#document-extraction)** in the API reference.
The API takes a custom schema you define, whereas the in-app flow maps automatically to
your form template's fields or your agent's health parameters.

## Related

<CardGroup cols={2}>
  <Card title="Forms" icon="table-list" href="/crm/forms">
    Build the form template that extraction fills — including which fields are AI-enabled.
  </Card>

  <Card title="Health Tracking" icon="vial" href="/medical/health-tracking">
    The full Add Reading and Review flow for Medical Agents.
  </Card>

  <Card title="Contacts" icon="address-book" href="/crm/contacts">
    Where uploaded files live and where submissions and readings attach.
  </Card>

  <Card title="Credits explained" icon="coins" href="/billing/credits-explained">
    How AI operations like form extraction draw on your credits.
  </Card>

  <Card title="Document extraction API" icon="code" href="/api/endpoints#document-extraction">
    Extract structured data from a document over the API.
  </Card>
</CardGroup>
