# 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:2869

##### 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:2897

### 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:2881

### 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:2873

### 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:2891