segment_opts with interest groups

Sep 5, 2012 at 12:24 AM


I'm attempting to update segment options in a campaign:

It appears that the interest group data that gets pulled down from mailchimp uses the ID but when pushing it back, mailchimp expects the name.

To replicate, create a campaign that segments on an interest group. 

Then pull down that campaign with the wrapper, and then attempt to test that segment.

CampaignSegmentTest(campaign.ListID, campaign.SegmentOpts);

You will get something like "no group named '2'".


Sep 5, 2012 at 6:19 AM
Edited Sep 5, 2012 at 4:21 PM
So, where is the problem? Just use name instead of id :)
Sep 5, 2012 at 7:05 AM

Sorry didn't make myself clear. If I am updating a normal condition in SegmentOpts, but unknown to me, the SegmentOpts also contains an interest group condition, the update will fail with that error.

Therefore, updating the "segment_opts" of a campaign is highly unlikely to work. Unless I  go through each condition, detect if it is an interest group, and reset the id values to name values.

Sep 5, 2012 at 4:20 PM
Edited Sep 5, 2012 at 4:22 PM
Oh, I've just recalled that I asked the same question year ago. It seems that they're not going to change this behavior: