Issue with adding members to a static segment

1,253 views
Skip to first unread message

Sabrina Barron

unread,
Feb 10, 2014, 12:38:18 PM2/10/14
to mailchimp-...@googlegroups.com
Hi

As a brief summary - I'm having trouble adding subscribers to a static segment, when I try to add more than 10 at a time.

The site we have implemented the API on allows us to build a list from our own database, subscribe these people to an existing MC list, create a static segment and then add the people on our temp list to that segment. We also schedule a campaign for this segment. This all works perfectly until the list we create goes over 10 people. At this point, we get the following error:

"Unable to Create New Campaign! Code=506 Msg=The segment_opts parameter should be an array with 1 to 10 elements. Unable to Schedule Campaign! Code=300 Msg=Invalid Campaign ID: 0"

I can see the error is coming from the campaignCreate function because all of the subscribe/segment functions are coded to occur when we schedule the email, but I can't understand why it's happening, when I've read in the documentation that we should be able to add an unlimited number of subscribers to a segment.

Please bear in mind that I am not a developer, I just have a very basic knowledge of code and I did not code the existing files - my lead developer did. I have attached the file which contains the functions, but please let me know if you need to see anything else.

Thanks!
Sabrina
include-email3-head.php
include-email3-js.php

MailChimp Support

unread,
Feb 12, 2014, 1:04:08 PM2/12/14
to mailchimp-...@googlegroups.com
Hi Sabrina,

From what it sounds like, your functions may be creating a campaign that is targeting individual email addresses as segmenting criteria. The APi only allows 10 criteria to be specified for segmenting on a campaign. As an example, if a criteria for a segment is specified as "email address - is - exam...@mailchimp.com" this would take up 1 criteria option and only target 1 email address.  If your conditions are being specified in this manner this is why you would be seeing "Code=506 Msg=The segment_opts parameter should be an array with 1 to 10 elements".

You will want to have your developers review the code and make sure two things are happening:
1. You are creating segments through: lists/static-segment-add then adding subscribers to that static segment through lists/static-segment-members-add.
2. Your campaigns are targeting the static segment created from the step above. You can refer campaigns/segment-test to make sure your criteria are correct when setting up your segment options.

-Tyler

Sabrina Barron

unread,
Feb 16, 2014, 8:55:00 AM2/16/14
to mailchimp-...@googlegroups.com
Hi Tyler,

Thank you so very much for your response. That makes perfect sense and I really appreciate the clear way you've explained that to me.

I'll pass the information on to my developer and hopefully we can get this resolved.

Thank you once again for your invaluable help.

All the best,
Sabrina
Reply all
Reply to author
Forward
0 new messages