Inventory Selection object

The Selection object is included in some inventory composition terms and can be used to filter the inventory that's included or excluded from the deal. In a commitment deal, you can also apply a set of expansion terms that apply after the deal has been expanded. Each selection object can have a different type of limitations that depend on the inventory composition. These types determine limitations for allowing and blocking values.

Here's what you need to know about the selection object:

Selection object

The Selection object includes the following two fields, each of which have different types—depending on the inventory composition. The Inventory channel objects and Inventory Composition object both require a Selection object.

Field Required? Data Type Description
base Required Object The terms used for the deal in all cases. Contains a corresponding composition selection object type to allow or block values.
expansion Optional Object The terms included only when a deal expands. Contains a corresponding composition selection object to allow or block values.
NOTE: Only commitment deals have expansion.

Composition selection types

The Selection object can have different types of valid inputs. There are rules and restrictions depending on the composition selection type. These types are fixed based on which inventory composition term is chosen. As a result, some terms may only allow values, while others support both allowing and blocking values.

The following table lists the different composition selection types.

Selection Type Description
MultiCompositionSelection One or more include and exclude fields to allow and block values.
SingleCompositionSelection A single include or exclude object to allow or block values.
InclusionCompositionSelection Only the include field to allow values.
ExclusionCompositionSelection Only the exclude field to block values.

Each type follows the same logic for assigning values. Here's what you need to know about allowing and blocking values:

MultiCompositionSelection object

The MultiCompositionSelection object supports one or both fields, as a union of the list of values to allow and block. Both including and excluding elements is possible with the MultiCompositionSelection object.

Property Required? Data Type Description
included Optional String array A list of IDs that identifies values to be included.
excluded Optional String array A list of IDs that identifies values to be excluded.

SingleCompositionSelection object

The SingleCompositionSelection object restricts composition to include or exclude one group of values, but not both at the same time. Use this object when only one value applies at a time.

IMPORTANT: The included or excluded fields are exclusive. You can specify only one field, not both.

Property Required? Data Type Description
included Optional String array A list of IDs that identifies values to be included.
excluded Optional String array A list of IDs that identifies values to be excluded.

InclusionCompositionSelection object

The InclusionCompositionSelection object provides a single list of what to include from selection. This object only supports including values.

Property Required? Data Type Description
included Optional String array A list of IDs that identifies values to be included.

ExclusionCompositionSelection object

The ExclusionCompositionSelection object provides a single list of what to exclude from selection. This object only supports excluding values.

Property Required? Data Type Description
excluded Optional String array A list of IDs that identifies values to be excluded.