It looks like you're new here. If you want to get involved, click one of these buttons!
I see that when one re-imports users, their information (Name) remains unchanged and we have to do this manually for each subscriber.
I suggest that a "Update fields" checkbox option be included on the import screen, whereby subscriber fields are updated should the checkbox be checked.
i have a large database that i want to import with, there are many duplicated fields, i would love for sendy to be able to merge the data together.
I would also like to run a 'update your details' campaign for users, where they would refill in the signup form; this would then update the data in the database. Currently this will not accept the new data.
I had a similar issue because of how we receive our data, so I re-wrote the import csv script (the cron job). Here are some things you have to be aware of with this code:
NOTE: This is only for doing csv imports. It has nothing to do with the subscribe API, the API already has the functionality to update fields.
If you have suggestions or question I'll try to help, I'm still a novice php programmer but I've tried my best with what I have.
Here is the code for import-csv-update.csv: http://privatepaste.com/d1dfaad664
EDIT: There was a bug in the previous code that sometimes cut off the last letter of the last custom field, I have fixed the code in the above link.
Here is updated code: http://privatepaste.com/7605a6d75f
The original one was wasting memory by loading the entire parsed csv object into memory even if it didn't need to. This is happening with the standard import script too.
+1. Need the ability to update records based on import csv
+1 for ability to update records with new imported csv OR an update form, like the Subscribe form.
+1 for ability to update records with new imported csv
john, thanks for sharing your code.... to bad that the privatepaste website is down !
Can someone repost the code since privatepaste links are not working? Would love this feature - do we need to remove all users and re-import them thus losing all the bounces etc. for them?
+1 for this functionality...
No updates on this? I have a list of about 80 000 subscribers, one of the custom fields whether or not the user has an active paid subscription or not, and the date it expires.
Currently there is no way to update the fields, if i re-import an updated CSV it does not change the details if the email is already in the list.
+1 this could be very useful
+1, can someone re-upload John's code?
I had to update custom fields for a rather large list so I did something like this for myself. I've added a link to the code at the bottom of this post. I modified my original import-csv.php file, but it's probably smarter for you to save this file with another name (import-csv-update.php as John did) and then change your cron job to run that instead.
Few things to note:-
1 - This will only work for CSV imports with CRON enabled.
2 - I have not thoroughly tested this, but it works on my lists. You should either run it on a test environment, or on a couple of subscribers first to ensure that it works before updating your entire list. Back up your subscribers table before doing it if possible.
3 - This will only update the custom fields. Updating the name would require more changes and I didn't need to do this for my lists.
Taking the remaining steps from John's post since those stay the same:-
1 Save this as a new file in Sendy's root folder and name it import-csv-update.php.
2 - This will only work if you have the import cron enabled.
3 - You must change the regular import cron to point to the new import-csv-update.php instead of import-csv.php.
Here's the code: https://pastebin.com/ctdsDm62
This post originally started in 2013 and I am now facing the same issue. I am using latest version and it looks like this issue never got addressed by dev team at all.
From time to time, I import list of email addresses. I need UPDATE function if email addresses are existed to update custom fields.
I used code above by Rahul and it seems like this code only doing the UPDATE but not APPEND to record.
APPEND to record is needed.
So I looked in Rahul's code and I was able to make one little change and now it is working to APPEND the record instead UPDATE the record.
$q3 = 'UPDATE '.$databasetable.' SET custom_fields = "'.substr($custom_fields_value, 0, -3).'" WHERE id = '.$inserted_id;
Replace with this
$q3 = 'UPDATE '.$databasetable.' SET custom_fields = concat("'.substr($custom_fields_value, 0, -3).'") WHERE id = '.$inserted_id;
Is this solution still valid in v3? What is the simplest way to bulk update contact custom fields?
+1 for bulk update via csv import. @Ben ?
+1 for ability to update fields with new imported csv
+1: would love to be able to update subscriber info by csv import
+1 for this - it would seem to be an essential feature...
Ditto to the above - this would be very useful.
An earlier comment said that the API supports this though, which I can't seem to find.
~~ +1. We really need the ability to update existing custom fields. Currently if the email already exists, the "/subscribe" API doesn't update the custom fields. Please advise. ~~
Actually the "/subscribe" does update the custom fields but there is a bug that caused me to think otherwise. I will document the bug in a different thread instead.
+1 Please! This is really crucial to have!