AnsweredAssumed Answered

How to link a campaign to leads and contacts during import?

Question asked by Grant Christensen on Jun 18, 2014
Latest reply on Jun 27, 2014 by Francesca Shiekh
Hi all,

I am on my way converting from Salesforce to Sugar.  I have exported all my data from Salesforce and have managed to import Accounts, Contact, Opportunities, Leads, Campaigns, Meetings etc.

The next thing I want to do is to link the relationships in the Salesforce CampaignMembers.csv export file.  Essentially this is listing all of the contacts and leads linked to a campaign.  This is not a target list but the leads and/or contacts created from that campaign.

I was not able to do this during the import process, so assume I need to do it through the API.  I found some basic code to connect to the system, login, and I have now been trying to set relationships between campaigns and associated leads and contacts without any success.

Can anyone share any code with me that would accomplish this, or, advise if I am going about it the wrong way.  It looks like the set_relationship call would be the one to use, but not sure if I am doing it right.  Essentially after calling, I am not seeing any links.

Additionally, which DB table would the links then live in.  The alternative is to create the links in the table, if that can be explained as well?

Thanks for any assistance.