Merge Chatter Topics

Posted on Updated on

Merge

Topics are a great way to organize or increase post and comments visibility. For example, if you post that you’re working on a presentation for Dreamforce’14, you might want to add the hashtag topic #Dreamforce14 or #DF14 in your updates. Anyone can click on these topics to find out more information about Dreamforce’14 and see what people and groups are talking about Dreamforce’14. After Summer’14 Salesforce allows you to the delete topic from Salesforce User Interface,but not merge two different Chatter Topics.  I have never found any apps or out of the box solution to merge two different Chatter Topics. In this article we will develop same app without using code.

Business Use case :- People in Universal Container are using Chatter hashtag to organize their posts. Management in Universal Container wants to develop an application so that their system administrator can merge two different Topics (For example ABC & DEF).

Solution of above business requirement

To solve above business requirement we will use Visual Workflow and to fire this flow will use Custom Link. Before going ahead with the solution you have to understand about TopicAssignment Object. It represents the assignment of a topic to a specific feed item or record. Below are the key fields from TopicAssignment object

Field Name Details
EntityId Identifier of the feed item or record.
TopicId Identifier of the topic.

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 variable

  • Topics (Sobject variable – TopicAssignment type )
  • GetAllPostFromTopics and NewTopicDetails (Sobject Collection Variable – TopicAssignment type)
Sobject Variables
Sobject Variables

3) Drag and drop a Screen Element ( Give the name Merge Topics) onto the window and add two fields with below below detail

Name Data Type Required
Old Topic ID Textbox Yes
New Topic ID Textbox Yes

It will look like the below screenshot

To Get User's Input
To Get User’s Input

4) Drag and drop a Fast Lookup ( Give the name Get all post from Old Topic ) onto the window to get all posts, links etc from old Chatter Topic and map the fields according to below details

  • Select Object TopicAssignment
  • TopicId{!OldTopicID} [OldTopicID is nothing but Screen Input field], Save Id of records into any variable in our case it’s {!GetAllPostFromTopics} Sobject Collection variable. You can take help from the following screenshot
Extract all Posts from old Topic
Extract all Posts from old Topic

5) Drag and drop a Record Delete ( Give the name Delete Old Topic) on the window. Under object select Topic, and map ID–> {!OldTopicID}, as shown in below screenshot

Delete Old Topic
Delete Old Topic

6) Drag and drop a Loop Logic (Give the name Extract post one by one) on the window and extract post from Sobject Collection variable and pass it to Sobject variable, as shown in the below screenshot

Loop Over TopicAssignement
Loop Over Topic Assignement

7) Drag and Drop Assignment Logic (Give the name Update Topic ID) on the window and a assign value of  Screen input {!NewTopicID} to Sobject variable variable {!Topic.TopicId} so that all posts from an Old Topic to assign New Topic. Take the help from the below screenshot

Update Topic ID
Update Topic ID

8) Drag and Drop Assignment Logic (Give the name Add all posts Into New Collection) on the window and assign value from Sobject variable {!Topic} to Sobject Collection variable {!NewTopicDetails} so at the end of for loop we will have all posts from Old Topic into One collection with updated Topic ID. Take the help from the below screenshot

All in One
All in One

9) Finally drag and Drop Fast Create (Give the name Record Create) on the window to add all posts from an Old Topic to New Topic,It means we are crating their reference in TopicAssignment object, as shown in the below screenshot

Move Posts from one Topic to another
Move Posts from one Topic to another

10) Finally our flow will look like the below screenshot

Merge Chatter Topics
Merge Chatter Topics

11) Save the flow with name (Merge Chatter Topic)  and close the canvas.

Add Visual workflow into the home page component

We can call Flow from custom button, link, sub-flow, Visualforce page , Apex start() or using Flow Trigger workflow action. Here we will call our flow using Custom Link available in the homepage component. To do that, follow below instruction:

1) Create custom link from Name | Setup | App Setup | Customize | Home | Custom link

Custom Link
Custom Link

2) Add custom link in the Home page component
3) Add Home page component into the Home page layout

It’s time to test this feature

