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
Benedetto Virzi 17Benedetto Virzi 17 

campaign of contacts who have purchased some products

Hi,

I want create a campaign of contacts who purchased some products. This products are in the opportunity rows or in contract rows (custom object).  How can I do?

Benny
ShashankShashank (Salesforce Developers) 
You can query for the contact roles for the opportunities to get the contact records and create campaign member records to use in the campaign.