2015-01-30 2 views
0

Я использую SOAP API для ExactTarget. Я могу получить подписчиков с электронной почтой, но у меня есть пользовательские атрибуты, которые я хотел бы получить, например, возраст или пол. Я попробовал комплексный фильтр, но не повезло.Получить абонент ExactTarget с значением атрибута

Вот что я хочу, но в PHP: http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_a_filterdefinition_object/

ответ

0

FilterDefinitions предназначен для определения обновления экрана, в состоянии сегментов в приложении ЮФОК. Вы можете, конечно, создать их и выполнить их с помощью SOAP API, но обычно это не самый лучший способ вернуть обратно набор подписчиков через API. Для этого вы можете просто выполнить извлечение на Subscriber object с использованием сложного фильтра.

Вот пример SOAP конверт:

<?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>[email protected]</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> 

Я также предлагаю разместить SfmC вопросы более на salesforce.stackexchange.com. Вот на что отвечает основная часть вопросов SFMC.

Смежные вопросы