1) In this demo I will  Merge Chatter Topic Dreamforce (Old) with Salesforce (New)
2) To get Topic ID ,for Topic Dreamforce take  a look of the below screenshot

How To Get Topic ID
How To Get Topic ID

3) To open this app click on “Merge Chatter Files” link available on the homepage, and fill the details you can take help from below screenshot

Open Merge Chatter Topic app
Open Merge Chatter Topic app

4) Now enter old and New Topic ID, In my case Dreamforce is Old Topic and Salesforce is New Topic and click on Next Button, as shown in the below screenshot

Merge Chatter Flow
Merge Chatter Flow

Your all Posts Including Status Update, links, polls or files are moved to new Topic.

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.

Various ways to setup email notification for Chatter Answers

Posted on Updated on

Email Notification for Chatter Question

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. In this article I will discuss various ways to setup email notifications for Chatter Answers. I am also going to discuss few business use cases and their solution.

1) Chatter Answers email notification Settings

Salesforce.com provides out of the box feature to setup email notifications for Chatter Answers, So System administrator can choose email notification options for their organization by following the path Name | Setup | App Setup | Customize | Chatter Answers | Email Notification Settings and possible options are
1) Replies to a question they own
2) Replies to a question they follow
3) Selects a best answer on a question they follow
4) Sends a private reply to their question (Customer Support)

Chatter Answers Email Notification Settings
Chatter Answers Email Notification Settings

But there are many business scenarios those are not falling under above category, I will discuss few here.

2) Question belongs to specific zones

Business Use case : – Universal Container is using Chatter Answer for their Internal support. They want to send an email alert to Public group (Product Experts) for all questions created in Zone = “Internal Issues“.

Solution of above business requirement

 To solve the above business requirement I will use Workflow Rule (on Question object) to send an Email alert. To create a workflow on the Question object follow the below instructions

a) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
b) Select an object  Question from the drop-down
c) Enter Name, for Evaluate criteria  select Created, In Rule Criteria select Question Body != Null and Zone = Internal Issues as shown in the following screenshot

Question belongs to Zone Internal Issues
Question belongs to Zone Internal Issues

d) Add one Immediate Workflow Actions i.e. New Email alert as shown in the following screenshot

Email Alert to Product Experts
Email Alert to Product Experts

e) Save the workflow and activate it.

Note :- If you want to send email alert for every Chatter question then include all Zones in workflow rule entry criteria like Zone !=  Null.

3) Question with no reply within time limit

Business Use case : – Universal Container has their internal team of experts to reply customer questions. They want to send an email alert to Public group (Product Manager) for question doesn’t have any reply after 5days of its creation.

Solution of above business requirement

The reply is basically the response to a question in an answers community. To solve the above business requirement I will use Time Based Workflow Rule (on Question object) to send an Email alert. To create a workflow on the Question object follow the below instructions

a) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
b) Select an object  Question from the drop-down
c) Enter Name, for Evaluate criteria  select Created, and any time it’s edited to subsequently meet criteria ( To create a time dependent workflow), In Rule Criteria select Number of Replies <= as shown in the following screenshot

Question with no reply
Question with no reply

e) Click on Add Time Trigger button and Set the length after how many days/hours workflow will fire  i.e.  in hours and days, In this case select 5hr after the Question: Created Date. Now add one Email alert action for the time dependent workflow to send email notification to Public group (Product Manager). You can take help from the following screenshot

Time based email alert
Time based email alert

e) Save the workflow and activate it.

4) Question Report Abuses above limit

Business Use case : – Universal Container wants to send an email alert to their System administrator (i.e. Rakesh Gupta) for questions which has more than 10 report abuse.

Solution of above business requirement

 Any users from the community can flag a question as SpamInappropriate or Hateful, as shown in the below screenshot

Flag question as Spam
Flag question as Spam

To solve the above business requirement I will use Workflow Rule (on Question object) to send an Email alert. To create a workflow on the Question object follow the below instructions

a) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
b) Select an object  Question from the drop-down
c) Enter Name, for Evaluate criteria  select Created, For Rule Criteria select Number of Report Abuses >= 10 as shown in the following screenshot

