Filters - Activities 1.0

 

 

Overview

MailUpService API allows to create and delete activity filters

FiltersCreateActivityFilter

This method creates a new filter to be applied on recipient's personal data

Method parameters

ParameterDescriptionExample
Idalways set to zero 
IdList

Specify here MailUp list ID (or zero if filter is applicable to all lists).
Please note that you cannot extend to all lists a filter that applies on a specific message

 
NameNumber that identifies console ID 
DescriptionFree text description, can be overwritten if you open and save the filter using MailUp console 
CategoryCategory ID. Each filter should belong to a category, IDs can be retrieved by reading from tooltips (more on this) 
Conditions[ ]

Array of conditions (at list one). Each condition is composed of the following fields:

  • Id (always set to zero)
  • IdFilter (always set to zero)
  • LogicalOperation (allowed values: None for the first condition, AND, OR for the other conditions)
  • Type (see table below)
  • IdMessage (newsletter ID, integer value)
  • Link (to be used for filter that apply to clicks)
  • FromDate (start date, ISO format yyyy-mm-dd)
  • ToDate (end date, ISO format yyyy-mm-dd)
 

Conditions

The following table shows the allowed combinations for "Conditions" fields

message ID (1)

TypeID messageLinkFromDateToDateExample
Readmessage ID (1)emptyyyyy-mm-dd (2)yyyy-mm-dd (3)Filter recipients who have read message with ID=10
during period that starts from 2012-07-24 to 2012-08-03
ClickedOn

message ID (1)

 

hyperlink (full path)yyyy-mm-dd (2)yyyy-mm-dd (3) 
DidNotReadmessage ID (1)emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 
DidNotClickOnmessage ID (1)hyperlink (full path)yyyy-mm-dd (2)yyyy-mm-dd (3) 
SubscribedOn0emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 
UnsubscribedOn0emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 
WhomYouSentmessage ID (1)emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 
WhoHaveNotReceivedInTheLast15DaysThemessage ID (1)empty0001-01-010001-01-01 
WhoHaveNotReceivedInTheLast7DaysThemessage ID (1)empty0001-01-010001-01-01 
WhoHaveNotReceivedInTheLast4DaysThemessage ID (1)empty0001-01-010001-01-01 
WhoHaveNotReceivedDueToHBErrormessage ID (1)emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 
WhoHaveNotReceivedNotDueToHBErrormessage ID (1)emptyyyyy-mm-dd (2)yyyy-mm-dd (3) 

(1) you can also use the following special codes: -10 means "all messages", -20 means "latest 5 messages"

(2) you can specify 0001-01-01 if you want to skip filtering on start date

(3) you can specify 9999-01-01 if you want to skip filtering on end date

 

SOAP Examples

SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ifil="http://Mailup.WS/IFilterService">
<soapenv:Header/>
<soapenv:Body>
	<ifil:FiltersCreateActivityFilter>
		<ifil:request>
			<ifil:AccessToken>VcWhO2u5Qr1K4UNAZK3tYjEDoQdnLbyc6Y=</ifil:AccessToken>
			<ifil:Filter>
				<ifil:Id>0</ifil:Id>
				<ifil:IdList>2</ifil:IdList>
				<ifil:Name>Newcomers</ifil:Name>
				<ifil:Description>Read newsletter 27 but not newsletter 11</ifil:Description>
				<ifil:Category>3</ifil:Category>
				<ifil:Conditions>
					<ifil:ActivityFilterCondition>
						<ifil:Id>0</ifil:Id>
						<ifil:IdFilter>0</ifil:IdFilter>
						<ifil:LogicalOperation>None</ifil:LogicalOperation>
						<ifil:Type>Read</ifil:Type>
						<ifil:IdMessage>27</ifil:IdMessage>
						<ifil:FromDate>2012-07-24+02:00</ifil:FromDate>
						<ifil:ToDate>2012-08-03+02:00</ifil:ToDate>
					</ifil:ActivityFilterCondition>
					<ifil:ActivityFilterCondition>
						<ifil:Id>0</ifil:Id>
						<ifil:IdFilter>0</ifil:IdFilter>
						<ifil:LogicalOperation>And</ifil:LogicalOperation>
						<ifil:Type>DidNotRead</ifil:Type>
						<ifil:IdMessage>11</ifil:IdMessage>
						<ifil:FromDate>2012-07-24</ifil:FromDate>
						<ifil:ToDate>2012-08-03</ifil:ToDate>
					</ifil:ActivityFilterCondition>
				</ifil:Conditions>
			</ifil:Filter>
		</ifil:request>
	</ifil:FiltersCreateActivityFilter>
</soapenv:Body>
</soapenv:Envelope>
SOAP response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <FiltersCreateActivityFilterResponse xmlns="http://Mailup.WS/IFilterService">
         <FiltersCreateActivityFilterResult>
            <Filter>
               <Id>49</Id>
               <IdList>2</IdList>
               <Name>Inactive recipients</Name>
               <Description>ddd</Description>
               <Category>3</Category>
               <Conditions>
                  <ActivityFilterCondition>
                     <Id>30</Id>
                     <IdFilter>49</IdFilter>
                     <LogicalOperation>None</LogicalOperation>
                     <Type>SubscribedOn</Type>
                     <IdMessage>0</IdMessage>
                     <FromDate>2012-07-24</FromDate>
                     <ToDate>2012-08-03</ToDate>
                  </ActivityFilterCondition>
                  <ActivityFilterCondition>
                     <Id>31</Id>
                     <IdFilter>49</IdFilter>
                     <LogicalOperation>And</LogicalOperation>
                     <Type>DidNotRead</Type>
                     <IdMessage>-10</IdMessage>
                     <FromDate>2012-07-24</FromDate>
                     <ToDate>2012-08-03</ToDate>
                  </ActivityFilterCondition>
               </Conditions>
            </Filter>
         </FiltersCreateActivityFilterResult>
      </FiltersCreateActivityFilterResponse>
   </s:Body>
</s:Envelope>

 

FiltersDeleteActivityFilter

Method parameters

ParameterDescriptionExample
Token Access token, used for authentication 
IdFilterID of a previously created filter 

SOAP Example

SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ifil="http://Mailup.WS/IFilterService">
	<soapenv:Header/>
	<soapenv:Body>
	<ifil:FiltersDeleteActivityFilter>
		<ifil:request>
			<ifil:AccessToken>VcWhO2u5Qr1K4UNAZK3tYjEDoQdnLbyc6Y=</ifil:AccessToken>
			<ifil:IdFilter>49</ifil:IdFilter>
		</ifil:request>
	</ifil:FiltersDeleteActivityFilter>
	</soapenv:Body>
</soapenv:Envelope>
SOAP response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <FiltersDeleteActivityFilterResponse xmlns="http://Mailup.WS/IFilterService">
         <FiltersDeleteActivityFilterResult/>
      </FiltersDeleteActivityFilterResponse>
   </s:Body>
</s:Envelope>