You need to sign in to do that
Don't have an account?
Mike @ Partners
Adding Campaign to a contact with the php5 toolkit
I am trying to add a Campaign to a contact using the API. im a little lost on where to begin. Do i need to run a query to update the Campaign with the contact ID number i would like add to it, or do i update the contact with the Campaign id. Any ideas would be very helpful.
Thank you,
mike
You may find it helpful to use the AppExchange Eclipse Plugin or AppExchange explorer to browse the schema.
thanks much,
michael
$CampId ='70130000000Bx1V'; //your campgin number goes here
$fieldsToupdate
= array('CampaignId'=>$CampId, 'ContactId' =>$Idc);
$sObject = new SObject();
$sObject->fields = $fieldsToupdate;
$sObject->type = 'CampaignMember';
$updateRespons = $mySforceConnection->create(array($sObject));
}
You can also add Leads this same way, but instead of using 'ContactId =>' you would use 'LeadId =>' and then the lead ID number.
Hope this helps.
thanks,
mike