谓词数据对象 - 客户管理

定义使用搜索操作之一请求的实体列表的谓词,例如 SearchAccountsSearchClientLinksSearchCustomersSearchUserInvitations

语法

<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>

元素

Predicate 对象具有以下元素:FieldOperatorValue

元素 说明 数据类型
字段 要搜索的对象元素的名称。

有关可能的值,请参阅下面的 说明
string
运算符 定义字段和值之间的关系。 PredicateOperator
在指定字段中搜索的字符串。

此字符串的长度必须为 4 或更大,除非字段设置为 MarketCountry 或 MarketLanguage。
string

备注

下面详细介绍了每个服务操作的谓词对象支持的 Field 元素和 Operator 元素。

SearchAccounts 谓词

对于 SearchAccounts 服务操作,以下是 Predicate 对象的支持 Field 元素和 Operator 元素。

字段 运算符 说明
AccountId 等于

位置
使用此字段搜索 广告商帐户的 Id 元素。
AccountLifeCycleStatus 等于 使用此字段搜索 广告商帐户的 AccountLifeCycleStatus 元素。

可能的值包括“Active”、“Draft”、“Inactive”、“Pause”、“Pending”和“Suspended”。
- 按“活动”状态请求帐户时,操作将返回 AccountLifeCycleStatus 设置为 “活动”的帐户。 该操作还会返回 AccountLifeCycleStatus 设置为 Pause 的帐户,其中 PauseReason 值为 2 (计费服务暂停了帐户) 。
- 通过“暂停”状态请求帐户时,操作将返回 AccountLifeCycleStatus 设置为 Pause 的帐户,其中 PauseReason 值为 1 (用户暂停帐户) 或 4 (用户和计费服务暂停帐户) 。
AccountName Contains

等于
使用此字段可搜索 广告商帐户的 Name 元素。
AccountNumber Contains

等于

位置
使用此字段搜索 广告商帐户的 Number 元素。
CustomerId 等于 使用此字段搜索 Customer 的 Id 元素。
UserID 等于 使用此字段可搜索 User 的 UserId 元素。

对于 SearchClientLinks 服务操作,以下是 Predicate 对象的支持 Field 元素和 Operator 元素。

字段 运算符 说明
ClientAccountId 等于

位置
按客户广告客户帐户标识符搜索广告客户帐户 ClientLink 对象。
ClientCustomerId 等于

位置
按客户端客户标识符搜索客户 ClientLink 对象。
DirectManagingCustomerId 等于 按代理管理客户标识符搜索客户和广告客户帐户 ClientLink 对象。 如果其他客户也链接到客户端客户,则结果将不包括这些客户端链接。
ManagingCustomerId 等于 按代理管理客户标识符搜索广告客户帐户 ClientLink 对象。 如果其他客户也链接到客户广告客户帐户,则结果将包括这些客户链接。 此谓词值已弃用,转而改用 DirectManagingCustomerId 谓词。

请注意 SearchClientLinks 的以下谓词规则。

  • 不能同时包含 DirectManagingCustomerId 和 ManagingCustomerId。
  • 不能同时包含 ClientAccountId 和 ClientCustomerId。
  • 如果在同一服务调用中同时包括 ClientAccountId 和 ManagingCustomerId 谓词,则将忽略 ManagingCustomerId。
  • 如果在同一服务调用中同时包括 ClientCustomerId 和 DirectManagingCustomerId 谓词,则结果将仅包括同时满足这两个谓词条件的客户客户端链接。
  • 如果在同一服务调用中同时包括 ClientAccountId 和 DirectManagingCustomerId 谓词,则结果将仅包含同时满足这两个谓词条件的广告商帐户客户端链接。

SearchCustomers Predicates

对于 SearchCustomers 服务操作,以下是 Predicate 对象的支持 Field 元素和 Operator 元素。

字段 运算符 说明
AccountId 等于 使用此字段搜索 广告商帐户的 Id 元素。
AccountName Contains

等于
使用此字段可搜索 广告商帐户的 Name 元素。
AccountNumber Contains

等于
使用此字段搜索 广告商帐户的 Number 元素。
ApplicationScope 等于 仅供内部使用。
CreatedDate GreaterThanEquals

LessThanEquals
使用此字段可搜索客户的创建或注册日期。

该日期存储在协调世界时 (UTC) 中。 仅使用指定字符串的月份、日和年份进行搜索。 如果指定日期的小时、分钟和秒,它们将被忽略。

有关日期和时间格式的信息,请参阅 基元 XML 数据类型中的 dateTime 条目。
CustomerId 等于

位置
使用此字段搜索 Customer 的 Id 元素。
CustomerName Contains

等于
使用此字段搜索 Customer 的 Name 元素。
MarketCountry 等于 使用此字段搜索 Customer 的 MarketCountry 元素。

MarketCountry 和 MarketLanguage 谓词字段不是必需的:但是,如果指定了其中一个,则两者都是必需的。
MarketLanguage 等于 使用此字段搜索 Customer 的 MarketLanguage 元素。

MarketCountry 和 MarketLanguage 谓词字段不是必需的:但是,如果指定了其中一个,则两者都是必需的。
UserName 等于 使用此字段搜索 User 的 UserName 元素。

SearchUserInvitations Predicates

对于 SearchUserInvitations 服务操作,以下是 Predicate 对象的 Field 元素和 Operator 元素。

字段 运算符 说明
CustomerId 等于 使用此字段搜索 UserInvitation 的 CustomerId 元素。

要求

服务: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13/Entities

使用者

SearchAccounts
SearchClientLinks
SearchCustomers
SearchUserInvitations