create listinterestgroupings

Apr 21, 2011 at 9:24 AM


Since creating lists programatically is not possible i was looking into creating listinterestgroupings to accomodate to my needs.

So i created one big list with all the contacts and i would like to create virtual subgroups into those lists.

Example: i create a group "Country" and the subgroups for country are "Belgium", "Germany", "France", ....  But i have like 30+ countries i would like to put in there.  I have other groups i want to create that have 100+ subgroups.
For this reason i was looking into creating these groups and subgroups programatically.  According to the API this is possible and the perceptivemcapi also looks like it would be able to support this.

Here's what i tried:


Dim ee As New listInterestGroupAddInput("MyApiKey", "MyListID")
ee.parms.group_name = "Testeeeeee"
ee.parms.grouping_id = 0
Dim rr As New listInterestGroupAdd(ee)
Dim tt As listInterestGroupAddOutput
tt = rr.Execute() 




I tried it with and without the grouping_id, it all seems logical to me but it doesn't do anything at all, any pointers as to what i am doing wrong?  I can add people to these listinterestgroups without any problem once they exists, but i would like to create them programatically because they are very long to create manual and i have to create the same groups for multiple mailchimp accounts.

Can you give me a push in the right direction?

Apr 26, 2011 at 7:49 AM

i also tried (of course) without:

ee.parms.grouping_id = 0

but that didn't do the trick either

May 6, 2011 at 1:36 AM

Personally, I don't think that approach is really going to work for you, but in any case you would want to define your interest grouping via listInterestGroupingAdd()

within which you define your groups (which you can do as a part of that add).  Thereafter you can add/del/upd individual groups within the grouping as needed.

I still think you're going to run into a MailChimp limitation on groups, because if I recall (I'm a bit fuzzy on this) the subgroups will count towards your limit of 60.

I would think you could use static segments and accomplish what you need to do -- and IMO they're easier to use for anything even slightly more complex than single level groups.


May 6, 2011 at 8:03 AM

hey David,

You are absolutely right, i already ran into the 60 groups/subgroups limitation a few days ago.

I almost decided to look another way to accomplish what is needed by my peers, but now I will try the static segment thing you mention once more

May 6, 2011 at 10:07 AM

Hi again David,

sorry to be a pain in the ass but in the mailchimp API i find:

listStaticSegmentAdd(string apikey, string id, string name)

Save a segment against a list for later use.

However in the perceptivemcapi i do not seem to have this method?  My visual studio autocomplete does not show it anyway...

Can you provide me a very basic example of how i am supposed to create a static segment so i can use it in mailchimp later on?

May 10, 2011 at 4:12 AM

spectral, i found the same thing today but after looking through the Object Browser, i did find these classes:

  • listAddStaticSegment
  • listResetStaticSegment
  • listDelStaticSegment

The classes were a little departure from the API names which made them hard to find, but they're there.

May 10, 2011 at 1:13 PM

It depends which versions of the api you are using.

MailChimp renamed some methods in v1.3 of the api, and I followed suit with the v1.3 wrapper.

The method names for the wrapper follow the method names of the MC API -- and the MC documentation will give you the information as appropriate to the version number.

Just make sure which version you are using, and use the appropriate method calls.