Public Knowledge for Mobile, Web and Facebook

Linkhttps://appexchange.salesforce.com/listingDetail?listingId=a0N300000059QxXEAU&tab=r
PricingFREE
5 Users / Year$0
DescriptionA template for setting up a Public Knowledge base using Salesforce Knowledge

See Also

My notes on Knowledge

See Documenting the PKB app

Details

Takes your knowledge base and makes a public site for it. Works really nicely - except if you want multiple brands, where it doesn't work at all. 

Setup

https://appexchange.salesforce.com/servlet/servlet.FileDownload?file=00P3000000HCTKdEAP

Gotchas

  • Make sure the Category Group and Root Category field values are the API Names of the Data Categories
  • Just about everything that can go wrong with visibility will go wrong - see Knowledge for tips. 

Issues

  • When I had Language turned on, I could not see the articles at all, it gave me an error of "The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores." I have not found a workaround for this yet. I will try again when I set up the non english site. 
  • Apparently the chinese word in the language dropdown says "China" rather than "Chinese". I can NOT for the life of me work out where to change this. 

Good Things

  • Very nice clean layout. 
  • You can create multiple Knowledge sites targeted to different groups and/or using different article types. 
  • Integrated with Cases out of the box - nice

Case Study

Branding Knowledge Base - separate knowledge base for each brand. 

Not a great solution

Even though I did get this working, I don't think this is the best solution, and I probably would not want to use the PKB App again either. The PKB App allows you to create multiple sites, but then has no mechanism to actually display those multiple sites - I don't get it.

After doing all that I did to get this working, I think the PKB app is a bit convoluted for a simple site to display knowledge and create a support ticket. I would love to see a simplified version of this app, (maybe this one may be suitable) and one that allowed multiple sites. Or I would love an app developer to create an alternative to the free PKB app - I would be happy to get my clients to pay for it.

I will be getting a developer to write us a customised knowledge base solution with a solid code foundation, rather than this "hack" that I have done to get it up and running. I hate doing quick hacks in live orgs.

 

  • One of the Category Groups is for the Brand - each brand is a Data Category in that Group
  • The Default Data Category Visibility for Brand is None
  • Create a Site for each Brand - eg \brandaknowledge \brandbknowledge
  • In the Public Access Settings for each Site set the Data Category Visibility for Brand to only be for that one brand
  • Create a PKB Settings to match each Site 
  • In the PKB Web Setup only set up two Category Groups - do not include Brand
  • Clone all the code and pages, and optionally CSS for each Brand (see below)
  • You will also need to create any new Custom Labels that need to be different for each site. 
  • Change the Site settings in Develop > Sites to use the custom PKB Template for that branded site. 
  • Ensure each article that is set to be shown in the Public Knowledge Base has a value set for Brand
  • Create a new PKB setting for the new site, and ensure the permissions are set for the Brand Data Category and the cloned VF Pages
  • Only the KB Articles relating to the brand will be shown in the Public Knowledge Base
  • It does mean that you need to be very generic with your naming and content in your KB (if they are to be shown on both sites) or duplicate KB articles for each brand - and you can't clone KB articles. 

Clone all of the VF pages and append a new site name eg pkb_mobile_brandA:

  • pkb_mobile
  • pkb_robottxt
  • pkb_siteMapIndex
  • pkb_Template

  • pkb_Home
  • pkb_sitemap

One page you don't need to clone is PKB_Settings because that is the page to do the settings, and that page allows for having two different Sites anyway. 

Clone the Static Resources and create a new Static Resource with a new .zip or .png file and append a new site name eg pkb_mobile_brandA for the following Static Resources:

  • pkb_mobile
  • pkb_logo

Clone the Javascript files and CSS files and rename them with the _brandA at the end (these are Components)

  • Make sure the variable name for pkbHome in the Javascript file references the correct home page. 
  • var pkbHome = "{!IF(pkbCon.facebook,$Page.pkb_Home_fb,$Page.pkb_Home_BrandA)}"

Clone the pkb_controller to pkb_controller_brandA and rename pbkCon to pbkConBA or similar. 

  • Now go through every component that is referenced by the controller, clone that, include the reference to the new pkb_controller_brandA and rename pbkCon to pbkConBA. You will not be able to save the cloned controller until every component that is referenced (and some components reference other components) is cloned and modified. It is a good check to ensure that every piece of code is modified. 
  • Now change any reference in the cloned VF pages to the new pkbConBA
  • You will also have to do these modifications to the controller in the Sandbox 
  • Ensure the currentSiteURL will look at the right home page. 
  • Yes, this is complete overkill, but it seemed to be the only way to ensure that each site was referencing it's own code. Take it slow, and be thorough - change every file that PKB uses. 

Also clone the pkb_test and rename pbkCon to pbkConBA or similar. 

As another Gotcha, ensure that both PKB sites are set up with Multi-Language Enabled, otherwise the links to articles don't work.  

Thanks!

 Thank you so much to Wendy Schuman who helped me get to this point - see https://appexchange.salesforce.com/listingDetail?listingId=a0N300000059QxXEAU

I'm not sure if I have explained ALL the changes well enough so please get in touch if you want to try to replicate this and you get stuck, but if you find a better way, please let us all know.