ContactListMember returning wrong updated date

JustinC
Regular Participant

ContactListMember returning wrong updated date

I'm using the getListMembers() in the PHP library and it's working fine, except that the "updated" field is returning today's date instead of the date the list member was updated. The issue doesn't seem to be in the PHP library, but the XML being returned.

 

If I debug the code a little, here's an example of a list member's XML code that is being returned for one member.

 

<entry>
    <link href="/ws/customers/USERNAME/contacts/200535" rel="edit"></link>
    <id>http://api.constantcontact.com/ws/customers/USERNAME/contacts/200535</id>
    <title type="text">Contact: email@email.com</title>
    <updated>2012-06-21T23:55:37.787Z</updated>
    <author>
      <name>Constant Contact</name>
    </author>
    <content type="application/vnd.ctct+xml">
      <ContactListMember xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/USERNAME/contacts/200535">
        <EmailAddress>email@email.com</EmailAddress>
        <Name>Last, First</Name>
      </ContactListMember>
    </content>
  </entry>

 

If I do a search for the same email in Constant Contact, the date says it is 6/5/2012. This is happening for anyone returned by getListMembers(). I keep getting today's date.

 

Any thoughts on this?

10 REPLIES 10
Nick_G
Moderator

Hey Justin,

 

It looks as though each individual contact node from that call populates its own "updated" time. It goes up by about a split second for each one. You can definitely get the accurate updated time by querying the contact directly.

 

I'll discuss it with the developers to be sure, but this does look like a bug in our system. However, with the development of our next version of the API, I'm not sure if this will be fixed, or put on the backburner to leave time for the new project. I would suggest querying the specific contact URI for the correct updated time for the contacts you need.

 

If you'd like a follow-up on this, feel free to send us an email at webservices@constantcontact.com, and we can let you know what comes out of this.

Nick Galbraith
Support Engineer
JustinC
Regular Participant

Thanks for the response. I can give querying each contact a try. The main reason I wanted to do this is to pull in each week the list of new people from the Do Not Mail list. The trouble is that I don't know how many pages to pull from the list without knowing what date they were added.

 

I guess I could pull a page's worth of data, query each contact to get the dates, and if the dates are still within this week, pull the next page and repeat.

 

That's going to create 51 API calls per page though (1 to pull the 50 contacts, 50 per contact) - which seems pretty excessive. Unless there's a way to query multiple contacts at once.

 

NOTE: I also tried using searchContactsByLastUpdate() and passing a date such as "2012-06-13T00:00:00.000Z" returned very random results from over a year ago... not sure if that isn't working properly either.

I just gave a direct test to our API with searching by last update, and the responses seemed to be accurate. It's possible that the issue with searchContactsByLastUpdate() is an issue with the wrapper, and not the API itself. We can definitely look into this as well for you.

Nick Galbraith
Support Engineer
JustinC
Regular Participant

Here is some debugging on what the wrapper is sending/receiving.

 

The first entry returned is for someone who opt-ed out on 8/22/2011 12:57 PM - definitely not since 6/14/2012.

 

Is there anything in the XML returned that looks odd / would explain this?

 

Page requested:

https://api.constantcontact.com/ws/customers/USERNAME/contacts?updatedsince=2012-06-14T00:00:00.000Z...

 

XML returned:

