closeio / closeio-api

Python API Client for Close
http://developer.close.com/
MIT License
65 stars 47 forks source link

Upload lead info script deletes all custom fields you didn't have in your csv #45

Closed anemitz closed 9 years ago

anemitz commented 9 years ago

https://github.com/elasticsales/closeio-api/blob/master/scripts/bulk_update_leads_info.py#L172-L175

anemitz commented 9 years ago

If you PUT the 'custom' dict it will ERASE all of the fields NOT in that dict.

You have to use the PUT "custom.field_name" syntax instead of passing this as a dictionary.

http://developer.close.io/#Leads

custom: To update a single custom field without removing the others, use custom.field_name: updated_value instead of custom: { all: 'fields', listed: 'here' }. You can also unset a single field by using custom.field_name: null.

notify @miccohen when done

anemitz commented 9 years ago

Thanks @wojcikstefan :+1: