Service Providers who manage Prebid wrappers on behalf of multiple publishers and handle payments to the publishers need to declare their intermediary status in the Supply Chain (a.k.a SChain) object. The IAB OpenRTB SupplyChain Object Specification prohibits SSPs from adding upstream intermediaries, so publishers or Prebid.js managed service providers need to specify schain information.
Two modes are supported:
Global Supply Chains
Use this configuration when the Prebid.js implementation is managed by an entity that needs to add an SChain node to every bid request. i.e. payments flow through this entity for all traffic.
Bidder-Specific Supply Chains
Use this configuration when one or more bid adapters is an entity (such as a reseller) that requires an SChain node, but other adapters do not require the node. e.g. payments flow through a bidder that doesn’t add its own schain node.
How to Use the Module
First, build the schain module into your Prebid.js package:
gulp build --modules=schain,...
The module performs validations on the schain data provided and makes it available to bidder adapters on the bidRequest object.
Global Supply Chains
Call setConfig with the schain object to be used:
Bidder-Specific Supply Chains
This method uses the pbjs.setBidderConfig function, with a syntax similar to the global scenario above.
You can find more information about the pbjs.setBidderConfig function in the Publisher API Reference.
Global and Bidder-Specific Together
Yes, you can set both global and bidder-specific SChain configs. When together, the schain config setup via pbjs.setConfig acts as a global config that applies to all your bidders, while pbjs.setBidderConfig overrides the global config for the noted bidder(s).
SChain Config Syntax
SChain Param
Scope
Type
Description
Example
validation
optional
string
'strict': In this mode, schain object will not be passed to adapters if it is invalid. Errors are thrown for invalid schain object. 'relaxed': Errors are thrown for an invalid schain object but the invalid schain object is still passed to adapters. 'off': No validations are performed and schain object is passed as-is to adapters. The default value is 'strict'.
Adapters can read the bidRequest.schain object and pass it through to their endpoint. The adapter does not need to be concerned about whether a bidder-specific schain was provided; the system will provide the relevant one.