Last Updated on April 5, 2022 by Rakesh Gupta
Big Idea or Enduring Question:
As your community grows, organizations have to ensure that customers get quick answers to their questions. Question-to-Case allows moderators to escalate unresolved Chatter questions to cases from the Chatter page. You can automate this escalation process using Salesforce Flow, For example:
- Create a case from a question if, the question has received more than two likes without a reply.
- Create a case from a question immediately if the question contains the word Urgent Help.
Objectives:
After reading this blog, you’ll be able to:
- Use decision element to validate the data
- Understand how to clone a record by using the create record element
- and much more
Business Use case
Rachel Gillett is working as a System Administrator at Universal Containers (UC). She received a requirement to auto-create a case whenever a new question is created on Chatter, which contains the word Urgent help in the title.
Automation Champion Approach (I-do):
To solve this requirement, we will use the After-save Record-Triggered Flow. Check out this article to understand why we are using after-save record-triggered flow for this scenario.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes going through the following Flow diagram and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 4 steps to solve Rachel’s business requirement using Record-Triggered Flow. We must:
- Define flow properties for record-triggered flow
- Formula to determine whether the Chatter Question is created or updated
- Add a Decision element to check Chatter Questions Title
- Add a Create Records element to create a case
Step 1: Define Flow Properties
- Click Setup.
- In the Quick Find box, type Flows.
- Select Flows then click on the New Flow.
- Select the Record-Triggered Flow option, click on Create and configure the flow as follows:
- Object: FeedItem
- Trigger the Flow When: A record is created or updated
- Set Entry Criteria
- Condition Requirements: None
- Optimize the Flow For Action and Related Records
- Click Done.
Step 2: Formula to Determine Whether the Chatter Question is Created or Updated
- Under Toolbox, select Manager, then click New Resource to determine whether the record is created or updated.
- Input the following information:
- Resource Type: Formula
- API Name: forB_IsNew
- Data Type: Boolean
- Formula: IsNew()
- Click Done.
Step 3: Using Decision Element to Check Chatter Questions Title
Now we will use the Decision element to check if the chatter questions title contains urgent help and the question is just created.
- On Flow Designer, click on the + icon and select the Decision element.
- Enter a name in the Label field; the API Name will auto-populate.
- Under Outcome Details, enter the Label the API Name will auto-populate.
- Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
- Row 1:
- Resource: {!$Record.Id}
- Operator: Is Null
- Value: {!$GlobalConstant.False}
- Click Add Condition
- Row 2:
- Resource: {!$Record.Title}
- Operator: Contains
- Value: Urgent help
- Click Add Condition
- Row 3:
- Resource: {!$Record.Type}
- Operator: Equals
- Value: QuestionPost
- Click Add Condition
- Row 4:
- Resource: {!forB_IsNew}
- Operator: Equals
- Value: {!$GlobalConstant.True}
- Row 1:
Step 4: Add Action – Create a Record
The next step is to create a new case, for this, we will use the Create Records element.
- On Flow Designer, below the Yes node, click on the +icon and select the Create Records element.
- Enter a name in the Label field; the API Name will auto-populate.
- Input the following information:
- Enter Label the API Name will auto-populate.
- How Many Records to Create: One
- How to Set the Record Fields: Use separate resources, and literal values
- Object: Case
- Set Field Values for the Case
- Row 1:
- Field: Status
- Value: Escalated
- Click Add Field
- Row 2:
- Field: Priority
- Value: High
- Click Add Field
- Row 3:
- Field: Description
- Value: {!$Record.Id}
- Click Add Field
- Row 4:
- Field: ContactId
- Value: {!$Record.CreatedBy:User.ContactId}
- Click Done.
In the end, Rachel’s Flow will look like the following screenshot:
Once everything looks good, perform the steps below:
- Click Save.
- Enter Flow Label the API Name will auto-populate.
- Click Show Advanced.
- API Version for Running the Flow: 54
- Interview Label: Auto Create a Case from Chatter Questions {!$Flow.CurrentDateTime}
- Click Save.
Almost there! Once everything looks good, click the Activate button.
Proof of Concept
Now onwards if a business user creates a Chatter question post with the title Urgent Help, Record-triggered will automatically create a new case. It’s time to test out the process.
- Now create a question post by login into a community.
- Navigate to the case tab and check out the newly created case
Formative Assessment:
I want to hear from you!
What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.
Hi Rakesh, There is no objects named “Question” available in process builder.( Using Feed Item object) I have to create case if a question in community not been replied for next 5 days.
How we can check that particular question is unanswered for last 1 week.
Please help.
I am not 100% sure but create a Process on Feeditem object and check for Type = Question
Hi Rakesh – I’m having the same issue as Chamille. What was the solution? I can create the case, but it’s not linked to the question (FeedItem). Thanks.
Can you please email me your Flow and Process screenshot (with you business use case0 at info@automationchampion.com
Hi Rakesh, can these guides be applied to Questions in the community? We are using the Napili template and it doesnt have the Chatter answers as part of the template, it just uses the ‘Ask a Question’ functionality, and I need to set up some automations for this, such as, Post to internal chatter when a question is posted in community, and create a case when new question is posted. Your guides are pretty much what I need, but they apply to Chatter Answers.
Yes possible with some tweaks
What tweaks would you recommend. I’ve been working on this for quite some time but I haven’t been able to find the correct criteria to make this work for Question to Case.
Can you email me your Flow and Process screenshot at info@automationchampion.com
Wow. I had no idea this was even an option — this would be a really good way to ensure goodwill among our customers who’ve posted and haven’t heard anything. Thanks for this post!!
Thank you! I’m glad you like it 🙂