Question with more then 10 report abuse
Question with more then 10 report abuses

d) Add one Immediate Workflow Actions i.e. New Email alert as shown in the following screenshot

Email Alert to System Administrator
Email Alert to System Administrator

e) Save the workflow and activate it.

5) Reply Report Abuses above limit

Business Use case : – Universal Container product team closely watching customer activity on Chatter Answers. They wants to send an email alert to the System administrator (i.e Rakesh Gupta) for all replies which has more than 5 report abuse.

Solution of above business requirement

 To solve the above business requirement I will use Workflow Rule (on Reply object) to send an Email alert. To create a workflow on the Reply object follow the below instructions

a) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
b) Select object  Reply from the drop-down
c) Enter Name, for Evaluate criteria  select Created, For Rule Criteria select Number of Report Abuses >= 5 as shown in the following screenshot

Reply with more then 10 report abuse
Reply with more then 10 report abuses

d) Add one Immediate Workflow Actions i.e. New Email alert as shown in the following screenshot

Email Alert to System Administrator
Email Alert to System Administrator

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.

Auto follow Answer after reply

Posted on Updated on

Reply

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 following the path Name | Setup | App Setup | Customize | Chatter Answers | Email Notification Settings for more information take a look of the below screenshot

Chatter Answers Email Notification Settings
Chatter Answers Email Notification Settings

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 user will auto follow Question after reply to them.

Solution of 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

To get Users current Subscription Status
To get Users current Subscription Status

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

Decision Element
Decision Element

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

Follow Question
Follow Question

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

 Auto follow Question after reply

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

Workflow Rule on Reply Object
Workflow Rule on Reply Object

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

New Flow Trigger Action
New Flow Trigger Action

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

 Question

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

Reply to Question

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.

Auto Add/Remove Permission Set – Part 2

Posted on Updated on

Revoke

In last article Auto Add/Remove Permission Set – Part 1 I have gone through the way to automate Assign Permission Sets process based on user defined criteria. In this article I will discuss a way to automate Unassign Permission Sets based on criteria.

Business Use case :- Management in Universal Container wants to automate permission set removal or Unassignment process so that their admin workload will be reduced.

Solution of above business requirement

In this article I will discuss how to auto Unassign/Remove Permission Sets from the user. First of all create few fields on the User object to save condition to auto Unassign/Remove Permission Sets to the user. In this demo I will create a few fields on the User object as shown in the below screenshot

Custom Fields on User object
Custom Fields on User object

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 PermissionSetAssignment Object. It’s represents the association between a User and a Permission Set. Below are the key fields from PermissionSetAssignment object

Field Name Details
PermissionSetId ID of the PermissionSet to assign to the user specified in AssigneeId.
AssigneeId ID of the User to assign the permission set specified in PermissionSetId.

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 Two Text type variable UserID (To pass User ID) and RemovalPermissionsetID (To pass  ID  of permission set which system admin want to remove from user)
3) Drag and drop a Record Delete ( Give the name Delete Permission Set) onto the window to assign permission set to user and map the fields according to below details

  • Select Object PermissionSetAssignment
  • AssigneeId{!UserId}
  • PermissionSetId{!RemovalPermissionSetID}, You can take help from the following screenshot

Remove Permission Set
Remove Permission Set

4) Finally our Flow will look like the following screenshot

Remove Permission Set

8) Save the flow with name Remove Permission Set and close the canvas.

Create Workflow rule to fire our Flow

Our next task is to create a workflow on the User object on creation and every time it’s edited event. To create a workflow on the User object follow the below instructions

1) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
2) Select object  User from the drop-down
3) Enter Name, for Evaluate criteria  select Created, and any time it’s edited to subsequently meet criteria ( To create a time dependent workflow), For Rule Criteria select End Date != False  and  Remove = False as shown in the following screenshot

Workflow Rule1
Workflow Rule1

4) Now Add a time trigger to  to set Remove flag True after 0hr of End Date. To do this click on Add Time Trigger button and Set the length after how many days/hours workflow will fire  i.e.  in hours and days, I selected 0hr after the End Date. Now add one field update action for time dependent workflow and set Remove flag to True. You can take help from the following screenshot

