Updating custom field via API does not change Contacts Date Edited.

CaitlinO7
Rookie
0 Votes

We're pushing batch Contact updates through the bilk import API endpoints.

 

When only change to a contact is a changed custom field value, the "Date Edited" field on the Contact does not seem to change.

I see the new value for the custom field on the Contacts through the web interface, but Date Edited is stuck on a date from 3 weeks ago.

 

We have a custom field "lastSyncDate" formatted as yyyyMMdd. This allows us to work out which contacts have not been included in the bulk sync for a while.

 

By including this field, we expected the standard "Last Edited" field on the Contact would have been updated, so we could use the GET /contacts?updated_before=yyyy-MM-ddd  endpoint to discover our stale contacts and remove them.

 

Am I missing something here? Why is the contact_udpated_at field not changing?

3 REPLIES 3
Courtney_E
Moderator
0 Votes

Hello CaitlinO7,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

The “updated_after” query parameter that can be used with the Contacts endpoint only applies to the "updated_at" value that identifies who last updated the contact’s personal information, and the "update_source"  will only appear for contacts who’s contact information has been updated since they were added (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…).

 

The "updated_at" value that displays for email addresses in the section starting with "contact_id" does reflect when an email address unsubscribes or is put into another status, but there’s not a parameter available for narrowing by this value when making calls. You can only query for the "updated_at" value for when contact details were last updated.

 

  {

     "contact_id":

      "email_address": {

        "address": 

        "permission_to_send":

        "created_at": 

        "updated_at": This identifies the last time the status of the contact was updated (if "permission_to_send" changes), and there is not a direct parameter in the API that can call this value, it is just included in the response when making other calls.

        "opt_out_source": 

        "opt_out_date": 

        "opt_out_reason": 

        "confirm_status": 

      },

      "update_source": This identifies who last updated the contact’s personal information. The "update_source" value will only appear for contacts who’s contact information has been updated since they were added (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…)

      "create_source": 

      "created_at": 

      "updated_at": The “updated_after” query parameter only applies to this value. The  "updated_at" value here only applies to when a contact’s personal information was last updated (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…)

    }

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
CaitlinO7
Rookie
0 Votes

I think you missed the root cause of my problem:

 

When the only change to a contact is a custom field value, the "contact.updated_at" field on the Contact does not seem to change.

 

 

Courtney_E
Moderator
0 Votes

Hello CaitlinO7,

 

Thank you for reaching out to Constant Contact API Developer Support. 

 

Adding or updating custom field values for a contact should be reflected in the response body when making a call to GET /contacts with the query parameter updated_after.

 

However, there are two  "updated_at" values that are returned in the response body, and only one of them will update with that type of change.

 

Example endpoint call:

GET https://api.cc.email/v3/contacts?updated_after=2023-08-28T20%3A07%3A10Z

 

Example response body:

{

      "contact_id": "1618ae62-4752-11e9-9c8a-fa163e6b01c1",

      "email_address": {

        "address": "dlang@example.com",

        "permission_to_send": "implicit",

        "created_at": "2016-03-03T15:53:04.000+00:00",

        "updated_at": "2016-03-03T15:56:29.000+00:00",         <this value will not update

        "opt_in_source": "Contact",

        "opt_in_date": "2016-01-23T13:48:44.108Z",

        "confirm_status": "confirmed"

      },

      "first_name": "Debora",

      "last_name": "Lang",

      "job_title": "Musician",

      "company_name": "Acme Corp.",

      "birthday_month": 11,

      "birthday_day": 24,

      "anniversary": "2006-11-15",

      "update_source": "Contact",

      "create_source": "Account",

      "created_at": "2016-01-23T13:48:44.108Z",

      "updated_at": "2016-01-23T13:48:44.108Z",                      < this value should update

 

If you continue to see issues with this, please feel free to contact our team directly via email at webservices@constantcontact.com , referencing case number 31463852.

 

Within your email, please provide us with the API key that you are using to make the request, the full request(s) where you are receiving the response (including URL, headers, timestamp, and request body), and the full response body so that we can better assist you in identifying the root cause of the issue.

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

Polls
How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (64%)