title | subtitle | description | author | ms.author | ms.service | ms.topic |
---|---|---|---|---|---|---|
ProductChannelExclusivity |
Scripts |
Contains the methods used to manage the channel exclusivity product group. |
jonmeyers |
jonmeyers |
bing-ads-scripts |
article |
Contains the methods for managing a channel exclusivity product group. This object derives from ProductGroup.
Used by the delivery engine to determine whether a product from the advertiser's catalog is served. The engine may serve the product if the product's channel exclusivity matches exactly the channel exclusivity name that getChannelExclusivity returns.
Example usage:
var shoppingCampaign = AdsApp.shoppingCampaigns().withIds(["123456789"]).get().next();
var productGroups = shoppingCampaign.productGroups().get();
while (productGroups.hasNext()) {
var group = productGroups.next();
switch (group.getDimension()) {
case "CHANNEL_EXCLUSIVITY": {
// It's not necessary to cast the product group to a channel exclusivity product
// group since the getValue() method returns the same value as getChannelExclusivity().
// var channelExclusivity = group.asChannelExclusivity().getChannelExclusivity();
var channelExclusivity = group.getValue();
break;
}
// Other cases
}
}
Method Name | Return Type | Description |
---|---|---|
children | ProductGroupSelector | Gets a selector used to filter this product group's list of child product groups. |
getAdGroup | AdGroup | Gets the ad group that this product group belongs to. |
getCampaign | Campaign | Gets the campaign that this product group belongs to. |
getChannelExclusivity | string | Gets the product's channel exclusivity name. |
getDimension | string | Gets this product group's dimension. |
getEntityType | string | Gets this entity's type. |
getId | string | Gets the ID that uniquely identifies this product group. |
getMaxCpc | double | Gets the maximum cost-per-click bid amount for this product group. |
getStats | Stats | Gets the performance data for this product group. |
getValue | string | Gets this product group's value. |
isExcluded | Boolean | Gets a Boolean value that determines whether this product group is excluded. |
isOtherCase | Boolean | Gets a Boolean value that determines whether this product group represents all other cases not represented by its sibling product group. |
parent | ProductGroup | Gets this product group's parent product group. |
setMaxCpc(double cpc) | void | Sets the maximum cost-per-click bid amount to use for this product group. |
Gets a selector used to filter this product group's list of child product groups.
Type | Description |
---|---|
ProductGroupSelector | A selector used to filter the list of children in this product group. |
Gets the ad group that this product group belongs to.
Type | Description |
---|---|
AdGroup | The ad group that this product group belongs to. |
Gets the campaign that this product group belongs to.
Type | Description |
---|---|
Campaign | The campaign that this product group belongs to. |
Gets the product's channel exclusivity name. This method returns the same value as the getValue()
method.
Type | Description |
---|---|
string | The product's channel exclusivity name. For example, Multi-channel or Single-channel. |
Gets this product group's dimension.
Type | Description |
---|---|
String | This product group's dimension, which is set to CHANNEL_EXCLUSIVITY. |
Gets this entity's type.
Type | Description |
---|---|
string | This entity's type, which is ProductChannelExclusivity. |
Gets the ID that uniquely identifies this product group.
Type | Description |
---|---|
string | The ID that uniquely identifies this product group. |
Gets this product group's maximum cost-per-click bid amount.
Type | Description |
---|---|
double | The bid amount. Returns null if not set or this is a negative product group (isExluded is true). |
Gets the performance data for this product group.
To call this method, you must include one of the forDateRange
methods in the product group selector's chain.
Type | Description |
---|---|
Stats | The performance data for this product group. |
Gets the product's channel exclusivity name.
Type | Description |
---|---|
string | The product's channel exclusivity name. This is the same value that the getChannelExclusivity method returns. |
Gets a Boolean value that determines whether this product group is a negative product group.
Type | Description |
---|---|
Boolean | Is true if this product group is a negative group; otherwise, false. For example, instead of including all downhill skis, you exclude them. |
Gets a Boolean value that determines whether this product group represents everything else not represented by its sibling product group (aka., the other case).
Type | Description |
---|---|
Boolean | Is true if this product group represents the "other" case; otherwise, false. For example, if you divide All products (the root node) by Sporting Goods, the service creates a sibling product group that represents the products not in Sporting Goods and sets this field to true. The parent ID of this product group and the Sporting Goods product group point to the root node. |
Gets this product group's parent.
Type | Description |
---|---|
ProductGroup | This product group's parent. |
Sets the maximum cost-per-click bid amount for this product group.
Name | Type | Description |
---|---|---|
cpc | double | The bid amount. The bid amount is in the account's currency, which determines the minimum and maximum bid values you may specify. Do not set the bid if this product group is subdivided (has children) or is a negative product group (isExcluded is true). |
Type | Description |
---|---|
void | Returns nothing. |