<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>2012-06-22T16:40:06.308Z</updated>
  <link href="/ws/customers/USERNAME/contacts?next=234830&amp;updatedsince=2012-06-14T15%3A35%3A37.566Z&amp;listtype=do-not-mail&amp;ous=2012-06-14T00%3A00%3A00.000Z" rel="next"></link>
  <link href="/ws/customers/USERNAME/contacts?updatedsince=2012-06-14T00%3A00%3A00.000Z&amp;listtype=do-not-mail" rel="first"></link>
  <link href="/ws/customers/USERNAME/contacts?updatedsince=2012-06-14T00:00:00.000Z&amp;listtype=do-not-mail" rel="current"></link>
  <entry>
    <link href="/ws/customers/USERNAME/contacts/236416" rel="edit"></link>
    <id>http://api.constantcontact.com/ws/customers/USERNAME/contacts/236416</id>
    <title type="text">Contact: test@test.com</title>
    <updated>2012-06-14T15:24:49.172Z</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/236416">
        <Status>Do Not Mail</Status>
        <EmailAddress>test@test.com</EmailAddress>
        <EmailType>HTML</EmailType>
        <Name>FirstName LastName</Name>
        <FirstName>FirstName</FirstName>
        <MiddleName></MiddleName>
        <LastName>LastName</LastName>
        <JobTitle>Title</JobTitle>
        <CompanyName>Company</CompanyName>
        <HomePhone></HomePhone>
        <WorkPhone></WorkPhone>
        <Addr1></Addr1>
        <Addr2></Addr2>
        <Addr3></Addr3>
        <City></City>
        <StateCode></StateCode>
        <StateName></StateName>
        <CountryCode></CountryCode>
        <CountryName></CountryName>
        <PostalCode></PostalCode>
        <SubPostalCode></SubPostalCode>
        <Note></Note>
        <CustomField1></CustomField1>
        <CustomField2></CustomField2>
        <CustomField3></CustomField3>
        <CustomField4></CustomField4>
        <CustomField5></CustomField5>
        <CustomField6></CustomField6>
        <CustomField7></CustomField7>
        <CustomField8></CustomField8>
        <CustomField9></CustomField9>
        <CustomField10></CustomField10>
        <CustomField11></CustomField11>
        <CustomField12></CustomField12>
        <CustomField13></CustomField13>
        <CustomField14></CustomField14>
        <CustomField15></CustomField15>
        <Confirmed>true</Confirmed>
        <InsertTime>2010-04-19T15:46:04.564Z</InsertTime>
        <LastUpdateTime>2012-06-14T15:24:49.172Z</LastUpdateTime>
      </Contact>
    </content>
  </entry>

The XML looks correct, and the return seems valid, but that's without seeing your account info from the back end. If you'd like, you can email or PM me your username, and I can look into the info more closely.

Nick Galbraith
Support Engineer

I looked in your account and the data being returned through lastupdatedsince appears to be correct.  On 6/14/2012 an upload of new contact information was put through, which updated the contact information of over 500 people on your Do Not Mail list.  While that contact may have opted out on 2011, their information was updated again on the 14th.

 

When you do those types of contact updates, we still will update personal information such as first name or last name.  Just because they are currently opted out doesn't mean that they will always be opted out (they could resubscribe for example) and they may also interact with you in other ways, such as taking a survey or registering for an event, and that will correctly have the most recent updates of information. 

Dave Berard
Senior Product Manager, Constant Contact

Also, as a clarification on the getListMembers <Updated> node timestamp, this timpstamp represents a timestamp of the last time we refreshed the data associated with the GET request in question.  It will always show the most recent timestamp of the cached data, not the actual recency of the data included in the collection. 

 

I definitely understand the value of having the <LastUpdatedTime> returned as part of the Contact records in the list members collection.  In our next version of our API, which Nick mentioned we are hard at work developing, we're doing a lot of work to make sure whenever we return data it's complete and all valuable data is included.  I know this doesn't help you with your immediate problem, but if you use the lastUpdatedSince feature you can certainly get the data you're looking for.

Dave Berard
Senior Product Manager, Constant Contact
JustinC
Regular Participant

Thanks for the response

Hi,

I am experiencing the same issue while attempting to do the same operation as Justin C - retrieving the Do-Not-Mail list periodically.  It is not reasonable to cycle through over 100k records (in 50-per-page), when it seems quite simple to do a differential pull using the LastUpdated field as the API documentation specifies is possible.  

When you expect this issue to be resolved?

thanks

 

At this point, there is no issue being investigated here to resolve. When looking into the specific account and operation reported above, the results were accurately being returned. The Contacts in question, on the Do Not Mail list, were updated in the account in the time range selected and thus were accurately returned. If you are seeing something in your account that is different, we can certainly look into it. We would just need a better description or examples in your account that are incorrectly being returned. Please feel free to email us the details so our API support team can investage at webservices@constantcontact.com.
Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page