I developed a syncronisation tool but we have a performance issue I think. Imagin a campaign with 10000 contacts, how can I filter these clicks, opens, sends, based on the eventtime (or creation time).
The problem now is that if i syncronise, I load ALL opens, clicks and sends from all Send Mails.
Can you tell me the best practise for doing this?
We do not currently have an API that will filter these specifically for events on a date range. However, it is possible to get this working on your end. Currently the best way to pull all information from a specific event, would be to do a GET call on the Campaign Events URI. This will grab all of the information you need for just that one event.
In order to sort just the campaign events from campaigns in a specific time period, you would need to run a search for all SENT campaigns from the Campaign Collection. This will list all of the sent campaigns, with the campaign sent dates in the XML. You would then compile the list of sent campaigns from a specific time frame, and only do the event campaign gets on that set of campaigns.
I apologize that this is probably the best way to do this, and I will notify our engineers that there is a desire to have functionality so that we can search for campaigns by date sent.
If you have any questions please let me know.
Would you mind telling me which programming language you are using? We may have an example that we can send to you, depending on which language it is.
Im working in c# but the problem is not the campaigns, the problem is retrieving opt-outs, opens, clicks.
Now in my code I do the folowing:
For each sent campaign I retrieve all opens, opt-outs etc, but without filtering; this will be 10 000 records each time I do this and the next day, when my syncro runs again, again I will have the same records + the new ones.
I apologize I thought you were pulling the data for opt outs, clicks, and opens by campaign, not by contact. If you are doing it by contact, our system returns all opens, clicks, and opt outs for a particular contact within the last 90 days. There is no way to just pull a specific date range for the contact events URI unless you do it after you receive the full data from the API.