> For the complete documentation index, see [llms.txt](https://docs.relevant-digital.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getbidderhandler.md).

# relevantDigital.getBidderHandler()

Map a Prebid bid to its Relevant Yield SSP handler and identifier.

Use `relevantDigital.getBidderHandler(bid)` to retrieve the Relevant Yield handler for a bid's bidder.

The handler includes the SSP ID used in Relevant Yield.

### Use per-SSP settings

Use this function with [placement tag fields](/technical/custom-configuration/configure-placement-tag-fields.md), [Prebid configuration fields](/technical/custom-configuration/configure-prebid-config-tag-fields.md), or site tag fields. These settings can store values per SSP through **ByObject** fields or multi-select **String** fields.

Map each bid to its SSP ID before retrieving values from placement data, such as `adUnit.data`.

### Return value

#### `id`

The Relevant Yield SSP ID for the bid's bidder.

### Example

This example applies a per-SSP **CPM Multiplier** from placement tag fields.

Use [bidCpmAdjustment](https://docs.prebid.org/dev-docs/publisher-api-reference/bidderSettings.html#22-bidcpmadjustment) to adjust the bid. Use [relevantDigital.getAdUnitInstanceByBid()](/technical/integration/javascript-api/relevantdigital.getadunitinstancebybid.md) to find the matching placement. Then use `relevantDigital.getBidderHandler()` to retrieve its SSP settings.

```
window.relevantDigital = window.relevantDigital || {};
relevantDigital.cmd = relevantDigital.cmd || [];
relevantDigital.cmd.push(() => {

    // Get the 'pbjs' object like this to support changing
    // pbjs-variable name
    const { pbjs } = relevantDigital.getInstance();
    
    pbjs.bidderSettings = pbjs.bidderSettings || {};
    pbjs.bidderSettings.standard = pbjs.bidderSettings.standard||{};
    
    // Add bid cpm adjustment function for all bidders
    pbjs.bidderSettings.standard.bidCpmAdjustment = (cpm, bid) => {
    
        // Get the AdUnitInstance object for the bid
        const adUnitInstance =
            relevantDigital.getAdUnitInstanceByBid(bid);
        
        // Grab 'customSettingsBySsp' from the AdUnit associated
        // with the AdUnitInstance.
        const { customSettingsBySsp } = adUnitInstance.adUnit.data
        
        // Use getBidderHandler() to get the SSP id in Yield
        const sspId = relevantDigital.getBidderHandler(bid).id;

        const customSettings = customSettingsBySsp[sspId];
        return cpm * customSettings.cpmMultiplier;
    };
});
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getbidderhandler.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