Time based action
Time based action

5) Save the workflow and activate it.
6) Create another workflow (i.e. workflow Rule2 ) on the same object to fire our Flow, set entry criteria of trigger is Remove = True

Workflow Rule2
Workflow Rule2

7) Add one Immediate Workflow Actions i.e. New Flow Trigger and Select Flow (Remove Permission Set) and set Variable (UserID and RemovalPermissionsetID ) value as shown in the following screenshot

New Flow Trigger Action
New Flow Trigger Action

8) Add one Immediate Workflow Actions i.e. New Field Update and Set Remove flag to False.
9) Save the workflow and activate it.

It’s time to test this feature

1) Go to the User’s detail page to whom you want to Unassign Permission Sets and fill the detail. In this demo I am going to Unassign Permission Sets with Name “Test“,  it will look similar to below screenshot

Permission Set Removal Detail
Permission Set Removal Detail

2) To check time dependent workflow queue Follow the path, Click on Name | Setup | Administration Setup | Monitoring | Time-Based Workflow and search the queue

Time-Based Workflow Queue
Time-Based Workflow Queue

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.

Auto Add/Remove Permission Set – Part 1

Posted on Updated on

PermissionSet

Permission Sets are helpful for providing a particular set of functionalities to a user in addition to the permissions provided to their Profile. For example, you may want to grant only a few of your sales users to convert leads or two factor authentication access. In this case, rather than having a special sales profile with the convert lead permission or two factor authentication permissions. You have to create a permission set with the lead conversion permission and assign it to a specific user. So most of the time you came around this situation mentioned below

  • Assign permission set to a user after 7 days from Today i.e.  21-Aug-2014 future date
  • Assign permission set for a specific time period 22-Aug-2014 to 30-Aug-2014 (Like you have defined start and end time)
  • Remove permission set from user on 31-Aug-2014 i.e. future date

Note:- Remember Today is 14-Aug-2014.

So what you will be do in these cases, wants’ to automate this process if yes then have a look at this article.

Business Use case: – Management in Universal Container wants to automate permission set assignment process so their admin workload will be reduced.

Solution of above business requirement

In this article I will discuss how to auto assign Permission Sets to the user and In the second article I will discuss about auto remove Permission Sets. First of all create few fields on the User object to save condition to auto assign Permission Sets to the user. In this demo I will create few fields on the User object as shown in the below screenshot

Custom Fields on User object
Custom Fields on User object

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 PermissionSetAssignment Object. It’s represents the association between a User and a Permission Set. Below are the key fields from PermissionSetAssignment object

Field Name Details
PermissionSetId ID of the PermissionSet to assign to the user specified in AssigneeId.
AssigneeId ID of the User to assign the permission set specified in PermissionSetId.

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 Two Text type variable UserID (To pass User ID) and PermissionsetID (To pass permission set ID )
3) Drag and drop a Record Create ( Give the name Assign Permission Set) onto the window to assign permission set to user and map the fields according to below details

  • Select Object PermissionSetAssignment
  • AssigneeId{!UserId}
  • PermissionSetId{!PermissionSetID}, You can take help from the following screenshot

Assign Permission Set
Assign Permission Set

4) Finally our Flow will look like the following screenshot

Auto Add Permission Set to User

8) Save the flow with name Add Permission Set and close the canvas.

Create Workflow rule to fire our Flow

Our next task is to create a workflow on the User object on creation and every time it’s edited event. To create a workflow on the User object follow the below instructions

1) Click on Name | Setup | App Setup | Create | Workflows & Approvals | New Rule
2) Select object  User from the drop-down
3) Enter Name, for Evaluate criteria  select Created, and any time it’s edited to subsequently meet criteria ( To create a time dependent workflow), For Rule Criteria select From Date != False  and  Start= False as shown in the following screenshot

Workflow Rule1
Workflow Rule1

