What does <status>Visitor</status> mean?

Occasional Participant

What does <status>Visitor</status> mean?

 I queried a new email before adding it with:


https://api.constantcontact.com/ws/customers/username/contacts?email=foo@bar.com.


I got back a <status>Visitor</status>


This email address "foo@bar.com is not in any of my lists!


What does Status == Visitor mean?


/eric




 



<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://api.constantcontact.com/ws/customers/username/contacts</id>
<title type="text">Contacts for Customer: username</title>
<link href="contacts"></link>
<link href="contacts" rel="self"></link>
<author>
<name>username</name>
</author>
<updated>2010-11-02T05:52:40.580Z</updated>
<link href="/ws/customers/username/contacts" rel="first"></link>
<link href="/ws/customers/username/contacts?email=eric@scn.org" rel="current"></link>
<entry>
<link href="/ws/customers/username/contacts/1580" rel="edit"></link>
<id>http://api.constantcontact.com/ws/customers/username/contacts/1580</id>
<title type="text">Contact: foo@bar.com</title>
<updated>2010-11-02T05:52:40.598Z</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/username/contacts/1580">
<Status>Visitor</Status>
<EmailAddress>foo@bar.com</EmailAddress>
<EmailType>HTML</EmailType>
<Name></Name>
<Confirmed>false</Confirmed>
<InsertTime>2010-09-29T23:24:36.494Z</InsertTime>
</Contact>
</content>
</entry>
</feed>
5 REPLIES 5
Employee

Hi Eric,


 


Visitor status means that the contact has had an email forwarded to them from someone on your list. This would not prevent them from being added as a contact later, it just means they've had an email forwarded to them through the 'Forward Email' link at some point. Hope this helps to clear things up. Please let us know if you have any further questions, thanks.

David J

Occasional Participant

I'm debugging a portion of the Drupal Constant Contact module.  Before attempting to add a new contact, the code does a query (contacts?email=”...") to see if the contact already exists.  Similar to your form code example (subscriberExists() in cc_class.php), the current Drupal code looks for a  feed/entry tag in the response.  If this tag is non-empty, then it assumes the contact exists and cannot be added.


Your response indicates that this test is necessary but not sufficient.  A better test would be:


a) If no feed/entry (or feed/entry/id) tag, then contact does not exist and can be added.


b) If there is a feed/entry tag, check for a feed/entry/Contact/Status tag.  If this tag is "Visitor", then the contact can be added.  If this tag does not exist or is other than "Visitor", then the contact cannot be added (POST-ed).


Comments?   (I realize there's possible contact update / GET logic to do if a contact already exists...I'll deal with that later.)


Are there any other <Status> values that, like "Visitor", will allow a contact to be added?  Or can you suggest more robust logic?


/eric

Employee

We've done some further looking into this, and we are going to be making an update to our API's to discontinue exposing this information. I will certainly reply to this post as soon as that modification has been made, but please do not modify any code to allow for this status as we will be removing it shortly. I apologize for any inconvenience that this has caused. Please let us know if you have any further questions or concerns regarding this. Thank you.

David J

Occasional Participant

Would appreciate a list of <status> codes so we can manage contacts more effectively.  So far I have noted


- Do Not Mail (=opted out?)

- Active

- Visitor (which you are going to remove?)


Any others?


In particular we are looking to a reliable way to see if a customer has opted out (and will therefore need to re-opt in).  Often happens by mistake. Currently we look for status = "Do Not Mail", and if so, letting the customer know they opted out, and giving instructions on how to opt back in.


 


Tx

Employee

You are correct that the visitor status is being removed.


 


The current status' that Constant Contact should be returning are:


Active - the contact is subscribed to one or more contact list.


Removed - the contact has not opted out, but is not currently subscribed to any contact lists.


Do Not Mail - the contact has opted-out or been deleted.


Unconfirmed - You have confirmed opt-in turned on, and are waiting for this customer to confirm their interest in your mailing list.


 


You can find these listed at the bottom of the Contacts Collection Resource page, under the heading 'Contact Data Format'


 


If you are looking to find out when contacts have opted out, you would want to look for the 'Do Not Mail' status. I also wanted to remind you that we do have Searching for Contacts by Last Updated Date. This will allow you to query which contacts that have been added to a specific list from a certain day and time (including do-not-mail). For example: https://api.constantcontact.com/ws/customers/{user-name}/contacts?updatedsince=12-1-2010&listtype=do-not-mail


 


You also have the ability to pull just contacts that are opted out by doing an http get on: https://api.constantcontact.com/ws/customers/{user-name}/lists/do-not-mail

David J

Developer Portal

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

Visit Page