What is the Parent-Child Case in Salesforce?
When a case is related to a parent case, it means a connection between cases. The relationship can be a grouping of comparative cases for simple tracking or a division of one case into numerous cases for a resolution by users. You need to use a Screen Flow that helps the users. Let’s first discuss what a screen flow is.
What is a Screen Flow?
A screen flow creates multiple cases and creates a parent-child structure. This Screen Flow is somewhat muddled because it contains four unique situations later after clients enter the case data, which are:
- Create Parent Case / No More Case
- Create Parent Case / Add Another Case
- Create Child Case / No More Case
- Create Child Case / Add Another Case
There are two methods for planning the flow: make 3 Decision components with two results each or 1 Decision component with four results. Here, we will utilize 1 Decision with four results to clarify the flow more effectively.
In this post, we will discuss the steps to create the flow.
Steps To Create The Flow
- Go to the gear icon and click on Setup.
- Go to Quick Find Box, Search “Flow,” and select “Flows.”
- Once you click on New Flow, Select Auto launched Flow (No Trigger) and clicked on the Next button.
- Create Record-Id Variable: Because the flow will dispatch on Account and it is necessary that all the cases ought to be connected to it, we make a record-Id variable to bring the Account data.
- Create a Case Record Variable as Placeholder: We will utilize this case record variable to store the user input and make the parent or child cases using this variable.
- Create a Counter Variable: We can create a counter variable to track the many cases we have made; once a case is added, we add one to the counter.
- Create a Formula to show the Parent or Child. (Optional): If Counter is one, we are creating the parent case. Otherwise, it will be a child case; We can put this formula o the screen element, so your users can be reminded of what types of cases they are creating.
- Use Assignment to add Constant Values: If all cases should share the same values for some specific fields(example. AccountId), assign them first before the screen element.
- Add the Screen for “Create Case.”: Utilize the fields feature and add the case record variable. Drag the fields you need the users to fill in. Add another checkbox-Create More case to let users decide whether another case is required. Use the Counter and formula resource to create a user-friendly title. Finally, uncheck “Previous” to prevent errors.
- Add Decision with Four Outcomes: We have four different outcomes based on the illustration. Write the conditions for each outcome using the Counter and the “Create More Case” checkbox. Use the default outcome for the last one.
- Create Parent Case -> End: If it is the first case and no more case is needed, use create Records and the Case record variable to generate the parent case.
- Outcome 1:
- Create Parent Case -> Continue: Even though we will create more cases, we still need to create this case first since we need the parent case ID. This is the clone of step 11.
- Create a Text Variable to Store Parent Id: Once the case is created, the Id field for the case record variable will be populated. But since the case record variable that we made from step 5 will be overwritten again and again, we need to save the first Case Id with another variable. This will be considered as the Parent Case Id.
- Save the Parent Id: As mentioned in the previous step, update the text variable with the Case Id from the case record variable.
- Counter add one and link back to the Screen: Add one to the Counter, so the flow knows we create Child Cases after the first case.
(Note: You can combine this into step 14 and link step 11 back to the screen).
- Outcome 2:
- Update Parent Case Id: If outcome three is reached, the user has finished the screen for another time, and the Case record variable is updated to the newest case. The only thing we need to do is update the Parent Id using the text variable we created. It is also recommended to clean up the Case Id.
- Create a Collection to Store Child Cases: We create a collection to store them and make them all together because there can be several child cases (unlike parent case, which is only one).
- Add Child Case to the Collection: Add the current Child case to the collection.
- Counter add one, and Link Back to the Screen: Link step 18 to step 15. Add one to the counter, so the flow knows we are creating Child Cases after the first case.
(Note: You can combine this into step 18 and link step 18 back to the screen).
- Outcome 3:
- Update Parent Case Id: Use the text variable we created to update the Parent Id and clean up the case Id.
- Add the Current Child to the Collection.
- Create all Child Cases: Since no more case is needed, we can create all the child cases using the collection variable. The flow ends here.
- Outcome 4:
- Save & Activate the Flow.
- Create an Action on Account Object.
- Go to Object Manager, click on the quick find box, and search for the “Account” object.
- Click the Account Object and Go to “Buttons, Links, and Action.”
- Click New Action Button.
Create an action with the Screen flow that we just created and activated. Remember to put it on the Page layout!
> Here is the Demo Video of the above Flow:
Cases are known as the remarkable tool in Salesforce used to interact with customers and solve their problems seamlessly. It keeps a log of customer issues, displays a complete view of the customers, and much more all in one platform. A case hierarchy shows cases related to each other via the Parent Case field. In the case hierarchy, child cases are indented to indicate that they are related to the parent case above them.
Would you like to hire the best CRM consulting partner to get the most out of your CRM investment? At Cloud Analogy, we offer CRM consulting services to support your comprehensive sales, marketing, and customer service needs. Contact us today!