Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Custom Fields #89

Closed
nCrafts opened this issue Feb 27, 2015 · 9 comments
Closed

Custom Fields #89

nCrafts opened this issue Feb 27, 2015 · 9 comments
Labels

Comments

@nCrafts
Copy link

nCrafts commented Feb 27, 2015

Does the API have support for custom fields? I couldn't find an example us pulling the list of fields, and adding a contact with the custom fields.

@WoogieNoogie
Copy link
Contributor

We do have support with custom fields, but it is limited as compared to what you can do in the UI. There is a thread on #29 that discusses how you can use custom fields through the API, and what limitations you will have to deal with. In this SDK, CustomField objects can be attached to Contact objects, but they do have to adhere to the restrictions described in the other thread.

@shannon7wallace
Copy link
Contributor

Hi there, we don't have an example of pulling the list of fields, although you could simply print the contact object once you make a get Contact Details call. Here is how to add the custom fields to a contact. Note that the field names should be "CustomFieldn" since we don't have support for renamed custom fields.

$contact->custom_fields = array(
array('label' => 'segment', 'name' => 'CustomField1', 'value' => 'Website Contact Form'),
array('label' => 'other', 'name' => 'CustomField2', 'value' => 'Website Contact Form')
);

Thanks!
Shannon

@nCrafts
Copy link
Author

nCrafts commented Mar 2, 2015

I tried this. Your API wants both the label and name to be in the CustomFieldnn format. I have to use this to get it to work:

$contact->custom_fields = array(
array('CustomField1' => 'segment', 'name' => 'CustomField1', 'value' => 'Website Contact Form'),
array('CustomField2' => 'other', 'name' => 'CustomField2', 'value' => 'Website Contact Form')
);

@nCrafts
Copy link
Author

nCrafts commented Mar 9, 2015

Any updates?

@shannon7wallace
Copy link
Contributor

Hi nCrafts,

Sorry, it looked to me like you had answered your own question. My apologies my code sample didn't work properly for your account (it had worked previously for my own).

I've updated my notes to reflect your changes. We also have it documented here (if you expand the custom field section) that the label and name need to be in the form CustomFieldnn. http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html

@nCrafts
Copy link
Author

nCrafts commented Mar 9, 2015

A little disappointing, but I guess it'll do. I hope you would consider allowing allowing a custom name, or label when we use the API, since it is allowed if we add the field using the Constant Contact dashboard.

@shannon7wallace
Copy link
Contributor

Hi,

We have gotten feedback from our users on this limitation with custom fields, and are most definitely looking at adding this functionality in the future. I don't have any estimated timelines yet on when we'll be able to have this, but it is very high on our list of priorities.

@csciuto csciuto closed this as completed Jun 11, 2015
@zheoreh
Copy link

zheoreh commented Apr 13, 2016

Is it still not implemented?

@SeanDKendle
Copy link

3 years later, and we still can't send in Custom Fields with the names that were set in the UI?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants