You need to sign in to do that
Don't have an account?
gringoese
Assign Leads to Campaigns direct from .NET instead of Web-to-Lead
Can anyone recommend the best approach for assigning Leads to Campaigns without using a Web-to-Lead form? I have a .NET/C# website with multiple campaigns on it and I don't want the visitors to have to fill out a form every single time.
Try something like the following:
CampaignMember campMember = new CampaignMember();
campMember.LeadId = [leadID];
campMember.CampaignId = [CampaignId];
campMember.Status = "Responded";
All Answers
The dialogue script Campaign Responder control does precisely this. Provide a campaignID and lead/contact ID, and it will auto-create a CampaignMember response record.
I'm facing the same problem. I'm creating a Lead. I want to link it to an existing Campaign. The ID of the Campaign is available. I do not know how to link it to the Lead. Could someone help with some C# code sample?
(I'm using the Enterprise API)
Here is what I have done right now...
SFLead.FirstName = "First Name";
SFLead.LastName = "Last Name";
SFLead.Email = "myemail";SFLead.Phone = "123456789";SFLead.MobilePhone =
"987654321";SFLead.Company = "My Company";SFLead.Description = "Description";
SFLead.Campaign= ???;
Try something like the following:
CampaignMember campMember = new CampaignMember();
campMember.LeadId = [leadID];
campMember.CampaignId = [CampaignId];
campMember.Status = "Responded";
Hi Sudarsh,
Create a new CampaignMember object for each Campaign response. Salesforce will auto update the status for repeated responses to the same campaign. Notify your Marketing users to use the campaign influence reports to view this activity.
-Mike