> 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を使用する

Tokenization追跡用のcorrelation IDを取得および設定します。

## 概要

各トークナイゼーション処理には関連する `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>

### 関連ページ

* [カードの有効性を確認](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md)
* [Green flow のデジタル化](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/green-flow-digitization.md)
* [Yellow flow のデジタル化](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md)
* [カードをデジタル化する](https://docs.payments.thalescloud.io/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
