Install a Search Client in Salesforce Communities (Lightning)
In this article, you will learn how to replace the default Salesforce component Search Results with a SearchUnify package, which on top of being native, can fetch results from your entire org and external sources, such as your organization's YouTube channels, Slack discussions, and GitHub repositories. The installation takes only a few minutes but goes a long way in enhancing user experience.
Comparison of Search Results Component and SearchUnify Package
When users are confronted with thousands of posts and articles, most choose to run a search. Navigation seems old school to many. As a Salesforce admin, you can improve user experience by replacing the default Search Results component with a powerful SearchUnify package. This table summarizes the key differences between the both.
|Search Results (Component)||SearchUnify Package|
|Global (Org) Search||No||
|Objects Supported||Articles, Discussions||Articles, Discussions, and all other standard and custom objects|
|Results from External Sources||No||Yes|
Enable SearchUnify Search on Salesforce Communities
Create a Salesforce Lightning Search Client
- Ensure that Salesforce Communities are enabled. Skip this step if you already have a community.
- Create a Salesforce Lightning search client.
- Configure the Salesforce Lightning search client.
Install SearchUnify Package
- Unzip the search client and open
- Copy the link to the search client package.
- Paste the link in your browser window and install SearchUnify Lightning Community for All Users.
Is the App Taking too Long to Install?
Close the tab. To open the Salesforce Communities (Lightning) configure page, use App Launcher.
- Click View in another browser for configuration.
Connect Salesforce Org with SearchUnify Instance
The data flow between SearchUnify and your Salesforce org is managed through Remote Sites, of which two must be created before you can proceed with configuration. For instructions, check out Create Remote Sites in Salesforce.
Process SearchUnify Package
- Select your community for configuration from the drop down.
How to Create a Community?
- From Setup, go to All Communities through Quick Find Box.
- Click New Community, the Customer Service tile, and then Get Started.
- Enter a Name and click Create.
- Copy the Service Endpoint and UID from
readme. (Install Search Client, Step 4)
- Enter your Service Endpoint (in readme.txt), Provision Key (in readme.txt), and UID. Also enter the page where the search results will be displayed.
Important. The Provision Key will be shared by your SearchUnify representative.
Important. Select or create a page with full-width and only one column. The page name should be limited to lowercase letters and hyphens. Spaces are not allowed.
- Click Process.
Insert SearchUnify Search Component to a Community Page
- Open your community in the Builder mode. (From Setup, go to All Communities through Quick Find Box, and click Builder.)
- Move to Security from .
- Select Allow Inline Scripts and Script Access to Whitelisted Third-party Hosts from the Script Security Level dropdown.
- Click from the sidebar, select Theme, and enter Configure.
- Click , and from the Search Component drop-down select SUAuthBanner_1234 (where 1234 are the first four digits of your UID).
Don't See the Packages?
- Launch your Developer Console.
- In the window that pops up, click Open Lightning Resources from the File menu.
- Expand each resource to view its subfolders and activate the packages. Then, proceed to Configuration in step 6.
NOTE. In case you cannot find subfolders in a resource, delete the resource and create a Lightning Component of the same name and check again. To create a new Lightning Component, click New from File and then Lightning Component.
- Launch your Developer Console.
- Drag SUAuthSearch_1234 (where 1234 are the first four digits of your UID) to the Content section of the page you have selected or created.
You have successfully installed SearchUnify on Salesforce Communities.
Further Customization (Optional)
Besides SUSearchUnifyHeaderDymamic and SUBannerComponent, SearchUnify Lightning Community offers the following components. Use them to further enhance user experience.
- SUListComponentDynamics for customizing search results pages. Its attributes are
pagesize, modalOpen, pageHeaderTitle, gotoSearchPageText, noResultFoundMsg, openNewTab, showMetadata, and
- SUSearchComponent_< first_four_value_of_search_client > provides five attributes:
noSearchResultFoundMsg, defaultFilterCollapse, defaultSearchPage, pageSize, and
- SURecommendedDataDynamic to manage recommendations. Its attributes are
- SU Ltng Analytics on Case provides search data of the user who has raised that case.
Last updated: Friday, September 4, 2020