The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

CreateAddContactsActivity not working

SOLVED
Go to solution
Highlighted
Occasional Contributor

CreateAddContactsActivity not working

I'm attempting to use the CreateAddContactsActivity to update a bunch of  email records. I've got a Datatable that holds the fields

 

List<string> listIds = new List<string>();
listIds.Add(contactList.Id);

 

foreach (DataRow row in dataForAdding.Rows)
{
AddContactsImportData current = new AddContactsImportData();
current.FirstName = row["FirstName"].ToString();
current.LastName = row["LastName"].ToString();
current.CompanyName = row["Name"].ToString();
current.EmailAddresses.Add(row["Email"].ToString().Trim());
list.Add(current);

}

AddContacts addContacts = new AddContacts(list, listIds, null);
activityService.CreateAddContactsActivity(addContacts);

 

It all runs with no error, but the list is not updated when I check it Constant Contact.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: CreateAddContactsActivity not working

Hello,

Thank you for reaching out to Constant Contact API Support.

When you create a bulk import activity, that activity will queue and then process. There are multiple factors that go into how long it takes to process an import, such as how many contacts you are importing or how many other imports across other accounts are running.

The response to your call to create the import activity should include an activity ID ("id"), and you can make a call to get that activity by ID to see the status.

Please let me know if you have any other questions!

Regards,
David Bornstein
Tier II API Support Engineer

View solution in original post

2 REPLIES 2
Highlighted
Occasional Contributor

Re: CreateAddContactsActivity not working

Update:

 

The call is working, it just takes longer to update the list than I had thought that it would. How long after the function call is a safe wait time to assume the changes are reflected in the list?

Highlighted
Moderator

Re: CreateAddContactsActivity not working

Hello,

Thank you for reaching out to Constant Contact API Support.

When you create a bulk import activity, that activity will queue and then process. There are multiple factors that go into how long it takes to process an import, such as how many contacts you are importing or how many other imports across other accounts are running.

The response to your call to create the import activity should include an activity ID ("id"), and you can make a call to get that activity by ID to see the status.

Please let me know if you have any other questions!

Regards,
David Bornstein
Tier II API Support Engineer

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured