Table of Contents |
---|
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
Parameter | Description | Example |
---|---|---|
Id | always set to zero | |
IdList | Specify here MailUp list ID (or zero if filter is applicable to all lists). | |
Name | Number that identifies console ID | |
Description | Free text description, can be overwritten if you open and save the filter using MailUp console | |
Category | Category 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:
|
Conditions
The following table shows the allowed combinations for "Conditions" fields
message ID (1)
Type | ID message | Link | FromDate | ToDate | Example |
---|---|---|---|---|---|
Read | message ID (1) | empty | yyyy-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) | |
DidNotRead | message ID (1) | empty | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
DidNotClickOn | message ID (1) | hyperlink (full path) | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
SubscribedOn | 0 | empty | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
UnsubscribedOn | 0 | empty | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
WhomYouSent | message ID (1) | empty | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
WhoHaveNotReceivedInTheLast15DaysThe | message ID (1) | empty | 0001-01-01 | 0001-01-01 | |
WhoHaveNotReceivedInTheLast7DaysThe | message ID (1) | empty | 0001-01-01 | 0001-01-01 | |
WhoHaveNotReceivedInTheLast4DaysThe | message ID (1) | empty | 0001-01-01 | 0001-01-01 | |
WhoHaveNotReceivedDueToHBError | message ID (1) | empty | yyyy-mm-dd (2) | yyyy-mm-dd (3) | |
WhoHaveNotReceivedNotDueToHBError | message ID (1) | empty | yyyy-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
Code Block | ||||
---|---|---|---|---|
| ||||
<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> |
Code Block | ||||
---|---|---|---|---|
| ||||
<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
Parameter | Description | Example |
---|---|---|
Token | Access token, used for authentication | |
IdFilter | ID of a previously created filter |
SOAP Example
Code Block | ||||
---|---|---|---|---|
| ||||
<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> |
Code Block | ||||
---|---|---|---|---|
| ||||
<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> |