+ Start a Discussion

Salesforce Flow & Process Builder: Automatically create Opportunity Contact Roles with associated Contacts to Opportunity from Custom object


I am looking to perform a Mass Record Create of Opportunity Contact Roles. Scenario: when I create an opportunity from a custom object record (very much like an account) with associated contacts, I'd like to automatically create  contact roles per contacts related to the custom object record and tie those Opportunities to the newly created Opportunity.

The account custom obejct record works very similar like the relationship for Account -- Opportunity -- Contact. 

Right now, the flow does NOT throw an error nor does it create any Opportnity Contact Role records... The Process builder fires when a new Opporunity record is created.

User-added image

User-added image
Gaurav HandooGaurav Handoo

I believe the concern seems to be the decision box, which is going to the loop element in case contact list is null. I believe you would need to swap the branch to the condition where Contact list is not null.

Hope this helps. Please mark best answer if it does.