I am trying to use the API to do the following
1. Create the list
2. Upload contacts (it may take several times as the lists are larger than 20K)
3. Create Campaign
4. Schedule Campaign
I had this working and then last thursday the scheduling part stopped working for the most part. Occasionally it works, but usually it doesn't. The fact that it sometimes works has me very confused as I am always doing the same steps.
My XML doesn't even work in the REST client. I get back "Error 400: No contacts to send." Even though I have just created the list and added contacts to it. When I check on ConstantContact.com I can see the list and contacts.
Here is my XML:
<entry xmlns="http://www.w3.org/2005/Atom"><link href="/ws/customers/Nightingalenurses/campaigns/1103687326080/schedules/1" rel="edit" /><id>http://api.constantcontact.com/ws/customers/Nightingalenurses/campaigns/1103687326080/schedules/1</id><title>Today's Schedule</title><updated>2010-09-14T11:50:00.000Z</updated><author><name>API</name></author><content type="application/vnd.ctct+xml"><Schedule xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/Nightingalenurses/campaigns/1103687326080/schedules/1"><...>
Does anyone have any ideas of what could be causing this intermittant issue?
I received your most recent email and I am going to be responding to you personally in a few moments. If you have any questions please let me know.
I figured I would post here in case it can help someone else.
Basically I was scheduling several emails to go out in a row and even though I got the response that the list was uploaded, it was actually creating a backlog in the activities. So when I had a large list it was still working on that list and then when created a new list, uploaded contacts and tried to schedule it since there was a long list of items in the activities there wasn't any contacts in my second email list.
So now what I am doing is before I try to schedule the campaign I am checking the activity list and if there is anything on the list that is not complete then I wait and check the activity list in 40 seconds.
I know there is probably is a better way (maybe check the contact list before I schedule to see how many contacts and wait if it is 0), but this is how I got it working for now.