Using the import function of the PHP wrapper for API v3 I'm trying to update custom fields that were empty in the first import. I don't succeed in updating/adding those fields.
I've successfully imported 10 subscribers but did not add values for a couple of custom fields. Updating those subscribers and explicitly providing values for those empty fields fails. With 'fails' I mean the fields do not get updated, they stay empty. The API does not return any error either.
On the other hand, when I manually (through the website) update the subscribers and provide values for the empty field they do get updated successfully through the API in the next imports.
When custom fields are empty in a first import, it's impossible to update those fields later through the API.
Hi, Thanks for the post.
You can easily update a subscriber by using the Add Subscriber http://www.campaignmonitor.com/api/subscribers/#adding_a_subscriber
If the email address already exists, it will update the passed fields (including custom fields) for that subscriber.
Another alternative, if you want to locate subscribers with missing information, you can create segments to search and return subscribers that do not have a value set on a particular field, which you can then match and update with your subscriber list. For example, if you have a text based custom field which holds say "Job Title", you could create a segment named "Empty Job Title" and assign a rule which lists all subscribers where the Job Title is not provided. For more detailed information on segments, please see: http://help.campaignmonitor.com/topic.aspx?t=90
You also have full control over segments within the API and for more information on this please see: http://www.campaignmonitor.com/api/segments/
I hope that helps answer your query.