cancel
Showing results for 
Search instead for 
Did you mean: 
Happy Turkey Day! In recognition of Thanksgiving our Support office will be closed Thursday (11/23). We will be open Friday (11/24) for limited hours (10:00am - 6pm ET) and will be back to normal hours on Monday (11/27).

custom_field returning empty

SOLVED
Highlighted
Occasional Advisor

custom_field returning empty

Hello -

 

Using, https://api.constantcontact.com/v2/contacts, I'm getting a properly formed response, but the custom_fields structure is empty (and there is a (right now literally ONE, which does appear in the UI) custom field associated with this contact)..

 

The contact id is: "id":"1145136430",

 

"job_title":"","company_name":"","home_phone":"","work_phone":"","cell_phone":"","custom_fields":[],"created_date":"2017-08-31T17:54:12.000Z","modified_date":"2017-08-31T18:39:07.000Z","source_details":""}]}

 

Is this by design?  I need that custom_field to return as it's my primary key in my databases.

4 REPLIES
CTCT Employee

Re: custom_field returning empty

Hi @SteveP931

Thank you for reaching out to the Constant Contact Community. It's my pleasure to assist you today.

Here is an article about using custom fields in the advanced editor, it should help with your issue. If it doesn't can you please email social_support(at)constantcontact(dot)com with a reference to this post, the name of the email you are creating, the contact with the custom field you mentioned as well as many details as you can provide us so we can have our advanced technical support take a look? Please also feel free to reach out to us here or via one of our other support channels. Thank you and have a great weekend. 


Adrienne B.
Community & Social Media Support

If you find my post helpful, and it answers your question, please mark it as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

Increase your profitability by integrating your email marketing and social media.  Download this guide and learn how you can achieve great results with email marketing and social media combined!
Occasional Advisor

Re: custom_field returning empty

This has nothing to do with the UI and everything to do with the APIs.  Once I dug around and found out that the APIs will not return a custom_filed unless it follows the naming convention CustomFieldn (n=1-15) this resolved.  It's very frustrating that this isn't explicitly called out in the documentation...especially when uploading a contact list on the front end.

Moderator

Re: custom_field returning empty

Hello @SteveP931,

 

If you check our documentation for contacts when doing a GET, POST, or PUT you will notice that in the sections for structure they all mention the custom_fields and how they need to be formatted.

 

https://developer.constantcontact.com/docs/contacts-api/contacts-collection.html?method=GET

 

Here is what the documentation states.

 

- custom_fields
array
You can create up to 15 custom fields for a contact. The API currently only supports the custom field format described here. If the account uses the new contact management system, it is possible to create custom fields with varying formats. The API ignores custom fields not using the format below.

label
string (50)
This read-only field displays the custom_field name entered using the product GUI, the value is displayed only if it matches the custom_field_n (n=1-15) format.

name
string
You must name each custom field custom_field_1, custom_field_2,...custom_field_15. Only custom fields with values are shown in response to a GET call.

value
string (50)
Content of the custom field

I can completely understand the frustration this can cause. Please know this has been changed with our v3 API which is under development and will be released soon. I do not yet have a release date though.


Regards,
Jimmy D.
Tier II API Support Engineer
Occasional Advisor

Re: custom_field returning empty

The behavior is fine, i mean it's not ideal but it is what it is...but it would be good to know that on the front end side when uploading a list.  Good to know this will be implemented in v3 though, thanks for the tip Jimmy!

Still need help?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am - 8pm ET. We've got real people waiting to help you out. Click below to start a conversation!
Loading script asynchronously