# Interface Conversion

#### Description

Methods related to performing a conversion with SheerID.

interface Conversion {
convert(conversionRequest: ConversionRequest): void;
convertByTrackingId(
accountId: string,
trackingId: string,
conversionRequest: ConversionRequest,
): Promise<ConversionResponse>;
convertByVerificationId(
verificationId: string,
conversionRequest: ConversionRequest,
): Promise<ConversionResponse>;
listenForVerificationId(): void;
}

- Defined in jslib/src/lib/types/types.ts:2888

##### Index

### Methods

convert
convertByTrackingId
convertByVerificationId
listenForVerificationId

## Methods

### convert

- convert(conversionRequest: ConversionRequest): void

  #### Parameters

  - conversionRequest: ConversionRequest

  #### Returns void

  #### Description

  Attempt to record a conversion using a verificationId retrieved from cookies Use as step 2 of 2, in combination with listenForVerificationId

  - Defined in jslib/src/lib/types/types.ts:2916

### convertByTrackingId

- convertByTrackingId(
  accountId: string,
  trackingId: string,
  conversionRequest: ConversionRequest,
  ): Promise<ConversionResponse>

  #### Parameters

  - accountId: string
  - trackingId: string
  - conversionRequest: ConversionRequest

  #### Returns Promise<ConversionResponse>

  #### Description

  Record a conversion to the REST API using a previously-supplied trackingId

  - Defined in jslib/src/lib/types/types.ts:2900

### convertByVerificationId

- convertByVerificationId(
  verificationId: string,
  conversionRequest: ConversionRequest,
  ): Promise<ConversionResponse>

  #### Parameters

  - verificationId: string
  - conversionRequest: ConversionRequest

  #### Returns Promise<ConversionResponse>

  #### Description

  Record a conversion to the REST API using verificationId

  - Defined in jslib/src/lib/types/types.ts:2892

### listenForVerificationId

- listenForVerificationId(): void

  #### Returns void

  #### Description

  Listen to a SheerID iFrame form and store verificationId as a cookie. Use as step 1 of 2, in combination with convert()

  - Defined in jslib/src/lib/types/types.ts:2910