Placing contacts in the appropriate group

 We need to have customers that signup trough our application to be placed in our Demo group.  Then once the customer purchases the product we move them out of Demo to Customer News.  However, only some sign ups make it.  What we are missing is a way to map list names to their index and vice versa.  Here is what we have so far.  Any ideas?

 

CString CAppModeDialog::mConstantContactPurchaseListURL("https://api.constantcontact.com/ws/customers/<company>/lists/1");

CString CAppModeDialog::mConstantContactOptOutListURL("https://api.constantcontact.com/ws/customers/<company>/lists/8");

 

#if defined(Product 1)

// <Product 1>

CString CAppModeDialog::mConstantContactDemoListURL("https://api.constantcontact.com/ws/customers/<company>/lists/5");

#endif

 

#if defined(Product 2)

// <Product 2>

CString CAppModeDialog::mConstantContactDemoListURL("https://api.constantcontact.com/ws/customers/<company>/lists/4");

#endif

 

#if defined(Product 3)

// <Product 3>

CString CAppModeDialog::mConstantContactDemoListURL("https://api.constantcontact.com/ws/customers/<company>/lists/3");

#endif

 

#if defined(Product 4)

// <Product 4>

CString CAppModeDialog::mConstantContactDemoListURL("https://api.constantcontact.com/ws/customers/<company>/lists/2");

#endif

 

Currently we don't have a way

Currently we don't have a way to query the list collection based on a list name for the list ID, this is something we are looking to add in the future.  In the meantime, the best method for doing this matching is to create a class that will have both the list name and list ID pulled from Constant Contact or to save the information in a local Database.  This way you will have the list ID, URI and name all in the same place.
 
Regarding your comments on some not making it, I'm not sure I understand how this is a problem with list ID association.  If you are able to associate some of them, it should associate all of them unless there is a logic or coding flaw.  We would need to see your full code that puts this association together and actually submits the update to the Contacts collection.

Dave B Support Engineer, Constant Contact