Last Updated on October 17, 2021 by Rakesh Gupta
Opportunity Contact Role represents the role of Contact/Person account on an Opportunity. There is many-to-many relationship between Opportunity and Contact, through a junction object called OpportunityContactRole. In an opportunity, you may add many opportunity contact roles.
There is no restriction on Account from which the Contact can come, you can add any Contact from any Account.
For example, Rakesh Gupta might be the Executive sponsor for the opportunity “Universal Container”, and Edna Frank might be the Quality Control for same Opportunity.
How to define Contact Role?
According to your business requirement, you can modify contact role for Opportunity.
To define contact role for Opportunity navigate to Setup | Feature Settings | Sales | Team Roles
If you want to add new role click on New Button, for reorder or make some value default click on Reorder button and save it.
Contact Role fields?
Below is the list of contact role standard fields, which Salesforce does not allow us to add any new custom field on Opportunity Contact Role.

How to add contacts as a Contact Role inside Any Opportunity?
- First, identify the Opportunity in which you want to add Contact Role
- Then navigate to Contact Role related list click on Add Contact Roles button.
- Select a Contact and click on the Next button.
- In the end select a Role. You can make any contact as primary.
- Once you’re done, click on the Save button.
- You can add the same contact as many times in Contact role for same opportunity.
Proof of Concept
Formative Assessment:
I want to hear from you!
What did you learn from this post, is it relevant to you, and how will you modify the concepts taught in the post for your own business processes?
Make a post and tag me on Twitter @automationchamp using #AutomationChampionFlow.
I like the valuable information you supply for Salesforce through your articles.
I will bookmark your weblog and take a look at again right here regularly.
Good luck for the next!
Is there a way to add custom button on Opportunity Contact Role to create dynamic contacts?
No you can’t. That’s standard behaviour. You can’t customise contact role given in the related list of opportunity, account etc. what is your requirement?
I need to dynamically Add Contact with a button if not present in LOOKUP at the the time of adding records. That means on the edit page.
What I thinking is to have custom object related list which will be exact replica of Contact Role and saving it in a standard OpportunityContactRole, so that it won’t impact a general behaviour.
Please let me know if you have some code for this.
Sorry, I didn’t get you.
I have a trigger on the opportunity that counts the number of contact roles. When a new contact role is added, the trigger doesn’t fire until the associated opportunity is edited. Anyway to automatically fire the opportunity trigger when a new contact role is added?
Yes you can, I achieved requirement mentioned in this article using Inline Visualforce Page (Contains logic to find primary contact and update the Task) on Opportunity.
I can accept that they don’t want us messing with the Contact Role object. But I want to write a validation rule on the Opportunity object if the number of Contact Roles is zero. Is there a way to access that number?
Yes through Apex trigger. Write one apex trigger on Opportunity object.
Are you able to pull in ContactRole to view in the Salesforce1 app?
I never tried this,give me few days I will try and let you know.
Rakesh, nice blog.
Reading the user requirement “user wanted to update Name of all Tasks with “Primary Contact role“ related to an opportunity when contact role is updated as primary”, assume this include to create new Task related to Opportunity and Contact and assign to Opportunity owner?
Thanks Johan,
Yes you are right.