4) Now Add a time trigger to  to set Start flag True after 1hr of From Date. To do this click on Add Time Trigger button and Set the length after how many days/hours workflow will fire  i.e.  in hours and days, I selected 1hr after the From Date. Now add one field update action for time dependent workflow and set Start flag to True. You can take help from the following screenshot

Time based action
Time based action

5) Save the workflow and activate it.
6) Create another workflow (i.e. workflow Rule2 ) on the same object to fire our Flow, set entry criteria of trigger is Start= True

Workflow Rule2
Workflow Rule2

7) Add one Immediate Workflow Actions i.e. New Flow Trigger and Select Flow (Add Permission Set) and set Variable (UserID and PermissionSetID) value as shown in the following screenshot

New Flow Trigger Action
New Flow Trigger Action

8) Add one Immediate Workflow Actions i.e. New Field Update and Set Start flag to False.
9) Save the workflow and activate it.

It’s time to test this feature

1) Go to the User’s detail page to whom you want to assign Permission Sets and fill the detail. In this demo I am going to assign Permission Sets with Name “Test“,  it will look similar to below screenshot

Permission Set Assignment Detail
Permission Set Assignment Detail

2) To check time dependent workflow queue Follow the path, Click on Name | Setup | Administration Setup | Monitoring | Time-Based Workflow and search the queue

Time-Based Workflow Queue
Time-Based Workflow Queue

3) Below is the Proof of concept for your reference

Proof of Concept

Auto Add/Remove Permission Set – Part 2

Rakesh Gupta’s Salesforce Newsletter of the Week – 10th August 2014

Posted on

Articles that you may like

1)  Mass Transfer Chatter Files
2) Click and Join Chatter Group
3) Reminder For Chatter Group Pending Membership Requests

Tip #1 – Chatter Influence Indicator on Profiles

Chatter Influence provides an easier way to see who leading collaboration with their contribution in Chatter for your organization. It shows Chatter activity statistics like how many posts and comments someone’s made, how many comments and likes they have received. Navigate to your user profile page and left hand side you can find Chatter Influence Indicator.

Chatter Influence Bar
Chatter Influence Indicator

If your organization has Chatter Free User or Chatter External users, they don’t see influence information on their own profiles or anyone else’s, for them it will look like below screenshot

No Chatter Influence Indicator
No Chatter Influence Indicator

Tip #2 – Chatter Coworker Invitations

Salesforce.com allows organization users to invite their coworkers into Chatter using Chatter Free license. To enable this service follow the below steps

1) Click on Name | Setup | App Setup | Customize | Chatter | Settings
2) Click on Edit and navigate to the Coworker Invitations section
3) Select the check-box Allow Coworker Invitations and add domains, Click on Add More link to add as many as domains you want to add

Coworker Invitations
Coworker Invitations

4) Click on Save.

Note:- Administrator can add up to 200 email domains to define who can join Chatter for their organization.

Salesforce.com Winter’15 Sandbox Preview Instructions

The Sandbox Preview window for Winter’15 is scheduled to start on the September 5, 2014. If you would like your Sandbox organization to take part in the Winter’15 Preview, your Sandbox must be active on a preview instance by September 5, 2014 to take part in an overall instance upgrade. Gaining early access to Winter’15 is a great way to test out new features and settings before the GA release and upgrade of your production org. It’s also important to be aware of the sandbox preview window should you wish to retain the current release in your sandbox org (to effectively opt-out of the preview)

Preview Windows Refresh Schedule

Use the graphic below to assist in understanding and planning around the preview window refresh schedule. For example, if your Sandbox is on CS3 and you refresh it after 12 AM PST on August 30, 2014, it will be moved to a non-preview Instance, It means to test new features of Winter’15 release your organization has to wait until your production Org will be upgraded to Winter’15 release. To participate in Winter’15 early preview make sure your Sandbox organization is refreshed/Created before 11:59 PM PST on August 29, 2014.

Understanding the Preview Window Schedule
Understanding the Winter’15 Preview Window Schedule

Note:- To learn more about Salesforce.com Winter’15 Sandbox Preview Instructions click on the link. If you want to know about Winter’15 release dates for your org take a look of http://trust.salesforce.com/trust/maintenance/