cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

Bulk Activities - Add contacts - Need Help

SOLVED
Moderator

Re: Bulk Activities - Add contacts - Need Help

On additional piece that could be helpful.  We have released importing via CSV through the API, though this hasn't been added to the wrapper libraries yet.  This allows you to do the exact same imports that you would through our UI with a CSV file through the API.  You can see the documentation for that here: http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-addcontact-multipart.h...

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Contributor

Re: Bulk Activities - Add contacts - Need Help

I have a simular problem. I am sending first name,last name, and email using the builk actitivies add contacts v2/activities/addcontacts and it works fine until I increase the number of contacts that I send. In my testing I can get around 2,000 clients (156281 characters once all the json items are added)  with no problem but as soon as I increase it I get json error messages. 

 

error_key: json.payload.invalid, error_message: Exception with request to: class com.roving.platform.domain.activities.addcontactsactivity 

 

I know that the size that I'm sending (with 20,000 contacts with the josn) is 1,357,263 characters so if I'm rembering correctly the actual size in bytes is then twice that which is 2,714,526 bytes (2.5 mb) which is less than the 4mb in the limitations.

 

I'm using the information from http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-add-contacts.html)

 

I'm currently looking at your suggested builk activites multipart- add contacts multipart api but I would rather not do file uploads with the layer of file managment that would then be needed.

 

In way of testing is there any way that I could see exactly what the api is receiving by way of some kind of bounce back or echo in the responce. So I can exactly see what is being received. I have checked my controls that I'm using and they say the have no limits on the size but still just looking for more way to touble shoot this.

 

Thanks ahead of time.

 

Also I just verified that once I get to 200,000 characters the error happens which is a little more than 2,600 contacts.

Tags (1)
CTCT Employee

Re: Bulk Activities - Add contacts - Need Help

Hi,

 

I'd like to reproduce this behavior and work with my engineering team to figure out if we need to revise the stated bulk activity size limits, or if there is something we can do to get these bulk payloads accepted.

 

Would you mind sending webservices@constantcontact.com an email with the 2.000 and 2,600 contact payloads (as text attachments, so that we can quickly verify the issue and work toward a resolution?  Thanks in advance!  

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Contributor

Re: Bulk Activities - Add contacts - Need Help

Have sent it off to the email to  webservices@constantcontact.com

Looking forward to seeing what is going on.

 

let me know if you need any more specifics off of me.

Moderator

Re: Bulk Activities - Add contacts - Need Help

Thanks for reporting this.  In looking into this, our engineers found that we had an issue on our side with large JSON payloads.  We're working on fixing it now.  Unfortunately, the problem is on any import from JSON over 200,000 Bytes until we resolve the issue.  The temporary workaround is to use a CSV file import using multi-part imports, which is working correctly with the 4MB file cap.  Sorry for the inconvenience and we'll update once we have a fix.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Contributor

Re: Bulk Activities - Add contacts - Need Help

Hi Dave,

     I see that I am still not able to set label and value for custom fields of the contacts that I upload using the Java code that I have mentioned in the very beginning of this thread.  Can you please let me know if there is anything that I need to fix in my code?  If there is anything that has to be fixed at your end please let me know when can I expect the fix? I prefer to use the bulk upload API rather than CSV upload API for uploading the contacts.

 

Regards,

Srinivas

Moderator

Re: Bulk Activities - Add contacts - Need Help

Sorry for the delay on the response here.  We had one of our Java developers take a look at this sample and run it to see what the problem was.  His notes are as follows:

 

To use the Custom Field 1 for "Member id" in his case, he has to maintain the "Custom Field 1" as the name, it can NOT be any other name, the value then can be anything. He has to remember that he used "Custom Field 1" as "MemberId".

 

So ask him to use the following in his code

 

// Set Member Id

CustomField objCustomField = new CustomField();

List<CustomField> lsCustomField = new ArrayList<CustomField>();

objCustomField.setName("CUSTOM FIELD 1");

objCustomField.setValue(alMemberId.get(i).toString());

lsCustomField.add(objCustomField);

objContactData.setCustomFields(lsCustomField);

 

Then it should allow him to import CUSTOM FIELDs, I tested this and it worked on the current Production build.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Contributor

Re: Bulk Activities - Add contacts - Need Help

Dave,

 

Thank you so much for looking into the problem.  Yes, after I made the changes that you had suggested I am able to set the values for custom fields during the bulk upload.

 

Is there any way / any other API using which I can edit the label of custom field?  Does CC restrict the users from changing the names of custom fields?

 

Thanks,

Srinivas

Moderator

Re: Bulk Activities - Add contacts - Need Help

Currently we don't allow users to change the names of custom fields through the API.  This will be changing soon as we're rolling out a new contact management system.  Some of our customers are already using this new technology, which allows our users to create unlimited custom fields and name them whatever they would like to.  Once this is rolled out to our entire customer base, we will be adding the ability to create and modify custom fields in the API.  Unfortunately though, we don't have the ability to do this today through the API due to many of our customers still being on the older Contact Management system (we have to maintain backwards compatibility so updates can't happen until we move everyone to the newer technology).

 

You'll see updates on this going forward over the next few months.  We are working hard to get all our customers migrated over as quickly as possible without causing any interuptions to our customers.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Contributor

Re: Bulk Activities - Add contacts - Need Help

Could you provide me with a sample in either C# or VB.net? I'm working at integrating with my windows form application and have no exprience with Java and having a problem. I could send you guys my vb.net code if you would like to see what I'm doing.

 

I'm tryign to do the bulk import file upload as suggested.

 

Thanks a head of time.