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