首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检索具有属性值的ExactTarget订阅服务器

检索具有属性值的ExactTarget订阅服务器
EN

Stack Overflow用户
提问于 2015-01-30 11:13:46
回答 1查看 1K关注 0票数 0

我使用的是ExactTarget的SOAP API。我可以通过电子邮件检索订阅者,但我有我想要的自定义属性,例如年龄或性别。我尝试了复杂的过滤器,但没有成功。

下面是我想要的但用PHP写的:http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_a_filterdefinition_object/

EN

回答 1

Stack Overflow用户

发布于 2015-01-30 23:41:43

FilterDefinitions用于定义SFMC应用程序中的可刷新段。当然,您可以使用SOAP API创建和执行它们,但通过API返回一组订阅者通常不是首选方法。为此,您可以简单地使用复杂过滤器在Subscriber object上进行检索。

下面是一个SOAP信封示例:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <a:Action s:mustUnderstand="1">Retrieve</a:Action>
      <a:MessageID>urn:uuid:db7625ad-b909-48f7-a9e6-9819f5bd3ddb</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To>
      <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
         <u:Timestamp u:Id="_0">
            <u:Created>2015-01-30T15:33:23.689Z</u:Created>
            <u:Expires>2015-01-30T15:38:23.689Z</u:Expires>
         </u:Timestamp>
         <o:UsernameToken u:Id="uuid-85bdf3e7-075c-46a6-bbb1-37e7e48ad3d6-5">
            <o:Username><!-- Removed--></o:Username>
            <o:Password><!-- Removed--></o:Password>
         </o:UsernameToken>
      </o:Security>
   </s:Header>
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ClientIDs>
               <ClientID>12345678</ClientID>
            </ClientIDs>
            <ObjectType>Subscriber</ObjectType>
            <Properties>Client.ID</Properties>
            <Properties>Client.PartnerClientKey</Properties>
            <Properties>CreatedDate</Properties>
            <Properties>EmailAddress</Properties>
            <Properties>EmailTypePreference</Properties>
            <Properties>ID</Properties>
            <Properties>PartnerKey</Properties>
            <Properties>Status</Properties>
            <Properties>SubscriberKey</Properties>
            <Properties>UnsubscribedDate</Properties>
            <Filter xsi:type="ComplexFilterPart">
               <LeftOperand xsi:type="SimpleFilterPart">
                  <Property>EmailAddress</Property>
                  <SimpleOperator>equals</SimpleOperator>
                  <Value>aspriggs@degdigital.com</Value>
               </LeftOperand>
               <LogicalOperator>AND</LogicalOperator>
               <RightOperand xsi:type="SimpleFilterPart">
                  <Property>Client.ID</Property>
                  <SimpleOperator>equals</SimpleOperator>
                  <Value>12345678</Value>
               </RightOperand>
               <AdditionalOperands />
            </Filter>
            <QueryAllAccounts>true</QueryAllAccounts>
            <Retrieves />
            <Options>
               <SaveOptions />
               <IncludeObjects>true</IncludeObjects>
            </Options>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </s:Body>
</s:Envelope>

我还建议在salesforce.stackexchange.com上发布SFMC的问题。这就是SFMC的大部分问题得到回答的地方。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28228629

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档