drwxg62286 2015-01-30 03:13
浏览 13

使用属性值检索ExactTarget订户

I'm using the SOAP API of ExactTarget. I'm able to retrieve subscribers with email, but I have custom attributes which I would like to get, such as age or gender. I tried Complex filter but no luck.

Here is what I want but in PHP: http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_a_filterdefinition_object/

  • 写回答

1条回答 默认 最新

  • duan62819774 2015-01-30 15:41
    关注

    FilterDefinitions are for defining refresh-able segments in the SFMC application. You can certainly create them and execute them with the SOAP API, but it's generally not the preferred way to return back a set of subscribers via API. To do that, you can simply do a retrieve on the Subscriber object using a complex filter.

    Here's a sample SOAP envelope:

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

    I'd also suggest posting SFMC questions over at salesforce.stackexchange.com. That's where the bulk of the SFMC questions are answered.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题