Glean offers Salesforce widgets that enable users to seamlessly search across all company apps and receive contextual recommendations directly within Salesforce lightning and community pages.
The widget is pending review in the AppExchange. Once approved, it can be installed from there. In the meantime, it requires to be installed from outside of the AppExchange.
- Open the package link and log into the org where you’d like to install.
- Choose “Install for Admins only,” check the acknowledgement and press install.
You will be prompted to allow the `https://*.glean.com` as part of CSP policy. This is necessary to allow Glean embedded search to function on community sites.
Glean provides a Salesforce widget that allows users to search across the entire corpus directly from Salesforce Lightning pages.
- Search across company corpus from any Salesforce lightning record / page / home.
- Get contextual recommendations from a Glean search widget on lightning records.
This widget shows a search bar which can be used to search across all your company’s data. It is available on the following pages in the lightning app builder:
- App Page
- Home Page
- Record Page
The widget shows contextual recommendations based on the current page. It also includes a search box which allows the user to search manually similar to the Glean Search widget.
It is available on the following pages in the lightning app builder:
- Record Page
- Open a page where you’d like to display the widget, for example a Case or Contact page.
- Choose “Edit page” from the setup menu.
- Drag the Glean Search / Glean Recommendations widget to the location you’d like it to appear on the page.
- Press the Save button and repeat the process for any other applicable pages.
Glean widgets can be used to replace the inbuilt search box and results on a Salesforce community cloud site.
Use-case: Setup Glean external search for authenticated and guest users on a community cloud site.
An admin can configure the Glean widgets for Salesforce Community as a one-time activity by visiting the Glean app in Salesforce.
- As a System administrator, open the App menu and search for “Glean”.
- Provide the required configuration settings, as per the steps outlined in the page.
Backend URLThis is the URL for your Glean deployment. It will be of the form
WebApp URLThis is the URL for your Glean deployment web. It can be set to
https://<your-glean-external-search-subdomain>.glean.com if one exists or
Client-auth API tokenTo obtain this key, an admin with sufficient access can head to
https://<your-glean-external-search-domain.glean.com>/admin/setup/tokenManagement?tab=auth to generate a new key. The admin can set an expiration date for the key or rotate the key as needed.
Disable lightning web security if it is enabled (Winter ‘23 and onwards)
Lightning security replaces the current Salesforce lightning locker and is enabled by default in new orgs. This currently causes compatibility issues in community widgets. We recommend turning this off and using the existing Salesforce lightning locker security architecture to use the Glean widget.
Access the Session Settings page as a Salesforce administrator:
- Select the gear in the upper-right of the page.
- Select Setup.
- Enter Session Settings in the Quick Find field.
- Select the Session Settings link in the left navigation bar.
- Uncheck the Use Lightning Web Security for Lightning web components box.
- Select Save.
- Empty your browser cache.
For guest / existing users access must be granted to their profiles for the GleanCommunitySearchController apex class.
This step is only required if guest users can access the community site.
To access the guest user profile:
- Go to your community site builder page
- Click on “Settings” from the left-hand-side panel
- Click on the guest user profile link to access its settings.
- Click on "Enabled Apex class access"
- Move "glean.GleanCommunitySearchController" to "Enabled Apex classes" and click "Save".
Similar to above, if non-guest users also access the community site, they need to be granted access to the "GleanCommunitySearchController" apex class.
- Go to "Setup" -> "Apex classes"
- Search for "GleanCommunitySearchController"
- Click on "Security"
- In the next page add the corresponding user profile.
The example below outlines an integration for a help-center community site, but the same steps should apply for other sites as well.
- Go to Setup
- Search for “App manager”
- In the App manager, locate your community site -> actions -> “Manage”.
- Select “Builder”. This will open the Salesforce experience app builder for your site.
- Select “Page structure” from the left menu, and select “Template Hero”
- Change the “Search component” from the menu on the right to “Glean search”.
This can also be added to the compact header search if the theme you are using supports it.
- Click on the “edit” icon in the menu bar and select “Search”.
- From the page structure menu on the left, remove “Global search results”.
- From the components menu on the left, drag and drop the “Glean search results” component to a panel on the page in the “Content layout” section.
- Include a search input with the search results.
- Select the Glean search results component and enable “Show inline search box”.
- Select “Theme settings” from the left menu.
- Disable “Set max page width”.
If you are using a default theme then this setting would apply to all pages, in which case it is better to clone an existing theme layout and apply this setting change to the search page only.
The Glean case deflection widget suggests articles to the user based on their inputs while they fill out a support request.
To integrate the Glean Case Deflection widget:
- Go to the customer support page in the site builder.
- Remove the default Case deflection widget from the page.
- Drag and drop "Glean Case Deflection" from the component menu to the Sidebar next to the Support request form.
Click on "Preview" and verify your changes before publishing to your site.
Lastly, click on “Publish” to publish your changes. Note that this will make the changes live on your site.