> ## 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.

# ビジネス処理レポート

> Vantage のビジネス処理レポートでは、監査や分析のために、トランザクションレベルのデータ、Skill のバージョン、各ステップの所要時間、レビュー担当者の詳細が記録されます。

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>;
};

ビジネス処理レポートは、ドキュメントがどのように処理されているかを示し、監査のためのエンドツーエンドのトランザクション追跡を提供します。Warehouse は、すべてのトランザクション (完了済みおよび処理中) を蓄積し、ビジネスインテリジェンスツールでの分析および可視化を可能にします。データは 12 か月間保持され、所定の期間にわたる分析および監査を実行できます。

次のデータが追跡されます:

* トランザクション ID.
* Skill ID とバージョン.
* 手順ごとの処理パス:
  * ステップの種類
  * 名前
  * ステップの開始および終了の日時
  * 所要時間 (秒)
* 手動確認オペレーター (手動確認オペレーター) の名前とメールアドレス.
* ドキュメントおよびトランザクションの登録パラメータ.

<Info>
  Warehouse は、設定により一度も実行されないアクティビティ内のドキュメント処理イベントに関する情報は保存しません。たとえば、Assemble by files の設定は Vantage のデフォルト動作に対応しているため、このアクティビティでのドキュメント処理はワークフロー内でスキップされます。
</Info>

<div id="migrating-from-v1-to-v2">
  ## v1 から v2 への移行
</div>

Vantage 3.0 以降では、`transaction-steps` v1 エンドポイントは非推奨になっています。後方互換性を確保するため、v2 エンドポイントは、エンドポイント名の変更とクエリパラメーターがリクエストボディに移動した点を除き、同様に動作します。v2 エンドポイントは、大容量データ要求をより適切に処理するため、非同期モデルに移行しています。レポートの作成をリクエストした後、そのレポートが準備完了になるまでステータスをポーリングできます。完了したら、結果をダウンロードできます。

<VantageRegion>
  ```http theme={null}
  // v1: One synchronous call with query parameters
  1. GET https://vantage-us.abbyy.com/api/reporting/v1/transaction-steps?skillId=ABCD&startDate=2025-11-01&endDate=2025-11-18

  // v2: Multiple async calls
  1. POST https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps
  {
    "filters": {
      "skillId": "d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae",
      "transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "startDate": "2025-11-03T17:19:54.386Z",
      "endDate": "2025-11-17T20:05:26.097Z"
    },
    "sendEmailNotification": true
  }

  // Receive request Id
  2. GET https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps/{{requestId}}/status

  // ステータスが "Succeeded" になったら、レポートファイルをダウンロード
  3. GET https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps/{{requestId}}/result/{fileIndex}
  ```
</VantageRegion>

<div id="whats-new">
  ### 新機能
</div>

リクエスト（`/api/reporting/v2/exports/transaction-steps`）では、次の変更があります。

* フィルタがクエリパラメーターからリクエストボディ（`filters` JSON オブジェクト）に移動しました。
* `filters` オブジェクト内で指定する `startDate` が必須になりました。
* 新しい field: `sendEmailNotification`（true/false） - レポートのダウンロード準備が整ったときに、レポートをリクエストしたユーザーにメール通知を送信します。

最終結果（`/api/reporting/v2/exports/transaction-steps/{{requestId}}/result/{fileIndex}`）としてダウンロードされる CSV ファイルには、新たに 2 つの列が追加されました。

* `DocumentsCount`: トランザクション内で処理された Document の数。
* `PagesCount`: トランザクション内で処理されたページの数。

以下で、v2 エンドポイントの動作について詳しく説明します。

<div id="downloading-a-data-report">
  ## データレポートのダウンロード
</div>

<Note>
  Warehouse からデータレポートをダウンロードできるのは、**Tenant Administrator** および **Processing Supervisor** のロールを持つユーザーのみです。詳細については、ロールベースアクセス制御 (RBAC) を参照してください。
</Note>

Vantage API を使用して、Warehouse から CSV ファイル形式でデータを取得できます。これを行うには、次のリソースに **POST** リクエストを送信します。

<VantageRegion>
  ```
  POST https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps
  ```
</VantageRegion>

リクエストボディには、`filters` オブジェクト内に次のプロパティを含める必要があります。

* **skillId**. ダウンロード対象とするトランザクションが属する Skill の ID。任意。
* **transactionId**. フィルタ対象とするトランザクションの ID。任意。
* **startDate**. トランザクションをダウンロードする期間の開始日 (形式の例: 2022-01-07T13:03:38、時刻は UTC) 。**必須。**
* **endDate**. トランザクションをダウンロードする期間の終了日 (形式の例: 2022-09-07T13:03:38、時刻は UTC) 。任意。
* **sendEmailNotification**. レポートリクエストを作成したユーザーに、レポートをダウンロードできる状態になったことを通知するメールを送信します。任意。

