> For the complete documentation index, see [llms.txt](https://ce-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ce-docs.keywordrush.com/modules/affiliate/viglink.md).

# Sovrn (Viglink) module

### Getting API Key and Secret Key

To find your API key and Secret key for a site:

1. Log into the Sovrn Platform.
2. Go to Commerce > Settings > Site.
3. Under Actions, click on the Key to view the API keys for that site.
4. If no secret key has been created, click on "Generate Secret Key".

<figure><img src="/files/nwaQDac8PKBEsNTetdMS" alt=""><figcaption></figcaption></figure>

### Price comparison

The module allows you to search for a specific product in the Sovrn database and obtain all offers for that product. You simply need to provide a product URL from any supported retailer.

<figure><img src="/files/ZBBNOjKyYh1y1X2xfr6d" alt=""><figcaption></figcaption></figure>

### Price filter

Sovrn API provides a simple search function that returns all products with keywords in the product title. To find the desired product, it is recommended to add a filter by price.

<figure><img src="/files/TynKvpWPYuzYfJypkmr5" alt=""><figcaption></figcaption></figure>

### Merchnat domains

Unfortunately, the Sovrn API does not return direct product URLs or merchant domains. As a result, some merchant domains may not be detected correctly. To resolve this, add the following code to your `functions.php` file with merchant-to-domain pairs like this:

```php
function my_viglink_merchant2domain($m2d)
{
    $m2d['Verizon'] = 'verizon.com';
    $m2d['Lowe\'s'] = 'lowes.com';
    $m2d['Dell'] = 'dell.com';

    return $m2d;
}

add_filter('cegg_viglink_merchant2domain', 'my_viglink_merchant2domain');
```
