Simple Form Sample Contact Update not recorded as By Contact

Regular Participant

Simple Form Sample Contact Update not recorded as By Contact

Using the sample forms with minor modifications to the appearance only and changing ACTION_BY_CUSTOMER to ACTION_BY_CONTACT, since this form is used on my web page for signups, the contact update always records as having been updated by website owner.

 

When a new contact is added to the list it records correctly as having been added by contact.  I can't find what the difference is or what I need to change.  I'm using the C# samples.

 

Any ideas?

10 REPLIES 10
Employee

Hey Susan,

 

The difference between ACTION_BY_CUSTOMER and ACTION_BY_CONTACT is that a customer is a customer of Constant Contact.  Where as the contact is the person who owns the email address in the account.   The functional difference is that the customer can not opt a person who has previously opted out back in.  The contact how ever can.

 

If you are trying to change the the ACTION_BY_CUSTOMER to ACTION_BY_CONTACT with our sample forms this is set by the contact class.  I will have to look into the code and I will have a solution for you tomorrow with how to achieve 

Ryan Davis
Quality Engineer
Regular Participant

Can the API / simple contact update form update a contact and/or contact lists as having been updated by the contact and not by the website owner?

 

Does the API / simple contact update form send the confirmation email to the contact?

 

I've already changed ACTION_BY_CUSTOMER to ACTION_BY_CONTACT.

 

I'm using the simple contact upate form on my website and am directing my clients to update their contact information and subscribed to lists so it should reflect that the contact is performing the action and not the website owner, constant contact customer.

Hey Susan,

 

The action for ACTION_BY_CONTACT has all of the privileges of the ACTION_BY_SITEOWNER including more options as they can add themselves back into the account once they have unsubscribed.  If the ACTION_BY_CONTACT is used there will be welcome email that will be sent to the contact. 

 

Also the SITEOWNER is a reference to the constant contact customer. 

 

I am glad you were able to find the solution to change to ACTION_BY_CONTACT as I was unable to find it in the code.

 

Let me know if this helps.

Ryan Davis
Quality Engineer
Regular Participant

Thanks for letting me know it can be done.

 

However, I haven't found out how.  I've searched and replaced all ACTION_BY_* to ACTION_BY_CONTACT but the update form still records the contact update as SITEOWNER.  I can't find any place to change this.

Hey Susan,

 

I have found where it is set I am just trying to figure out how to pull it out of the enum and change it on the request.  I may have a fix for this for you sometime tonight or over the weekend.  I apologize for the delay.

Ryan Davis
Quality Engineer
Regular Participant

Since it seems so difficult to get a contact to update their data and have it reflect that the contact updated the subscription and not the customer, is there another tool or option available for me to allow a contact to resubscribe on a web form?  If not will I have to create a new account with CC with no contacts so that everyone that registers will be new to that account, since new contacts can add themselves, in order to have a contact update their registration and opt in to a list?

Hey Susan,

 

I believe if you change line 963 in ContactComponet.cs from

 

data.AppendFormat("<OptInSource>{0}</OptInSource>", optSourceNames[ContactOptSource.ActionByContact]);

to

 

data.AppendFormat("<OptInSource>{0}</OptInSource>", optSourceNames[contact.OptInSource]);

 

Please let me know if this works for you.

 

Ryan Davis
Quality Engineer
Regular Participant

I must be missing something.  I don't have and can't find a file ContactComponet.cs.  I also searched for the code to replace and it wasn't found in any other files that I do have.  I'm still at a loss.

Hey Susan,

 

It sounds like you added the wrapper by adding the DLL's to the references.  You can open the wrapper solution file and edit the ContactCollection.cs file and then you would build the solution.  That would update your DLL files. 

Ryan Davis
Quality Engineer

This is actually fixed in the latest version of the C# wrapper, which was updated last week to correct this and another bug.  If you download the latest version, you will have access to the corrected DLL files.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page