How to make community members follow the community

When you add members to a community as a community owner, they do not automatically follow the community. This makes them miss out on all updates you want them to receive. I understand why it has been developed like this as someone else could easily spam you by adding you to a lot of communities and you want to decide yourself if you want to follow it.

Some community owners have asked us to make their members follow the community anyway. The following SQL script allows you that. This was written for Connections 5.5 so for other version it might differ slightly. Best is always to test this in Development

First we are checking how many and who is a member and not a follower (not needed, purely informational).

select count (*) from sncomm.MEMBER
where sncomm.MEMBER.COMMUNITY_UUID =
‘communityID’
and sncomm.MEMBER.MEMBER_UUID not in (SELECT sncomm.FOLLOWING.MEMBER_UUID from sncomm.FOLLOWING where sncomm.FOLLOWING.COMMUNITY_UUID = ‘communityID’)

This gives us the amount of non -followers for the given community. Next is to identify them

select sncomm.MEMBER.MEMBER_UUID, sncomm.MEMBERPROFILE.DIRECTORY_UUID, sncomm.MEMBERPROFILE.DISPLAY
from sncomm.MEMBER left join sncomm.MEMBERPROFILE
on sncomm.member.MEMBER_UUID = sncomm.MEMBERPROFILE.MEMBER_UUID
where sncomm.MEMBER.COMMUNITY_UUID =
‘communityID’
and sncomm.MEMBER.MEMBER_UUID not in (SELECT sncomm.FOLLOWING.MEMBER_UUID from sncomm.FOLLOWING where sncomm.FOLLOWING.COMMUNITY_UUID =
‘communityID’)

Now we will run the same select but as part of an insert. We are adding 2 hard coded values. todays date to the FOLLOWING table ‘created column and ‘a’ to the orgID column

insert into sncomm.FOLLOWING (COMMUNITY_UUID, MEMBER_UUID, CREATED_BY, CREATED, ORG_ID)
select sncomm.MEMBER.COMMUNITY_UUID, sncomm.MEMBER.MEMBER_UUID, sncomm.MEMBER.MEMBER_UUID, ‘2019-05-06-13.05.09.665000’, ‘a’
from sncomm.MEMBER left join sncomm.MEMBERPROFILE
on sncomm.member.MEMBER_UUID = sncomm.MEMBERPROFILE.MEMBER_UUID
where sncomm.MEMBER.COMMUNITY_UUID =
‘communityID’
and sncomm.MEMBER.MEMBER_UUID not in (SELECT sncomm.FOLLOWING.MEMBER_UUID from sncomm.FOLLOWING where sncomm.FOLLOWING.COMMUNITY_UUID =
‘communityID’);

Leave a Reply

Your email address will not be published. Required fields are marked *