Case and Opportunity Relationship - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
B DB D 

Case and Opportunity Relationship

Hello SF Experts
In our project there is requirment between Case and Opportunity Object. Requirement is: When an opportunity is created with particular product based on product family( product are added via standard OpportunityLineItem) Case object should be created automatically.
Furthermore there is requirement that whenever the Case status is moved/changed,  Opportunity stage should be moved automatically.
  1. To meet the requirement, i created Process builder- Process on Opportunity Product object to check if the product is added to opportunity, if the condition is true then create New Case
  2. Also i created a lookup on opportunity object with case( Opportunity being child and case being Parent) so that proces builder can be used to update Opportunity stage when  Case status is changed
With the above 2 configuration, the Case is getting create automatically, but its not attached to opportunity, also i dont see opportunity in the case related record?
Also let me know if they is any better way to meet the requirement. Request your hep
Thanks,
BD
 
Best Answer chosen by B D
Sunil Kumar SirangiSunil Kumar Sirangi
You need to create the opportunity field on the Case object and not the way you have done it. Change it and you will see that when you go to opportunity record you will see the related list of cases.

Thanks
#LCAnswers

All Answers

Sunil Kumar SirangiSunil Kumar Sirangi
You need to create the opportunity field on the Case object and not the way you have done it. Change it and you will see that when you go to opportunity record you will see the related list of cases.

Thanks
#LCAnswers
This was selected as the best answer
Amnon KruviAmnon Kruvi
I would definitely say that you need lookup field from case to opportunity, though creating the relationship from opportunity product to case is also correct.

The question I have is this: you said that changing the case should push the process. What if you have 5 different cases from 5 different opportunity products? 
B DB D
If i create the lookup from case to opportunity or Oppt product to Case( then case becomes child and Opportunity becomes parent) , then how do i meet the requirement to update the stages of opportunity automatically when the Case status is changed with process builder
There is going to be one case per opportunity
Bablu KumarBablu Kumar
Hi B D ,

You Definitely Need to Create Lookup from case to Opportunity,

You can easily done it  to create Two process Builder of your Reqirement Like as,
According To your First Requirement

Create Process Builder On Opportunity Product And Create New Recode of Case.

According to your second Requirement 

Create Process builder on Case Object And Update opportunity Stage According to Requirement

Thanks Bablu
Amnon KruviAmnon Kruvi
You can update the opportunity be creating a process on the case. But you'll need the case to be related to the opportunity to do that. 

If you only ever have one case per process, then the relationship to the opportunity product doesn't sound useful to me. I would agree with Sunil and say that you could remove it once you set up the opportunity relation. 
B DB D
thank you all for the response, appreciate your help.