Automatically Create Cases from Unresolved Chatter Questions

Automatically Create Cases from Unresolved Chatter Questions

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.


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:

  1. Define flow properties for record-triggered flow
  2. Formula to determine whether the Chatter Question is created or updated
  3. Add a Decision element to check Chatter Questions Title
  4. Add a Create Records element to create a case

Step 1: Define Flow Properties

  1. Click Setup.
  2. In the Quick Find box, type Flows.
  3. Select Flows then click on the New Flow.
  4. Select the Record-Triggered Flow option, click on Create and configure the flow as follows:
    1. Object: FeedItem
    2. Trigger the Flow When: A record is created or updated
    3. Set Entry Criteria
      1. Condition Requirements: None
    4. Optimize the Flow For Action and Related Records
  5. Click Done.

Step 2: Formula to Determine Whether the Chatter Question is Created or Updated

  1. Under Toolbox, select Manager, then click New Resource to determine whether the record is created or updated. 
  2. Input the following information:
    1. Resource Type: Formula
    2. API Name: forB_IsNew
    3. Data Type: Boolean
    4. Formula: IsNew()
  3. 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. 

  1. On Flow Designer, click on the + icon and select the Decision element. 
  2. Enter a name in the Label field; the API Name will auto-populate.
  3. Under Outcome Details, enter the Label the API Name will auto-populate.
  4. Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
    1. Row 1:
      1. Resource: {!$Record.Id}
      2. Operator: Is Null
      3. Value: {!$GlobalConstant.False}
    2. Click Add Condition 
    3. Row 2:
      1. Resource: {!$Record.Title}
      2. Operator: Contains
      3. Value: Urgent help
    4. Click Add Condition 
    5. Row 3:
      1. Resource: {!$Record.Type}
      2. Operator: Equals
      3. Value: QuestionPost
    6. Click Add Condition 
    7. Row 4:
      1. Resource: {!forB_IsNew}
      2. Operator: Equals
      3. Value: {!$GlobalConstant.True}

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.

  1. On Flow Designer, below the Yes node, click on the +icon and select the Create Records element.
  2. Enter a name in the Label field; the API Name will auto-populate.
  3. Input the following information:
    1. Enter Label the API Name will auto-populate.
    2. How Many Records to Create: One
    3. How to Set the Record Fields: Use separate resources, and literal values
    4. Object: Case
    5. Set Field Values for the Case
    6. Row 1:
      1. Field: Status
      2. Value: Escalated
    7. Click Add Field
    8. Row 2:
      1. Field: Priority
      2. Value: High
    9. Click Add Field
    10. Row 3:
      1. Field: Description
      2. Value: {!$Record.Id}
    11. Click Add Field
    12. Row 4:
      1. Field: ContactId
      2. Value: {!$Record.CreatedBy:User.ContactId}
  4. Click Done.

In the end, Rachel’s Flow will look like the following screenshot:

Once everything looks good, perform the steps below: 

  1. Click Save.
  2. Enter Flow Label the API Name will auto-populate.
  3. Click Show Advanced.
  4. API Version for Running the Flow: 54
  5. Interview Label: Auto Create a Case from Chatter Questions {!$Flow.CurrentDateTime}
  6. 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.

  1. Now create a question post by login into a community.
  2. 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.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

Preferred Timing(required)

10 thoughts on “Automatically Create Cases from Unresolved Chatter Questions

  1. 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.

  2. 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.

  3. 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.

      1. 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.

  4. 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!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.