Setting up Knowledge on Communities

This is about setting up communities ONLY as a PKB instead of using the horrible PKB app. 

PKB

YAY! No more horrible terrible PKB app (see Public Knowledge for Mobile, Web and Facebook). The PKB app is the worst app ever released by Salesforce. With communities now you can create a great looking Public Knowledge site and it doesn't cost that much for the licencing. And it can be multilingual and have a fully customised support page.


You need to get a 200 logins per month or 1 named user licence customer community. You just need the most basic of licencing as you won't have any logged in users. 

You are going to use the Napli Template and hide a lot of the site using CSS. 

You want to show knowledge articles and have people contact support - that is it. 

Note: This write up is not for a multilingual community - so see Knowledge on Communities for my notes about multilingual Knowledge on Communities. However, I have used these steps and successfully built a multilingual community, so it is definitely doable. 

Steps

Create

  • Create the Community
  • Choose Customer Service (Napili) and go through the wizard
    • Be careful what you set the URL as
  • Click Build & Customize when it's done. 

This is what it looks like as the bare bones - the hilighted bits are the ones we are not going to need and will delete or hide. 

Management

Now we need to set up the site to read the knowledge articles. I am going to assume you have all your knowledge set up, and data categories set up first. See Knowledge for more details. 

  • Dashboard - don't touch
  • Engagement - don't touch
  • Moderation - don't touch
  • Recommendations - don't touch
  • Topics - this is where we do the work.
  • Administration - there is a bit to do in here too. 

Topic Management

  • Create new topics - these will generally match your data categories
    • Eg, if you are having FAQ, then create a FAQ topic. 

Navigational Topics

  • Only add a handful of navigational topics. 
  • Add the topic, then click the book and plus button to add the data categories associated with that topic.
  • When done, click Save

Featured Topics

If you have a lot of topics and are willing to add pretty pictures to them you can set up something like Eway's home page https://go.eway.io 

  • Choose a handful of your topics to be featured. 

Article Management

This is the most time consuming, stupid, and boring part - why is this not automated!??!?!? 

  • For every single article that you have created, you need to edit it and assign topics to it. 
  • The trick is to set the drop down to Articles without topics. 

Members

  • Add Community User and System Administrator
    • Choose Portal from the drop down list to get Community User

Administration

Have a look at the other settings to make sure you are happy with them.

Preferences

I missed one setting, because my topics were not showing up publicly, and they are showing up perfectly when logged in.

 

Ensure you go to Community Management > Administration > preferences and check Give access to public API requests on chatter - no idea why!

When you are finished Activate your community. 

Security

Go to Setup > Develop > Sites and choose your Community site. 

Click Public Access Settings

Object Settings

Cases

  • Read, Create
  • Ensure all fields that are needed for Case Creation in your org are set to Read and Edit. 
  • Choose the right Page Layout
  • Set the Tab to be Default On
  • Ensure all the Web fields (eg Web Company, Web Contact Number, Web Email and Web Name) are set to Edit. 

 Knowledge (or whatever your Article Type object is named)

  • Read
  • Ensure only the fields that an external user should see are granted permissions. 

Others

  • Ensure not other objects are accessible 
    • For me Contracts was full access and Ideas was read by default. 
    • Products and Price Books are read also - so make them not available. 

Data Category Visibility

  • Add only the Data Categories you want to be visible on your public knowledge site. 
    • Eg my internal only data categories begin with Salesforce - so they won't be visible. 
    • Also I have one Data Category set aside for Brands - so only the one brand is visible on this Community. 

Make it Visible

This one is a bit hidden away...

  • Go to Communities > All Communities and click on Builder for your community
  • Click the settings (cog icon) tab
  • In the General Tab
  • Check Public can access the community
  • Now publish the community

Now, when you look at your community the articles will be there. 

Make sure you test your community in an incognito window! (otherwise you will see it as a logged in user). 

Builder

Colour and Branding

First ensure you get the right hex colour from the website, and ensure you have all the appropriate images handy. 

  • Choose one of the base colours that most is like your website
  • Now modify the Action colour and the Link colour to your website's main colour scheme
  • Now upload the logo and the banner
    • Anything you upload will look shit the first time around.
    • Look the logo is ridiculously small and very difficult to change without hours of stuffing around. If anyone has successfully changed it, please let me know.  
    • See below for an idea for using the template header for a logo. 

CSS

Here is the CSS you will need

/*hide the discussions tabs */
#askCommunity {display:none;}
.selfServiceProfileMenu {
    display: none;
}
 
/* hide the discussion filter on the articles topic pages */
.forceChatterFeedInner .page-header-filters {
	display: none;
}

/* Hide the discussion menu on the topic pages */
li.record-feed {
    display: none;
}
.selfServiceArticleLayout .forcePageBlockSectionView.full .labelCol .osOutputLabel {
    display: none;
}

/*hide the login menu */
.forceCommunityOmniBox .continue-post-wrapper {
    display: none;
}
.forceCommunityOmniBoxSwitcher .switcher-option {
    display: none;
}

