Chatter Answers is a self-service and support community where users can post questions, receive answers and comments from other users or your support agents. Chatter Answers bring together Cases, Questions, Answers, and Knowledge article in a unified experience. A few months back, I had written an article Auto follow Question after reply, to discuss a way through which users can auto follow questions after reply. In this article, I’m going to discuss a way through which system will auto remove the followers from Questions with best replies. Let’s start with a business use case
Steven Greene is working as System administrator at Universal Containers (UC). He has received a new requirement to auto remove the followers from Questions with best replies. Actually, they want to develop an automated process, it will be responsible to auto remove the followers from Questions with best replies.
There are a few possible solutions for the above business scenario, but I’ll use Process Builder and Flow to solve the above business requirement. Before proceeding ahead, you have to understand QuestionSubscription objects in Salesforce. QuestionSubscription represents a subscription for a user following a Question. Follow the below instructions to solve the above business requirement
1. click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open the Flow canvas for you. Now create a Text variable VarT_QuestionId to store the question Id (we will pass the question Id through Process Builder), as shown in the following screenshot
3. The next step is to remove the followers from Questions with best replies. To do this drag-and-drop Record Delete element (Enter the name Remove Followers from Questions) onto the canvas and map the fields according to below details
4. Finally, your Flow will look like the following screenshot
5. Save your flow with name Remove Followers from Questions Flow and close the canvas. Don’t forget to Activate the Flow.
Our next task is to create a Process Builder on the Question object to launch a Flow. To create a Process Builder on the Question object follow the below instructions
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder and click on the New button, Enter Name, API Name and then click on the Save button
2. The next step is to add entry criteria. For this click on Add Object, select Question object and for the entry criteria, Select when a record is created or edited, as shown in the below screenshot, once you are done click on the Save button
3. The next task is to add Process Criteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions (In this case set [Question].BestReplyId Is null False), also select the check-box Do you want to execute the actions only when specified changes are made to the record? and click on the Save button as shown in the following screenshot
4. The next step is to add an Immediate action to Process. Click on Add Action (Under Immediate actions), Select the type of action to create (In our case Flows), and then fill out the fields to define the action, as shown in the following screenshot
5. Once you are done, click on the Save button, it will redirect you to Process canvas. Finally, the Process will look like the following screenshot
Don’t forget to active the Process by clicking on the Activate button.
1) Navigate to the Q&A tab, identify the Question and click on its title.
Currently, follower count is 2.
2) The next step is to choose one of the replies as the best answer. Decide which reply is the best answer, and click Choose as Best Answer. As soon as you’re done refresh the page and check the follower count.