function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Derek_CDerek_C 

Importing unsubscribes into Sforce

Hi. I'm working on a project to integrate Sforce with my company's email system for one of our clients. One of the tasks is to get everyone who opted out in our system and update an opt-out boolean field for the matching leads and contacts in Sforce.

The primary key being used in our system is the Email field. In the client's Sforce account, there can be multiple leads or contacts with the same email address. This means that I can't just keep the Sforce ID in our system and update the Sforce object with that; I have to find every Sforce lead and contact with that email address and update it's unsub field. That's a lot of queries.

We have about 1,000 unsubscribes to import to start with, but eventually, they will be updated daily, so it will be a small number at a time.

Still, I want to know if there is a more efficient way of doing it. I'm using C# and Sforce API version 5.0.

Thanks,

Derek

Message Edited by Derek_C on 05-24-2005 03:02 PM

Ron HessRon Hess
for each email you want to opt out, you should be able to make one call using the SOSL Search in which you list all tables that you want to pull the email address from (contact, lead) then gather these into two lists, when that loop is done one update on each table using the compiled list as a batch should do it.