SOLVED

How to get the mappings of Enum class ActivityType items and their display texts?

Go to solution
Anonymous
Not applicable

How to get the mappings of Enum class ActivityType items and their display texts?

Hi all,

When I try to get data of "ActivityRecord", I find that the values of attribute "activityType" are always different.
Some of them like removing white-spaces simply, e.g. "New Lead" and "ActivityType.NewLead".
But some of them contain different words, e.g. "Update Opportunity" and "ActivityType.UpdateOpprtntyInSales".
So, I need the mapping of them,  and then I could query "ActivityType" by the display texts and auto-transform them to the enum items which would be sent to the request "getLeadChanges".
Any suggestions?

Thanks,
Biao
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

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>

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

You can get the field mapping under field management in Marketo under admin section. In this mapping area you will be able to get all the API Name that we are using in Marketo. You can export them into excel and serach for the field and get the mapping.
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

Hi Kapil,

Please read my question again. I'm NOT expecting the mapping of fields, but the mapping of enum class ActivityType items and their display texts. Field Management won't work here.

Thanks any way,
Biao

Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

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>

 
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

Hi Travis,

I could upgrade the APIs I used to Version 2_3 and use 'activityNameFilter' instead of 'includeTypes' in 'activityTypeFilter', right?
I get it. But there are 2 additional questions:
    1. After I implement the integration based on API version 2_3, if the user account is still based on version 2_2 or 2_0, would it work?
    2. There is also a parameter 'excludeTypes' in 'activityTypeFilter'. It could not be transformed to use the new parameter, couldn't it?

Any help you can offer on these will be much appreciated. Please let me know if you need any further details.

Thanks,
Biao
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

Hi Biao - I'm not sure what you mean by user account.  SOAP API revisions are available across all Marketo subscriptions.  The excludeTypes filter is not currently supported under the new activityNameFilter.
Anonymous
Not applicable

Re: How to get the mappings of Enum class ActivityType items and their display texts?

Hi Travis,

My URL ended with "2_0" last year, and it changed to ending "2_2" after upgrading by UI oprations.
So, I'm expecting to make sure that it still works when my integration is based on API "2_3" and the user URLs still end with "2_0" or "2_2".

About the 'excludeTypes', I would stop it in our integration utill it is supported (maybe next version or later, as your product planning).

Thanks,
Biao