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

# Analytics Reporting Warehouse

> Analytics Reporting Warehouse in ABBYY Vantage: track field changes, manual verification effort, and document accuracy metrics for Process skills.

export const VantageRegion = ({children}) => {
  const STORAGE_KEY = "abbyy.vantage.region";
  const REGIONS = [{
    code: "eu",
    label: "Europe"
  }, {
    code: "us",
    label: "North America"
  }, {
    code: "au",
    label: "Australia / Asia-Pacific"
  }];
  const [region, setRegion] = useState("eu");
  const [open, setOpen] = useState(false);
  const containerRef = useRef(null);
  const dropdownRef = useRef(null);
  function safeGetSavedRegion() {
    try {
      const saved = typeof window !== "undefined" ? window.localStorage.getItem(STORAGE_KEY) : null;
      const valid = new Set(REGIONS.map(r => r.code));
      return saved && valid.has(saved) ? saved : "eu";
    } catch {
      return "eu";
    }
  }
  function safeSetSavedRegion(code) {
    try {
      if (typeof window !== "undefined") {
        window.localStorage.setItem(STORAGE_KEY, code);
      }
    } catch {}
  }
  function dispatchRegionChanged(code) {
    try {
      if (typeof window !== "undefined") {
        window.dispatchEvent(new CustomEvent("abbyy:region-changed", {
          detail: {
            code
          }
        }));
      }
    } catch {}
  }
  function replaceRegionInString(text, currentRegion) {
    if (typeof text !== "string") return text;
    const hostRegex = /https:\/\/vantage-(eu|us|au)\.abbyy\.com/gi;
    const tokenRegex = /https:\/\/vantage-\[region\]\.abbyy\.com/gi;
    const bareHostRegex = /vantage-(eu|us|au)\.abbyy\.com/gi;
    const bareTokenRegex = /vantage-\[region\]\.abbyy\.com/gi;
    return text.replace(hostRegex, `https://vantage-${currentRegion}.abbyy.com`).replace(tokenRegex, `https://vantage-${currentRegion}.abbyy.com`).replace(bareHostRegex, `vantage-${currentRegion}.abbyy.com`).replace(bareTokenRegex, `vantage-${currentRegion}.abbyy.com`);
  }
  useEffect(() => {
    setRegion(safeGetSavedRegion());
  }, []);
  useEffect(() => {
    const root = containerRef.current;
    if (!root) return;
    const anchors = root.querySelectorAll("a[href]");
    anchors.forEach(a => {
      const href = a.getAttribute("href");
      if (href) {
        const next = replaceRegionInString(href, region);
        if (next !== href) {
          a.setAttribute("href", next);
        }
      }
    });
    const walker = typeof document !== "undefined" ? document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null) : null;
    if (walker) {
      const toUpdate = [];
      let node = walker.nextNode();
      while (node) {
        const updated = replaceRegionInString(node.nodeValue, region);
        if (updated !== node.nodeValue) {
          toUpdate.push([node, updated]);
        }
        node = walker.nextNode();
      }
      toUpdate.forEach(([textNode, value]) => {
        textNode.nodeValue = value;
      });
    }
  }, [region, children]);
  useEffect(() => {
    const root = containerRef.current;
    if (!root) return;
    const anchors = root.querySelectorAll("a[href]");
    anchors.forEach(a => {
      a.style.fontWeight = "600";
      a.style.textDecoration = "underline";
      a.style.textUnderlineOffset = "2px";
    });
  }, [region, children]);
  useEffect(() => {
    const onRegionChanged = evt => {
      const code = evt && evt.detail && evt.detail.code;
      if (!code || code === region) return;
      setRegion(code);
    };
    if (typeof window !== "undefined") {
      window.addEventListener("abbyy:region-changed", onRegionChanged);
    }
    return () => {
      if (typeof window !== "undefined") {
        window.removeEventListener("abbyy:region-changed", onRegionChanged);
      }
    };
  }, [region]);
  useEffect(() => {
    const onClickAway = e => {
      if (!dropdownRef.current) return;
      if (!dropdownRef.current.contains(e.target)) {
        setOpen(false);
      }
    };
    document.addEventListener("click", onClickAway, true);
    return () => document.removeEventListener("click", onClickAway, true);
  }, []);
  const onSelect = code => {
    setRegion(code);
    safeSetSavedRegion(code);
    dispatchRegionChanged(code);
    setOpen(false);
  };
  const current = REGIONS.find(r => r.code === region) || REGIONS[0];
  return <div className="not-prose">
      <div className="mb-4 inline-flex items-center gap-2" ref={dropdownRef}>
        <span className="text-sm text-zinc-950/80 dark:text-white/80">Tenant Region:</span>
        <div className="relative">
          <button type="button" aria-haspopup="listbox" aria-expanded={open ? "true" : "false"} onClick={() => setOpen(v => !v)} className="h-8 px-3 rounded-md bg-zinc-900/5 dark:bg-white/5 border border-zinc-950/20 dark:border-white/20 text-sm inline-flex items-center gap-2">
            <span className="text-zinc-950 dark:text-white">{current.label}</span>
            <svg width="8" height="24" viewBox="0 -9 3 24" className="transition-transform text-gray-400 overflow-visible dark:text-gray-600 ml-auto" style={{
    transform: open ? "rotate(270deg)" : "rotate(90deg)"
  }}>
              <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"></path>
            </svg>
          </button>
          {open ? <div role="listbox" className="absolute z-50 left-full top-0 ml-2 w-56 rounded-xl border border-zinc-950/20 dark:border-white/20 bg-white dark:bg-zinc-900 shadow-lg p-2">
              {REGIONS.map(r => {
    const selected = r.code === region;
    return <button key={r.code} type="button" role="option" aria-selected={selected ? "true" : "false"} onClick={() => onSelect(r.code)} className={"w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm hover:bg-zinc-950/5 dark:hover:bg-white/10 text-zinc-950 dark:text-white" + (selected ? " font-medium" : "")}>
                    <span style={selected ? {
      color: "#ff2038"
    } : undefined}>{r.label}</span>
                    <span className={selected ? "ml-3" : "ml-3 invisible"} style={selected ? {
      color: "#ff2038"
    } : undefined}>✓</span>
                  </button>;
  })}
            </div> : null}
        </div>
      </div>
      <div ref={containerRef} className="prose dark:prose-invert max-w-none">{children}</div>
    </div>;
};

