How to Activate AI Search for the Business Portal and Allow Cases to Be Searched
When working with AI Search in ServiceNow, the goal is simple: users should be able to search from the Business Portal and find the records they expect.
In an ideal world, enabling AI Search on the portal would be enough. In reality, there are several configuration layers that must align before Case records appear correctly in portal search results.
At a high level, the following pieces need to be configured:
- The portal needs to use AI Search.
- The Search Application needs to include the correct Search Profile.
- The Search Profile needs to include the Case Search Source.
- The Case indexed source needs to include the correct child tables.
- The result needs to render correctly in the portal.
- The result needs to navigate to the correct page when selected.
This article walks through the configuration required to activate AI Search for the Business Portal and allow Case records to be searched.
The Scenario
I am configuring AI Search for the Business Portal and need users to be able to search for Case records.
AI Search is available on the instance, but Case results either:
- Do not appear in the portal search results
- Do not display correctly
- Do not navigate to the expected portal page
To resolve this, I need to validate the full AI Search configuration path.
The configuration path includes:
- Confirming AI Search is enabled on the instance
- Enabling AI Search on the Business Portal
- Linking the correct Search Application and Search Results Configuration
- Confirming the Case Search Source is included in the Search Profile
- Confirming the Case indexed source includes the required child tables
- Re-indexing the Case tables
- Validating the results using Search Preview
- Configuring EVAM so Case results display correctly
- Configuring the Search Results action so Case results open correctly
Once configured correctly, Case records should be searchable from the Business Portal and should open using the expected portal page.
Why This Matters
AI Search in ServiceNow is not controlled from one place.
For portal search to work correctly, several records need to agree with each other. If one part of the chain is missing, the result can be confusing.
For example:
- AI Search may be enabled, but not enabled on the portal.
- The portal may use AI Search, but the Case Search Source may not be linked.
- The Case Search Source may be linked, but the child Case table may not be indexed.
- Cases may be indexed, but the portal may not know how to render the result.
- The result may display, but the click action may not route to the correct portal page.
This is why it is useful to validate the configuration from the top down rather than changing one setting and hoping the rest of the chain is correct.
Before You Start
Before making changes, confirm the basics.
You should know that:
- AI Search is enabled on the instance.
- You have access to the AI Search configuration records.
- You have access to Service Portal configuration.
- You have access to EVAM Definitions.
- You know which Case tables need to be searchable.
- You have a known Case record available for testing.
- You can test from a fresh browser session after indexing has completed.
This avoids chasing a portal issue when the real problem is indexing, table scope, or a missing Search Source.
Step 1: Confirm AI Search Is Enabled
Start by confirming that AI Search is active on the instance.
Navigate to:
AI Search StatusConfirm that AI Search is enabled.
This should always be the first check. If AI Search is not enabled at the instance level, the portal configuration will not behave as expected.
Step 2: Configure the Business Portal
Next, configure the portal itself.
Navigate to:
Service Portal > PortalsOpen the Business Portal record.
Set the following values:
| Field | Value |
|---|---|
| Enable AI Search | true |
| Search Application | Service Portal Default Search Application |
| Search Results Configuration | Service Portal Search |
Save the record.
This tells the Business Portal to use AI Search and connects it to the correct search application and results configuration.
Step 3: Open the Search Application
Open the following Search Application record:
Service Portal Default Search ApplicationFrom there, open the related Search Profile record:
Service Portal Default Search profileThis Search Profile controls which Search Sources are available to the portal search experience.
Step 4: Confirm the Case Search Source Is Linked
On the Search Profile, open the Search Sources related list.
Verify that the existing Search Source named Case is linked.
If Case is not listed, add the existing Case Search Source.
This step is important because the portal can only return results from Search Sources included in the Search Profile.
If Case is missing from the Search Profile, Case records will not be returned even if they are indexed elsewhere.
Step 5: Validate the Case Indexed Source
Open the Case Search Source.
From there, open the indexed source:
[CSM AIS] CaseOn the Child Tables tab, confirm that the required child Case tables are included.
For example:
x_itla_mss_sn_customerservice_mss_caseAdd any missing in-scope child tables.
This is a common place for issues. If the Case data is stored in an extended Case table, but that child table is not included, the records may not be searchable through AI Search.
Step 6: Index the Case Tables
Once the correct child tables have been added or confirmed, select:
Index All TablesThis starts the indexing process for the Case indexed source and its configured tables.
Allow time for indexing to complete before validating from the portal. Depending on the size of the tables and the instance, results may not appear immediately.
Step 7: Validate Using Search Preview
Before testing through the portal, validate the search source directly.
Navigate to the following tool in UI16:
Search Preview (new)Search for a known Case record.
A good test is to search using something specific, such as a Case number or a known short description.
Confirm that the expected Case record is returned.
If the Case does not appear in Search Preview, the issue is likely with one of the following:
- Search Source configuration
- Indexed source configuration
- Child table inclusion
- Indexing status
- Record eligibility
- User access
If the Case appears in Search Preview but not in the portal, the issue is more likely with the portal configuration, EVAM configuration, widget behaviour, or Search Results action.
Step 8: Configure EVAM for Case Search Results
Once the Case can be found by AI Search, configure how the result should be displayed in the portal.
Navigate to:
EVAM DefinitionsOpen the following record:
Service Portal SearchOpen the related list record under:
EVAM View Config Bundle MSMsCreate a new record:
Case Search ResultsUse the following values:
| Field | Value |
|---|---|
| Table | Case |
| Table fields | Number, Short Description |
| Custom fields | ai_search_teaser_title, ai_search_teaser_text, document_index, child_docs |
| Order | 500 |
| Declarative action | Navigation |
A note on the Declarative Action
There may be more than one Declarative Action named Navigation.
Make sure you use the Navigation action with this sys_id:
7e1c4bfea87f3010f877e075b63fcd0eThis matters because selecting the wrong action with the same name may result in unexpected behaviour when the user selects a search result.
Step 9: Configure the Search Results Action
Next, configure what happens when a user selects a Case result from the portal search results.
Navigate to:
AI Search > Search Results ActionsCreate a new configuration with the following values:
| Field | Value |
|---|---|
| Short Description | Case |
| Service Portal | Business Portal |
| AI Search Source | Case |
| Action name | Navigation |
| Action sys_id | 7e1c4bfea87f3010f877e075b63fcd0e |
| Portal page | standard_ticket |
This links the Case search result to the portal page that should open when the result is selected.
In this example, Case results should open using:
standard_ticketValidating the Setup
Once the configuration has been completed, allow time for indexing and cache updates.
Then test using a fresh session.
A good validation path is:
- Log in using a fresh browser session.
- Open the Business Portal.
- Search for a known Case record.
- Confirm the Case appears in the search results.
- Select the Case result.
- Confirm the result opens the expected portal page.
- Confirm the page displays the expected Case information.
If this works, the main configuration is complete.
Common Issues and Checks
Cases Do Not Appear in Search Preview
If Cases do not appear in Search Preview, start with the AI Search configuration rather than the portal.
Check the following:
- The Case Search Source is linked to the Search Profile.
- The indexed source [CSM AIS] Case is configured correctly.
- The required child Case table is included.
- The records have been indexed.
- The record being tested is eligible to be returned.
- The user or test context has access to the record.
Cases Appear in Search Preview but Not in the Portal
If Cases appear in Search Preview but not in the portal, the issue is likely further up the portal rendering chain.
Check the following:
- The Business Portal has Enable AI Search set to true.
- The portal is using Service Portal Default Search Application.
- The portal is using Service Portal Search as the Search Results Configuration.
- The EVAM configuration exists for Case results.
- The Search Results action exists for the Business Portal and Case Search Source.
- The portal widgets have not been customised in a way that bypasses the expected AI Search behaviour.
Case Results Display but Do Not Open Correctly
If Case results display but do not navigate correctly, check the Search Results action.
Validate the following:
- The AI Search Source is Case.
- The action is Navigation.
- The correct Navigation action sys_id is used.
- The portal page is standard_ticket.
- The target portal page can display the selected Case record.
Duplicate Navigation Actions Exist
Duplicate Declarative Action names can exist.
Do not rely only on the display name.
For this configuration, use the Navigation action with the following sys_id:
7e1c4bfea87f3010f877e075b63fcd0eAdditional Widget Troubleshooting
In some environments, portal widgets may have been customised or skipped during previous upgrades.
If the main configuration is complete, indexing has finished, and the search still does not behave as expected, review the Typeahead Search widget.
The Typeahead Search widget may need to be reverted to the most recent version if it has been skipped in previous upgrades.
After reverting the widget, follow the ServiceNow guidance for reclassifying search widgets:
https://www.servicenow.com/docs/r/yokohama/platform-user-interface/service-portal/reclassify-search-widgets.htmlComplete the main configuration first, wait for indexing and cache updates, and then test from a fresh session.
If AI Search still fails after that, validate the widget path in a non-production environment before applying the same approach in production.
Background Script to Find Typeahead Search Widget Instances
The following background script can be used to obtain the sys_ids of widget instances for the Typeahead Search widget:
var instances = [];var gr = new GlideRecord('sp_instance');gr.addEncodedQuery('sp_widget.sys_idSTARTSWITHfa20ec02cb31020000f8d856634c9ce9');gr.query();while (gr.next()) { instances.push(gr.getUniqueValue());}gs.info('var instances = ' + JSON.stringify(instances) + ';');Best Practice
Treat portal AI Search as an end-to-end configuration, not a single setting.
Recommended checks:
- Confirm AI Search is enabled before changing the portal.
- Validate the Search Profile includes the correct Search Sources.
- Confirm extended Case tables are included in the indexed source.
- Re-index after changing indexed table configuration.
- Use Search Preview before troubleshooting the portal.
- Use a known Case record for testing.
- Check EVAM configuration when results do not render correctly.
- Check Search Results actions when results do not navigate correctly.
- Be careful with duplicate Declarative Action names.
- Validate widget changes outside production first.
The Takeaway
Activating AI Search on the Business Portal is only one part of the setup.
For Case records to be searchable and usable, the full chain needs to be configured:
- AI Search is enabled.
- The Business Portal uses AI Search.
- The portal is linked to the correct Search Application.
- The Search Profile includes the Case Search Source.
- The Case indexed source includes the required child tables.
- The Case tables have been indexed.
- EVAM knows how to display Case results.
- The Search Results action knows how to open Case results.
Once those pieces are aligned, Case records should appear in Business Portal search and open through the expected portal page.