Author: Dilsha Khan
The Contact Role is a child object on the Opportunity object. It contains Contact records that are related to the Opportunity and have a direct influence on it.
Contact Roles are found in Opportunity Related list.

So now the flow we are going to create is to have the rollup of all the Contact Roles on the Opportunity record.
Follow the steps below:
- Create a number field on Opportunity named “Count of Contact Role”.
- Go to Setup.
- Search “Flow”.
- Click on New and select Record Triggered”.

- Select the object as “Opportunity Contact Role”.
- After that take the “Get record” function.
- Get the Opportunity Contact Role where the Opportunity ID = Record – Opportunity ID.


- Next select “Loop”.

- Take the Assignment element.
- Create a variable named “CountofContactRole”.
- Then update the Opportunity record:



Activate the Flow
- Add the field “Count of Contact Role” on the Opportunity layout and for testing add Contact Role to the Opportunity.
- You can see the actual number of Contact Roles in the field “Count of Contact Roles”.