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. The SearchUnify package runs as a native app and can fetch results from your org and external sources, such as your organization's YouTube channels, Slack discussions, and GitHub repositories right into your Community Cloud. 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. 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|
Salesforce Default Permissions
Search clients on your org adhere to default Salesforce positions, which means that a Guest User cannot see any cases on the search results page and a Partner can see all the cases concerning his or her Contacts. The table summarizes the default permissions followed on the Salesforce search client.
|Object||User Type||User can see|
|Cases||Internal||All the cases in an org.|
|Partner||All the cases that belong to the Partner's account.|
|Guest User||No cases are visible.|
All the cases that belong to the Customer's contacts.
|Articles||Internal||All the articles in Knowledge.|
|Partner||All the Public articles and the articles visible to the Partner.|
|Guest User||All the Public articles.|
|Customer||All the Public articles and all the articles visible to the Customer.|
|Group Feed||Internal||All feeds of all the groups.|
|External||All feeds of the groups of which the user is a member and all feeds from public groups.|
|Guest||All feeds from public groups.|
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
- Visit Salesforce AppExchange, look up "searchunify", and open the top listing, SearchUnify - Unified Cognitive Platform for Salesforce.
- Click Get It Now.
- If prompted, log in with your Salesforce admin credentials.
- It's usually a good practice to install an app on Sandbox, instead of Production.
- Install the app for All Users. A warning might come up. Overlook it and proceed with installation.
In the end an Installation Successful message will greet you.
Connect Salesforce Org with SearchUnify Instance
Process SearchUnify Package
The data flow between SearchUnify and your Salesforce org is managed through Remote Sites. Create remote two (three if you have turned on multitenancy) remote sites. The instructions are on Create Remote Sites in Salesforce. After creating the remote sites, add them all to CSP Trusted Sites.
- Click Salesforce App Launcher and then View All.
- Find SearchUnify Configuration and click it open.
Select the installation location for the search in Choose search platform. Then, turn on CDN Support if you use multitenancy.
- Turn on CDN Support if you use multitenancy. Turning on CDN Support improves speed but it also requires two extra settings:
During search client processing, you need a CDN endpoint which can be found in the readme file
For successful processing, you will have to create three remote sites instead of two. The website to be inserted in Remote Site URL can be found in the readme file
- Enter the details and click Process.
- Select your application for Configuration. The search client will be installed in the chosen application on Console, Community, or Visualforce. The field is absent when Internal is picked.
- Enter Service Endpoint. It is your SearchUnify instance URL.
- Enter CDN endpoint. The endpoint is in readme.
- Enter Provision Key. You can get it from your SearchUnify representative.
- Enter UID. It is your search client ID.
- Enter expiration time (authentication token for searches in minutes). Enter any integer. The suggested value is 120.
Processing can take up to five minutes.
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.
Recommendations is a SearchUnify component which suggest search results on select pages. The admin can configure the pages where the widget will display. The details on the component can be found in the Recommendations section on Basic Search Client Configurations.
Once you have activated Recommendations from search client configurations, return to your Salesforce org, open Community Builder and drag SUAuthRecommendedData to the pages where the widget will be displayed.
Last updated: Wednesday, March 29, 2023
Or, send us your review at firstname.lastname@example.org