Biao - With SOAP API version 2_3,
getLeadChanges has a new optional parameter activityNameFilter. You can pass in the display name of the activity type as part of the request using the activityNameFilter field instead of using the activityFilter->includeAttributes->activityType enum.
All the activityNameFilter types are
listed here.
This may make the mapping a bit more intuitive. Here is the request and response below using activityNameFilters
REQUEST:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:paramsGetLeadChanges xmlns:ns2="http://www.marketo.com/mktows/">
<startPosition>
<activityCreatedAt>2014-02-23T21:18:30.472-08:00</activityCreatedAt>
</startPosition>
<activityNameFilter>
<stringItem>New Lead</stringItem>
<stringItem>Visit Webpage</stringItem>
</activityNameFilter>
<batchSize>10</batchSize>
</ns2:paramsGetLeadChanges>
RESPONSE:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:successGetLeadChanges xmlns:ns2="http://www.marketo.com/mktows/">
<result>
<returnCount>10</returnCount>
<remainingCount>83</remainingCount>
<newStartPosition>
<latestCreatedAt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true"/>
<oldestCreatedAt>2014-02-23T21:18:30.472-08:00</oldestCreatedAt>
<activityCreatedAt>2014-02-23T21:18:30.472-08:00</activityCreatedAt>
<offset>ID:1230404,minID:1230373,maxID:1230969,rc:83</offset>
</newStartPosition>
<leadChangeRecordList>
<leadChangeRecord>
<id>1230373</id>
<activityDateTime>2014-02-24T00:37:23-06:00</activityDateTime>
<activityType>Visit Webpage</activityType>