> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/additional-features/use-correlationid.md).

# correlationIDを使用する

## 概要

各トークナイゼーション処理には関連する `correlationID` があり、トラブルシューティングのためにThalesと共有できます。

この識別子は2つの方法で取得できます:

* 有効性チェックの成功、またはトークナイゼーションエラーから取得します。
* 独自のカスタム `correlationID` を呼び出すときに `check有効性()` .

**利用可能開始:** `6.15.0`

## SDK統合

### 取得 `correlationID` から `check有効性()`

* 成功後 `check有効性()`
  * 有効性チェックが成功した後、 `acceptanceData.correlationID`.
  * 後で同じトークナイゼーション処理を追跡する必要がある場合は、この値を保存してください。
* でエラー発生後 `check有効性()`
  * 読み取るか保存する `correlationID` エラーが捕捉されたらすぐに。

次の例では、 `correlationID` `check有効性()` :

```kotlin
mgCardEnrollmentService.check有効性(
    eligibilityData,
    instrumentData,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: イシュアData
        ) {
            val correlationId = termsAndConditions.correlationId
            Log.d(TAG, "Correlation ID: $correlationId")
        }

        override fun onError(error: MobileGatewayError) {
            val correlationId = error.correlationId
            Log.e(TAG, "デジタル化に失敗しました。Correlation ID: $correlationId")
        }
    }
)
```

`ProvisioningServiceError` も提供します `getCorrelationId()`.

### カスタムcorrelationIDを設定

設定できます `correlationID` のみ `check有効性()`.

次の `check有効性()` バリアントがこのパラメータをサポートしています。

イシュアのバックエンド、デジタルウォレットアプリケーション、Thalesのログをまたいでトークナイゼーション処理を追跡したい場合は、カスタム値を使用します。

独自の識別子形式を使うこともできます。たとえば:

```
ORDER-12345-SESSION-67890
```

#### instrument dataを使ってカスタムcorrelationIDを設定

```kotlin
val correlationId = UUID.randomUUID().toString()

mgCardEnrollmentService.check有効性(
    eligibilityData,
    instrumentData,
    correlationId,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: イシュアData
        ) {
            val returnedCorrelationId = termsAndConditions.correlationId
            Log.d(TAG, "デジタル化のCorrelation ID: $returnedCorrelationId")
        }

        override fun onError(error: MobileGatewayError) {
            val returnedCorrelationId = error.correlationId
            Log.e(TAG, "デジタル化に失敗しました。Correlation ID: $returnedCorrelationId")
        }
    }
)
```

#### pushSessionIDを使ってカスタムcorrelationIDを設定

<pre class="language-kotlin"><code class="lang-kotlin"><strong>mgCardEnrollmentService.check有効性(
</strong>    eligibilityData,
    pushSessionId,
    correlationId,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: イシュアData
        ) {
            val trackingId = termsAndConditions.correlationId
            Log.d(TAG, "プッシュ登録のCorrelation ID: $trackingId")
        }

        override fun onError(error: MobileGatewayError) {
            val trackingId = error.correlationId
            Log.e(TAG, "プッシュ登録に失敗しました。Correlation ID: $trackingId")
        }
    }
)
</code></pre>

### 関連ページ

* [カードの有効性を確認](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md)
* [Green flow のデジタル化](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/green-flow-digitization.md)
* [Yellow flow のデジタル化](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md)
* [カードをデジタル化する](/nfc-wallet-sdk-android/ja/help/error-management/mg-error-management/digitizing-a-card.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/additional-features/use-correlationid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
