Predicate Data Object - Customer Management

Defines a predicate for the list of entities requested using one of the search operations, for example SearchAccounts, SearchClientLinks, SearchCustomers, or SearchUserInvitations.

Syntax

<xs:complexType name="Predicate" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:sequence>
    <xs:element minOccurs="0" name="Field" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="Operator" type="tns:PredicateOperator" />
    <xs:element minOccurs="0" name="Value" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

Elements

Element Description Data Type
Field The name of the element for the object you are searching.

For possible values, see the Remarks below.
string
Operator Defines the relationship between the field and the value. PredicateOperator
Value The string to search in the specified field.

The length of this string must be four or greater, unless the field is set to MarketCountry or MarketLanguage.
string

Remarks

The supported Field element and Operator elements of a Predicate object for each service operation are provided in detail below.

SearchAccounts Predicates

For the SearchAccounts service operation, the following are supported Field element and Operator elements of a Predicate object.

Field Operator Description
AccountId Equals

In
Use this field to search the Id element of the AdvertiserAccount.
AccountLifeCycleStatus Equals Use this field to search the AccountLifeCycleStatus element of the AdvertiserAccount.

Possible values include any string representation of the AccountLifeCycleStatus, for example Value = AccountLifeCycleStatus.Active.ToString() or Value="Active".
AccountName Contains

Equals
Use this field to search the Name element of the AdvertiserAccount.
AccountNumber Contains

Equals

In
Use this field to search the Number element of the AdvertiserAccount.
CustomerId Equals Use this field to search the Id element of the Customer.
UserId Equals Use this field to search the UserId element of the User.

For the SearchClientLinks service operation, the following are supported Field element and Operator elements of a Predicate object.

Field Operator Description
ClientAccountId Equals

In
Use this field to search the ClientAccountId element of the ClientLink.
ManagingCustomerId Equals Use this field to search the ManagingCustomerId element of the ClientLink.

SearchCustomers Predicates

For the SearchCustomers service operation, the following are supported Field element and Operator elements of a Predicate object.

Field Operator Description
AccountId Equals Use this field to search the Id element of the AdvertiserAccount.
AccountName Contains

Equals
Use this field to search the Name element of the AdvertiserAccount.
AccountNumber Contains

Equals
Use this field to search the Number element of the AdvertiserAccount.
ApplicationScope Equals For internal use only.
CreatedDate GreaterThanEquals

LessThanEquals
Use this field to search the date when the customer was created or signed up.

The date is stored in Coordinated Universal Time (UTC). Only the month, day, and year of the specified string are used for search. If you specify the hour, minutes, and seconds of a date they will be ignored.

For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.
CustomerId Equals

In
Use this field to search the Id element of the Customer.
CustomerName Contains

Equals
Use this field to search the Name element of the Customer.
CustomerNumber Contains

Equals
Use this field to search the Number element of the Customer.
MarketCountry Equals Use this field to search the MarketCountry element of the Customer.

The MarketCountry and MarketLanguage predicate fields are not required; however, if either is specified then both are required.
MarketLanguage Equals Use this field to search the MarketLanguage element of the Customer.

The MarketCountry and MarketLanguage predicate fields are not required; however, if either is specified then both are required.
UserName Equals Use this field to search the UserName element of the User.

SearchUserInvitations Predicates

For the SearchUserInvitations service operation, the following are supported Field element and Operator elements of a Predicate object.

Field Operator Description
CustomerId Equals Use this field to search the CustomerId element of the UserInvitation.

Requirements

Service: CustomerManagementService.svc v12
Namespace: https://bingads.microsoft.com/Customer/v12/Entities

Used By

SearchAccounts
SearchClientLinks
SearchCustomers
SearchUserInvitations