> For the complete documentation index, see [llms.txt](https://subify-1.gitbook.io/sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://subify-1.gitbook.io/sdk/subify-sdk-for-developers/subifysdk-object-methods/changevariant-targetproductid-selectedvariantid.md).

# changeVariant(targetProductId, selectedVariantId)

If you are using a customized variation selection approach not supported by the SDK, or if you wish to change the variant in certain situations, you can achieve this by calling the **`changeVariant`** method. This method accepts two numerical parameters:

**`targetProductId`**: represents the ID of the product for which the variant needs to be changed.

**`selectedVariantId`**: corresponds to the ID of the variant that you want to select for the specified product

```typescript
window.subifySdk.changeVariant(12345,1234567)

```
