function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leonard Silon 8Leonard Silon 8 

How can I prevent Chatter usage until they acknowledge an agreement?

I saw other posts precenting usage of SFDC itself. All I want is to not allow a user to post a first post in Chatter unless they have "signed" acknowledgement of the acceptable use policy.

So they can continue to use Salesforce as they are today. However, when they try to post their first post they are prevented unless they acknowledged the policy. Otherwise allow them to post.

Thoughts or links to similar thoughts?
Leonard Silon 8Leonard Silon 8
Any help at all would be wonderful or at least a link to a possible solution would be great please
Neil HayekNeil Hayek
Two ideas come to mind:

One option is to use a profile-based rollout (https://help.salesforce.com/articleView?id=collab_pbr.htm&type=0) for Chatter. With this approach, you wouldn't grant a user permission to see Chatter until they've signed the agreement.  You would need to determine the process to assign users the permission once they've signed the agreement.  Potentially, have a custom field on users saying if they sign the agreement, and once they have, set this custom field and then trigger enabling chatter.

Another option is to have a trigger on Feed Item and Feed Comment insert, so each time someone tries to insert, it would have to check some value (potentially a custom field on user) to see if they have permission (signed the policy).

I don't particuarly like the second option, because the trigger would have to fire whenever any feed item or feed comment is created.  The main difference to end users for the second approach is they would see chatter (and entities such as a user profile, groups, files, etc.) even if they can't create feed posts.  With the first option, they wouldn't see Chatter entities.  If the goal/expectation is for each user to sign the agreement, I wouldn't expect the 'view only' usage option to be too critical.