# Document Scanner

<figure><img src="/files/UxuOENuOuJuytGqtKmi3" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}
The Avonni Document Scanner component leverages your device's security features. It's available **exclusively on the Salesforce Mobile App**.
{% endhint %}

## Key Features & Configuration

1. **Open On Load (Toggle)**:
   * Enable this option to launch the document scanner automatically when your screen flow loads.
   * Ideal for flows where scanning is the primary action.
2. **Image Source (Dropdown)**:
   * **Input Image:** Select an image already uploaded into your flow.
   * **Photo Library:** Allow users to choose an existing image from their device's photo library.
   * **Device Camera:** Enable users to capture a new photo directly from their device's camera.
3. **Show Preview (Toggle)**:
   * Turn on this option to display a preview of the scanned document after capture.
   * Allows users to review and confirm before saving.
4. **Button Settings (Customizable)**:
   * Tailor the appearance and text of the button that triggers the scanner.
   * Maintain a consistent look and feel within your mobile flow.
5. **Success Interactions (Configurable)**:
   * Define actions to occur upon a successful scan:
     * Save the extracted text to a specific Salesforce object or field.
     * Trigger a notification.
     * Navigate to another screen in your flow.

## Step-by-Step Guide

1. **Drag and Drop**: Add the Avonni Document Scanner component to your mobile screen flow from the component palette.
2. **Configure Settings**: Adjust the above options to align with your specific use case.
3. After scanning a document, you can put the extracted text to work within your Salesforce processes. Here's how:
   1. **Success Interactions:** This section controls what happens *after* a successful scan.
   2. **Choose an Action:** Select the action that best fits your workflow:
      * **Populate Fields:** If you have specific fields (like name, address, or account number), the scanner can automatically fill them in.
      * **Start Other Actions:** You can trigger notifications, move to a different part of your app, or even kick off other automated processes based on the scanned information.

## Example Use Case: Medical Conference Note Capture

Imagine you're a healthcare provider at a medical conference. With the Avonni Document Scanner, you can:

1. Photograph a flyer detailing a new medical device directly within your Salesforce app.
2. Extract the text from the flyer, including product name, features, and contact information.
3. You can instantly save this information to a new Salesforce note or a custom "Conference Materials" object for later review.

### Notes

* The Avonni Document Scanner leverages advanced Optical Character Recognition (OCR) technology to convert images to text accurately.
* For best results, ensure images have good lighting and clear text.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avonnicomponents.com/flow/flow-components/document-scanner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
