CampaignCriterion Data Object - Campaign Management

Defines a criterion that you want applied to the specified campaign.

Do not try to instantiate a CampaignCriterion. You can create one or more of the following objects that derive from it.

Syntax

<xs:complexType name="CampaignCriterion" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:sequence>
    <xs:element name="CampaignId" type="xs:long" />
    <xs:element minOccurs="0" name="Criterion" nillable="true" type="tns:Criterion" />
    <xs:element xmlns:q99="http://schemas.datacontract.org/2004/07/System.Collections.Generic" minOccurs="0" name="ForwardCompatibilityMap" nillable="true" type="q99:ArrayOfKeyValuePairOfstringstring" />
    <xs:element minOccurs="0" name="Id" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="Status" nillable="true" type="tns:CampaignCriterionStatus" />
    <xs:element minOccurs="0" name="Type" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

Elements

The CampaignCriterion object has the following elements: CampaignId, Criterion, ForwardCompatibilityMap, Id, Status, Type.

Element Description Data Type
CampaignId The identifier of the campaign to apply the criterion to. long
Criterion The criterion to apply to the campaign. The criterion helps determine whether ads in the campaign are served.

For a list of available criterion types, see CampaignCriterionType.
Criterion
ForwardCompatibilityMap The list of key and value strings for forward compatibility to avoid otherwise breaking changes when new elements are added in the current API version.

Forward compatibility changes will be noted here in future releases. There are currently no forward compatibility changes for this object.
KeyValuePairOfstringstring array
Id The unique Microsoft Advertising identifier for the campaign criterion. long
Status A status value that determines whether to apply the criterion to the campaign. CampaignCriterionStatus
Type The type of campaign criterion. For more information, see Remarks. string

Remarks

For Java and the .NET languages, do not set the Type element because the value is determined by whether you instantiate a BiddableCampaignCriterion or NegativeCampaignCriterion.

If you generate the SOAP manually, use the type attribute of the <CampaignCriterion> node as shown in the following example, to specify the type of criterion.

<CampaignCriterion i:type="BiddableCampaignCriterion" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Id i:nil="true" />
    <Status i:nil="true" />
     . . .
</CampaignCriterion>

Requirements

Service: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13

Used By

AddCampaignCriterions
GetCampaignCriterionsByIds
UpdateCampaignCriterions