```json theme={null}
{
  "filters": {
    "skillId": "d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae",
    "transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "startDate": "2025-11-03T17:19:54.386Z",
    "endDate": "2025-11-17T20:05:26.097Z"
  },
  "sendEmailNotification": true
}
```

レポートリクエストは非同期で実行されるため、レスポンスではリクエストのステータスを確認するために使用する `requestId` が返されます。

結果：

```json theme={null}
{
  "requestId": "8f772512-099c-4050-8dd3-6c4d7af69747"
}
```

レポートのステータスを確認するには、GET リクエストに `requestId` を指定します。

<VantageRegion>
  ```http theme={null}
  GET https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps/{{requestId}}/status
  ```
</VantageRegion>

レポートが作成されると、`status` が "Succeeded" になり、`totalFileCount` にダウンロード可能なファイル数が表示されます。

```json theme={null}
{
  "status": "Succeeded",
  "totalFileCount": 3,
  "filters": {
      "skillId": "d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae",
      "startDate": "2025-11-03T17:19:54.386+00:00",
      "endDate": "2025-11-17T20:05:26.097+00:00"
  }
}
```

生成されたレポートファイルをダウンロードするには、`requestId` を再度渡し、さらにファイルのゼロ始まりインデックスである `fileIndex` を追加して、以下のエンドポイントに対して GET リクエストを行います。たとえば、`"totalFileCount": 3` の場合、利用可能なファイルインデックスは 0、1、2 となります。

<VantageRegion>
  ```http theme={null}
  GET https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps/{{requestId}}/result/{fileIndex}
  ```
</VantageRegion>

CSV レスポンスの例を次に示します。

| **SkillId**                          | **SkillVersion** | **SkillName**  | **TransactionId**                    | **StepName** | **StepType**   | **ManualReviewOperatorName** | **ManualReviewOperatorEmail** | **StartedUtc**      | **CompletedUtc**    | **Status**           | **Duration** | **DocumentsCount** | **PagesCount** | **document\_SourceFileName** | **document\_SourceType** | **transaction\_App** |
| ------------------------------------ | ---------------- | -------------- | ------------------------------------ | ------------ | -------------- | ---------------------------- | ----------------------------- | ------------------- | ------------------- | -------------------- | ------------ | ------------------ | -------------- | ---------------------------- | ------------------------ | -------------------- |
| d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae | 1                | Redaction Test | 6d7e9eeb-86e3-4952-8e29-3f76b3fae59f | Input        | Input          |                              |                               | 11/17/2025 19:37:52 | 11/17/2025 19:38:01 | FinishedSuccessfully | 9            |                    |                | Invoice CA\_2.pdf            | PublicAPI                | PublicAPI            |
| d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae | 1                | Redaction Test | 6d7e9eeb-86e3-4952-8e29-3f76b3fae59f | OCR          | Ocr            |                              |                               | 11/17/2025 19:38:02 | 11/17/2025 19:38:17 | FinishedSuccessfully | 15           |                    |                | Invoice CA\_2.pdf            | PublicAPI                | PublicAPI            |
| d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae | 1                | Redaction Test | 6d7e9eeb-86e3-4952-8e29-3f76b3fae59f | Classify     | Classification |                              |                               | 11/17/2025 19:38:17 | 11/17/2025 19:38:20 | FinishedSuccessfully | 3            |                    |                | Invoice CA\_2.pdf            | PublicAPI                | PublicAPI            |
| d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae | 1                | Redaction Test | 6d7e9eeb-86e3-4952-8e29-3f76b3fae59f | Extract      | Extraction     |                              |                               | 11/17/2025 19:38:21 | 11/17/2025 19:38:44 | FinishedSuccessfully | 23           |                    |                | Invoice CA\_2.pdf            | PublicAPI                | PublicAPI            |
| d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae | 1                | Redaction Test | 6d7e9eeb-86e3-4952-8e29-3f76b3fae59f | Output       | Output         |                              |                               | 11/17/2025 19:38:47 | 11/17/2025 19:39:01 | Failed               | 13           |                    |                | Invoice CA\_2.pdf            | PublicAPI                | PublicAPI            |

<div id="response-structure">
  ### レスポンス構造
</div>