Home Page

  • Delete the Ask a Question box 
  • Delete the Welcome box (unless you really really want it - it's a bit OTT)
  • Delete the tabs
  • Delete the Channels box
  • Click into the Search box and change the wording to Search for Articles. 
    • If you have a different Case Action than NewCase change it in Contact Support section also. See Below. 
  • Add Trending Articles by Topic and name it Top Articles set it to show 10 articles (or less if you don't have that many articles). 
  • Add Recommended Articles in the main panel below Top Articles
  • Add Trending Articles by Topic into the side panel and add a particular topic - add more of these panels if you want.
    • Note the Topic ID is the actual Salesforce ID starting with 0TO - the only way I can see how to see it is to open the topic by navigating to it from the topic catalogue page /topiccatalog
  • Add a rich content editor in the site footer with a hyperlink to return to the company website. 
  • The logo is ridiculously small. Thankfully the main website design is the logo on the top of the banner.
    • So I added a rich text component to template header and added this content
    • This makes it appear nicely aligned with the articles. 
<div class="logo" style="max-width: 1140px; margin-left: auto; margin-right: auto; padding-bottom:10px;">
<p><img src="/SmallLogo.png" /></p>
</div>

Topic Detail Page

  • Click into the topic box and uncheck Show Compact Feed... 
  • I changed the wording on discussions so I can see that it is hidden in the CSS 
  • Set the Active Tab to articles

 

Oh this is another area where I got stuck for HOURS!

In Active Tab type "articles" in lower case - FFS how are you meant to know that. There is no docco on it

Thankfully once I knew what I was trying to do, I found this help article https://developer.salesforce.com/forums/?id=906F0000000BOvFIAW


Search Page

  • Remove the Discussion tab and uncheck "Show the All results tab". 

Ensure you test your search. 

Support

These are the steps to ensuring your Contact Support button works. 

  • Note: I renamed Web Company, Web Contact Number, Web Email and Web Name to be Your Name etc so it looks better on the Create a Support ticket page. 
  • I recommend creating a new Case Record Type for these cases.
  • Also create a new value for Origin - eg MyCommunity

Steps

  • Create the Record Type
  • Create a value in the Origin Picklist
  • Create a new Global Action - eg CommunitySupport

  • Set default values for Case Origin, Priority and Status

  • The layout is very straightforward. 

Now back in your community builder there are three four! places to enter this Global Action Name

  • Home Page - click the Search button, in the properties popup open Contact Support and place the Action Name in Case Action Name
  • Contact Support Page - click on the main Contact Support widget, in the properties popup open Actions in the Publisher and enter the Action Name in the Signed-In User Case Action and the Guest User Case Action
  • Also set up Case Deflection using the standard settings

Making Support Work

Support won't work without this "One Weird Trick"

I had a 19 day Premier Support case open to try and work out why after setting up ALL the support steps documented, and how it was set up on my previous Community, but nothing I was doing would submit cases.  I had the same error as this https://success.salesforce.com/answers?id=9063A000000pA8x

Well it turns out there is a little known "feature" released in Summer '16 that you need to set.

https://releasenotes.docs.salesforce.com/en-us/summer16/release-notes/rn_networks_guest_log_case.htm

Make sure you Edit the Site and choose the Quick Actions that can be used for Support AND check Guest Access to the Support API (What the Support API is, we will never know).

So, where is this in the documentation? It was definitely not in the document that I was following. So I asked Salesforce Docs. Here is the twitter thread. More details on that to be added at Communities Documentation.

Support troubleshooting

I am trying to set up commmunities based support in a very large and complex org that I was not involved in setting up, and  going through all the steps that I would normally do in Building a "Simple" Case Management Process in Salesforce. I am really really struggling. For some reason my public cases are just NOT being created, and I can not get the stupid debug logs to work either. There are no errors, nothing. Just no cases being created.

Here's what I've tried 

  • Ensure I have Web-to-Case enabled. So go to Setup > Build > Customize > Self-Service > Web-to-Case and check Enable Web-to-Case. 
  • Ensure that the Default Case user has access to the record type and access to all the fields on the Global Action. Thanks to Josh in this post
  • Ensure that the Guest site user has access to the record type and access to all the fields on the Global Action. I added ALL fields to the Guest User Access to test it. 
  • Ensured the record type had all the picklist values available to it.
  • Turned off all case assignment rules so they would not kick in. 
  • Turned off all Process Builders and Workflows on Cases

Hmmm, it seems to be this https://help.salesforce.com/articleView?id=000005060&type=1 which is very weird becuase I KNOW I have set up a Support process on Napili previously using exactly the Web Company, Web Name, Web Email and Web Phone fields. Bizzare. OK. Turning everything back on to see if it's still that.

Well, I don't know if it was that, but it's a good checklist to try. 


Here's another thing I ran into. After deploying a new Global Action, it just would not display on the Community page, not matter what I tried. It's API Name was PartnerProgramNew. After many hours I renamed it to PartnerNew and it then worked! Is it a lenght thing? Did it just need to refresh? I don't know. 

Auto Responder

  • Create an Auto responder email - remember to set the Case Thread ID in the subject AND in the body, so if they respond it attaches to that case. 
Your Support Request: {!Case.Subject} {!Case.Thread_Id}
  • Create an Auto Response Rule (or edit an existing one if you have it - set criteria as Case Record Type = your new record type and Case Orgin = the origin you set in the Global Action

 

 

Now publish your site, wait, then open it in an incognito window and test contacting support

 

Topics

Look, Topics are finicky, and very troublesome. I even have a known issue about Topics on translated articles https://success.salesforce.com/issues_view?id=a1p3A000000eno7QAA. So if things don't look right the first time, go back to your Data Categories and Topics and try and re-set them up.

Deleting a topic, then re-adding it, and then re-linking ALL the articles to that topic, then waiting about 2 hours, seems to work. Don't ask why, bit it seems to.

Topics are even a mystery to me as to how they work - they are the same object (0TO) as topics for Objects, and even though you have to type the name in 3 times, (Featured Topics, Navigational Topics and Topic Management, they all seem to be able to be the same topic. But if you create the same topic name on two different communities it knows to create a different topic. Do a SOQL query on topics in Workbench to check it out.