The Analytics Reporting Warehouse stores data that can be used to analyze the efficiency of document processing within the system. With this data, you can identify which documents require more time for manual verification and why.

Statistics are collected for Process skills that have at least one Manual Review step and include at least one Document skill. The system compares the document's initial pre-manual review state with its state after processing.

The Analytics Reporting Warehouse is one of Vantage's two reporting warehouses. For an overview of both — and the [Business Processing Reporting](/vantage/developer/reporting/business-reporting) warehouse for transaction-level data — see [Reporting service](/vantage/developer/reporting/reporting-service).

The Analytics Reporting Warehouse stores the following data:

* Information about changes in documents
* Information about document fields:
  * The number of extracted field values
  * The number of changed field values
  * The status of each field (indicating whether it is correct, has recognition issues, has been located incorrectly, or has not been detected)

## Migrating from v1 to v2

Only the path has changed from "/v1/" to "/v2/." There are no request/response field or behavioral changes.

## Downloading a data report

<Note>
  Only users with **Tenant Administrator** or **Processing Supervisor** roles can download data reports. For more information, see [Role-based access control](/vantage/documentation/tenant-admin/tenant-management/role-based-access).
</Note>

To obtain data from the Analytics Reporting Warehouse, send a **GET** request to one of the following resources, depending on the kind of report you need to obtain:

