> 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/es/additional-features/use-correlationid.md).

# Usar correlationID

## Descripción general

Cada proceso de tokenización tiene un `correlationID` asociado que puedes compartir con Thales para ayudar con la resolución de problemas.

Este identificador se puede obtener de dos maneras:

* A partir de una comprobación de elegibilidad exitosa o de un error de tokenización.
* También puedes asignar tu propio `correlationID` al llamar a `checkEligibility()` .

**Disponible desde:** `6.15.0`

## Integración del SDK

### Obtener `correlationID` de `checkEligibility()`

* Después de una comprobación exitosa `checkEligibility()`
  * Después de una comprobación de elegibilidad exitosa, lee `acceptanceData.correlationID`.
  * Guarda este valor si necesitas rastrear el mismo proceso de tokenización más adelante.
* Después del error en `checkEligibility()`
  * Lee o guarda `correlationID` en cuanto se capture el error.

El siguiente ejemplo explica cómo obtener `correlationID` `checkEligibility()` :

```kotlin
mgCardEnrollmentService.checkEligibility(
    eligibilityData,
    instrumentData,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: IssuerData
        ) {
            val correlationId = termsAndConditions.correlationId
            Log.d(TAG, "Correlation ID: $correlationId")
        }

        override fun onError(error: MobileGatewayError) {
            val correlationId = error.correlationId
            Log.e(TAG, "La digitalización falló. Correlation ID: $correlationId")
        }
    }
)
```

`ProvisioningServiceError` también proporciona `getCorrelationId()`.

### Establecer un correlationID personalizado

Puedes establecer `correlationID` solo en `checkEligibility()`.

Las siguientes `checkEligibility()` variantes admiten este parámetro.

Usa un valor personalizado cuando quieras rastrear un proceso de tokenización a través del backend del emisor, la aplicación de cartera digital y los registros de Thales.

También puedes usar tu propio formato de identificador, por ejemplo:

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

#### Establecer un correlationID personalizado con datos del instrumento

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

mgCardEnrollmentService.checkEligibility(
    eligibilityData,
    instrumentData,
    correlationId,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: IssuerData
        ) {
            val returnedCorrelationId = termsAndConditions.correlationId
            Log.d(TAG, "ID de correlación de digitalización: $returnedCorrelationId")
        }

        override fun onError(error: MobileGatewayError) {
            val returnedCorrelationId = error.correlationId
            Log.e(TAG, "La digitalización falló. Correlation ID: $returnedCorrelationId")
        }
    }
)
```

#### Establecer un correlationID personalizado con un pushSessionID

<pre class="language-kotlin"><code class="lang-kotlin"><strong>mgCardEnrollmentService.checkEligibility(
</strong>    eligibilityData,
    pushSessionId,
    correlationId,
    object : CardEligibilityListener {
        override fun onSuccess(
            termsAndConditions: TermsAndConditions,
            issuerData: IssuerData
        ) {
            val trackingId = termsAndConditions.correlationId
            Log.d(TAG, "ID de correlación del registro push: $trackingId")
        }

        override fun onError(error: MobileGatewayError) {
            val trackingId = error.correlationId
            Log.e(TAG, "Falló el registro push. Correlation ID: $trackingId")
        }
    }
)
</code></pre>

### Páginas relacionadas

* [Comprobar la elegibilidad de la tarjeta](/nfc-wallet-sdk-android/es/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md)
* [Digitalización del flujo verde](/nfc-wallet-sdk-android/es/implement-nfc-wallet/tokenize-a-card/digitize-a-card/green-flow-digitization.md)
* [Digitalización del flujo amarillo](/nfc-wallet-sdk-android/es/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md)
* [Digitalización de una tarjeta](/nfc-wallet-sdk-android/es/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/es/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.
