Last Updated on June 25, 2017 by Rakesh Gupta
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. One major problem with Chatter Answers is it doesn’t have features like auto follow the question after reply. If you have any experience with Answers in Success Community so you know, Once you reply to any Question you will auto follow the Question. Benefits to follow a Question is you will get an email notification when there is a new reply to a question you follow ( If this feature is enabled for your Organization). System administrator can find this information for their organization by navigating Name | Setup | App Setup | Customize | Chatter Answers | Email Notification Settings for more information take a look at the below screenshot
In this article, I will show you how you can develop the same kind of app for your organization without using the code.
Business Use Case
Universal Container is using Chatter Answer for their Internal support. They want to develop an app so that their users will auto follow the Question after reply.
Solution for the above business requirement
To solve this requirement we will use Visual Workflow and Workflow Rule (i.e Headless Flow). Before going ahead with the solution you have to understand about QuestionSubscription and Reply Object. QuestionSubscription represents a subscription for a user following a Question and Reply represent a reply that a user has submitted to a question in an answers community. Below are the key fields of QuestionSubscription object
Field Name | Details |
QuestionId | ID of the Question which the user is following. |
SubscriberId | ID of the User who is following the Question |
To develop this application follow the below instructions
1) Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2) Click on New Flow, it will open flow canvas for you. Create Three Text type variable UserID (To pass the User ID ), QuestionID (To pass Question ID ) and SubscriptionStatus ( To Store the value)
3) Drag and drop a Record Lookup( Give the name Find User Subscription Status) onto the window to find users’ current subscription status and map the fields according to below details
- Select Object QuestionSubscription
- QuestionId= {!QuestionID}
- SubscriberId= {!UserID}, Save Id of record into any variable in our case it’s {!SubscriptionStatus}. You can take help from the following screenshot
4) Now Drag and Drop Decision element (Give the name Subscription Status) on the window to check whether variable {!SubscriptionStatus} is null or not null. If the variable is Null = True it means user is not following the question, you can take help from the following screenshot
5) The next task is to Drag and drop a Record Create ( Give the name Follow Question) onto the window to follow the question and map the fields according to below details
- Select Object QuestionSubscription
- QuestionId= {!QuestionID}
- SubscriberId= {!UserID}, you can take help from the following screenshot
6) Add one more element to bypass the else condition, It means if the user is already following the question. I added Assignment element
7) Finally, our Flow will look like the following screenshot
8) Save the flow with name Auto follow Question after reply and close the canvas.
Create Workflow rule to fire our Flow
Our next task is to create a workflow on the Reply object on creation event. To create a workflow on the Reply object follow the below instructions
1) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
2) Select object Reply from the drop-down
3) Enter Name, for Evaluate criteria select Created, For Rule Criteria select Reply Body != Null as shown in the following screenshot
4) Add one Immediate Workflow Actions i.e. New Flow Trigger and Select Flow (Auto follow Question after reply) and set Variable (UserID and QuestionID) value as shown in the following screenshot
5) Save the workflow and activate it.
It’s time to test this feature
1) To test this app navigate to Q&A tab and find the Question to which you want to reply/answer, like the below screenshot
Right now follower count is 0.
2) The next task is to reply/answer the Question, as soon as you done with reply refresh the page and check the follower count, Below is the Proof of concept for your reference
Note :- I will suggest you to Implement this first on your developer org test it and then move it to Production. Let me know if you have any difficulty to Implement it.
6 thoughts on “Auto follow Question after reply”
Pingback: Getting Started with Process Builder – Part 29 (Auto Remove Followers From Questions With Best Replies)
Phu
Can you make this work using Process Builder?
Rakesh Gupta
As per my understanding, No
Pingback: Getting Started with Process Builder – Part 29 (Auto Remove Followers from Questions with best replies) « Rakesh Gupta's Blog
Johnf541
I really like your writing style, good information, thankyou for posting. John
Rohit
Thanks Rakesh. I was looking for it