### Obtaining data about documents processed by a Process skill

<VantageRegion>
  ```
  GET https://vantage-us.abbyy.com/api/reporting/v2/qa/process-skills/documents
  ```
</VantageRegion>

### Obtaining data about fields processed by Process and Document skills

<VantageRegion>
  ```
  GET https://vantage-us.abbyy.com/api/reporting/v2/qa/process-skills/fields
  ```
</VantageRegion>

The request accepts the following parameters:

* **startDate**. The first day of the period for which data should be downloaded (sample formatting: 2022-01-07T13:03:38, time should be in UTC). This is a required parameter.
* **endDate**. The last day of the period for which data should be downloaded (sample formatting: 2022-09-07T13:03:38, time should be in UTC).
* **processSkillId**. The ID of the Process skill the data for which should be downloaded. This is a required parameter.
* **documentSkillId**. The ID of the Document skill for which the data should be downloaded.

<Info>
  You can include this parameter only in the `/api/reporting/v2/qa/process-skills/fields` request.
</Info>

* **imageType**. The type of document image. Possible values: Unknown, Receipt, A4, BusinessCard, Book, Id, PassportRus, DiscountCard, BankCard, NotDocument, PassportPage.
* **imageColority**. Indicates whether the document's first page is color, black, or black and white. Possible values: BlackWhite, Gray, Color.
* **imageSource**. The source of the document image. Possible values: Unknown, Photo, Scan, Synthetic, Screenshot, Pdf.
* **wasCorrectedInManualReview**. Indicates whether the document fields were corrected during manual review.
* **wasDocumentTypeChangedInManualReview**. Indicates whether the document type was changed during manual review.

The resulting CSV file will contain the following information sorted into columns.

### Report about changes in documents

| Column                                  | Description                                                                                                                                      |
| :-------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| `ProcessSkillId`                        | The ID of the Process skill.                                                                                                                     |
| `ProcessSkillVersion`                   | The version of the Process skill.                                                                                                                |
| `ProcessSkillName`                      | The name of the Process skill.                                                                                                                   |
| `DocumentSkillId`                       | The ID of the Document skill.                                                                                                                    |
| `DocumentSkillVersion`                  | The version of the Document skill.                                                                                                               |
| `DocumentSkillName`                     | The name of the Document skill.                                                                                                                  |
| `TransactionId`                         | The ID of the transaction.                                                                                                                       |
| `HasManualReview`                       | Indicates whether the document was manually reviewed. Possible values: 1 or 0.                                                                   |
| `DocumentId`                            | The ID of the document passed for processing.                                                                                                    |
| `DocumentName`                          | The name of the document passed for processing.                                                                                                  |
| `PageSize`                              | The size of the document's first page in pixels (width and height).                                                                              |
| `ImageColority`                         | Indicates whether the document's first page is color, gray, or black and white.                                                                  |
| `ImageSource`                           | The image source of the document's first page. For example: scan, photo, PDF file, screenshot, etc.                                              |
| `ImageType`                             | The image type of the document's first page. For example: A4, receipt, bank card, etc.                                                           |
| `DPI`                                   | The number of dots (or pixels) in the document's first page.                                                                                     |
| `TransactionParameter1..N`              | Transaction parameters passed for processing. If the document does not contain any transaction parameters, the value in the report will be null. |
| `DimensionField1..MValue`               | Dimension fields passed for processing. If the document does not contain any dimension fields, the value in the report will be null.             |
| `DocumentSkillChanged`                  | Indicates whether the document type was changed during manual review. Possible values: true, false.                                              |
| `DocumentSkillIdUsedBeforeManualReview` | The Document skill applied to the document before the Manual Review stage.                                                                       |
| `NumberOfExportedFields`                | The number of exported fields in the document.                                                                                                   |
| `NumberOfChangedFields`                 | The number of manually changed fields in the document.                                                                                           |