CSV ファイルの各行は、トランザクションに対して実行された 1 つの操作を表します。たとえば、ドキュメントのインポート、認識、または手動確認などです。Warehouse では各操作について、その詳細が次の列として保存されます。

| Column                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SkillId`                     | スキル ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `SkillVersion`                | スキルのバージョン。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `SkillName`                   | スキル名。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `TransactionId`               | トランザクション ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `StepName`                    | イベント名、または Process スキルの場合はアクティビティ名。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `StepType`                    | イベントの種類。取りうる値: <br />- Input (すべてのスキルタイプで利用可能) <br />- Ocr (OCR スキル、または OCR アクティビティを追加した Process スキルで利用可能) <br />- Classification (Classification スキル、または Classification アクティビティを追加した Process スキルで利用可能) <br />- Extraction (すべてのスキルタイプで利用可能) <br />- Condition (Condition アクティビティを追加した Process スキルで利用可能) <br />- CustomActivity (Custom アクティビティを追加した Process スキルで利用可能) <br />- WaitingForManualReview (Manual Review アクティビティを追加した Process スキルで利用可能)。トランザクションが手動確認待ちとなっている時間 <br />- ManualReview (Manual Review アクティビティを追加した Process スキルで利用可能)。オペレーターがトランザクションを確認している時間 <br />- Output (すべてのスキルタイプで利用可能) |
| `ManualReviewOperatorName`    | Manual Review オペレーター名。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `ManualReviewOperatorEmail`   | Manual Review オペレーターのメールアドレス。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `StartedUtc`                  | イベントの開始時刻 (UTC)。例: 5/3/2022 1:59:02 PM。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `CompletedUtc`                | イベントの終了時刻 (UTC)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Status`                      | イベントのステータス。取りうる値: <br />- Processing <br />- Finished Successfully <br />- Canceled <br />- Failed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Duration`                    | イベントの継続時間 (秒単位)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `DocumentsCount`              | トランザクション内で処理されたドキュメント数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PagesCount`                  | トランザクション内で処理されたページ数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `document_*`, `transaction_*` | 処理に渡されたドキュメントまたはトランザクションのパラメーター。ヘッダーのドキュメントパラメーターには接頭辞 **document\_** が、トランザクションパラメーターには接頭辞 **transaction\_** が追加されます。例: **document\_SourceFileName**。トランザクションに、同じ名前で値のみが異なるパラメーターを持つドキュメントが含まれている場合、Warehouse はこのパラメーターの一意なすべての値をカンマ区切りで一覧表示します。たとえば、トランザクション内のすべてのファイル名が対象となります。                                                                                                                                                                                                                                                                                                                       |

準備されたデータは、リクエストの完了後 2 週間保存されます。CSV 形式で取得したデータは、任意の BI ツールでさらに分析できます。

<div id="retrieving-a-list-of-reporting-requests">
  ## レポート要求の一覧を取得する
</div>

指定した期間内に作成されたレポート要求の一覧を取得するには、次のエンドポイントに対して `GET` リクエストを送信します。このとき、`createdFrom` と `createdTo` は日付範囲を表し、`statusFilter` には次のいずれかの値を指定します: `New`、`Queued`、`Processing`、`Succeeded`、`Failed`、`Cancelled`。これは、リクエスト ID をどこかに紛失してしまった場合などに役立ちます。

<VantageRegion>
  ```http theme={null}
  GET https://vantage-us.abbyy.com/api/reporting/v2/exports/transaction-steps?statusFilter=Succeeded&createdFrom=2025-11-05&createdTo=2025-11-17
  ```
</VantageRegion>

レスポンスにはレポート要求の配列が含まれます。

```json theme={null}
{
  "requests": [
    {
      "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "New",
      "completedUtc": "2025-11-18T22:22:00.294Z",
      "createdUtc": "2025-11-18T22:20:49.294Z",
      "totalFileCount": "2",
      "filters": {
        "skillId": "d0e27b2d-bcc6-4129-bfd1-c1e37ee3efae",
        "startDate": "2025-11-03T17:19:54.386+00:00",
        "endDate": "2025-11-17T20:05:26.097+00:00"
      }
    },
    {
      "requestId": "48293032-5717-4562-b3fc-2c963f66afa6",
      "status": "Succeeded",
      "completedUtc": "2025-12-18T22:22:00.294Z",
      "createdUtc": "2025-12-18T22:20:49.294Z",
      "totalFileCount": "4",
      "filters": {
        "skillId": "dk3ioda-bcc6-4129-bfd1-c1e37ee3efae",
        "startDate": "2025-11-03T17:19:54.386+00:00",
        "endDate": "2025-11-17T20:05:26.097+00:00"
      }
    }
  ]
}
```