Data for this report will be stored for 12 months.

### Report about changes in fields

| Column                     | Description                                                                                                                                                                                                                                                                                                                           |
| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ProcessSkillId`           | The ID of the Process skill.                                                                                                                                                                                                                                                                                                          |
| `ProcessSkillVersion`      | The version of the Process skill.                                                                                                                                                                                                                                                                                                     |
| `ProcessSkillName`         | The name of the Process skill.                                                                                                                                                                                                                                                                                                        |
| `DocumentSkillId`          | The ID of the Document skill.                                                                                                                                                                                                                                                                                                         |
| `DocumentSkillVersion`     | The version of the Document skill.                                                                                                                                                                                                                                                                                                    |
| `DocumentSkillName`        | The name of the Document skill.                                                                                                                                                                                                                                                                                                       |
| `TransactionId`            | The ID of the transaction.                                                                                                                                                                                                                                                                                                            |
| `HasManualReview`          | Indicates whether the document was manually reviewed. Possible values: 1 or 0.                                                                                                                                                                                                                                                        |
| `DocumentId`               | The ID of the document passed for processing.                                                                                                                                                                                                                                                                                         |
| `DocumentName`             | The name of the document passed for processing.                                                                                                                                                                                                                                                                                       |
| `PageSize`                 | The size of the document's first page in pixels (width and height).                                                                                                                                                                                                                                                                   |
| `ImageColority`            | Indicates whether the document's first page is color, gray, or black and white.                                                                                                                                                                                                                                                       |
| `ImageSource`              | The image source of the document's first page. For example: scan, photo, PDF file, screenshot, etc.                                                                                                                                                                                                                                   |
| `ImageType`                | The image type of the document's first page. For example: A4, receipt, bank card, etc.                                                                                                                                                                                                                                                |
| `DPI`                      | The number of dots (or pixels) in the document's first page.                                                                                                                                                                                                                                                                          |
| `TransactionParameter1..N` | Transaction parameters passed for processing. If the document does not contain any transaction parameters, the value in the report will be null.                                                                                                                                                                                      |
| `DimensionField1..MValue`  | Dimension fields passed for processing. If the document does not contain any dimension fields, the value in the report will be null.                                                                                                                                                                                                  |
| `NumberOfExportedFields`   | The number of exported fields in the document.                                                                                                                                                                                                                                                                                        |
| `NumberOfChangedFields`    | The number of manually changed fields in the document.                                                                                                                                                                                                                                                                                |
| `FieldID`                  | The ID of the document field.                                                                                                                                                                                                                                                                                                         |
| `FieldName`                | The name of the document field.                                                                                                                                                                                                                                                                                                       |
| `Correct`                  | Information about the correction status of non-repeating fields and the number of instances of repeating fields that weren't corrected. Possible values:<br />- 1, if the non-repeating field wasn't corrected during manual review.<br />- The number of instances of a repeating field that weren't corrected during manual review. |
| `RecognitionIssue`         | Information about recognition issues during the processing of document fields. Possible values:<br />- 1, if the non-repeating field's value was corrected, but the region was not.<br />- The number of instances where the values of a repeating field were corrected during manual review.                                         |
| `DetectedIncorrectly`      | Information about corrections that were made during the manual review. Possible values:<br />- 1, if the region and value of a non-repeating field were corrected.<br />- The number of instances where regions and values of a repeating field were corrected during manual review.                                                  |
| `NotDetected`              | Information about field values that were not extracted before manual review. Possible values:<br />- 1, if the value of a non-repeating field wasn't extracted before manual review and was created by a verifier.<br />- The number of instances of a repeating field's values that were created during manual review.               |
| `IsInDocument`             | Indicates if the field has at least one instance in the document. Possible values: true, false.                                                                                                                                                                                                                                       |

Data for this report will be stored for 14 days.

Data obtained in CSV format may be further analyzed in any BI tool.
