Effective customer support, project management, and knowledge management are critical aspects of providing efficient customer relationship management. ServiceNow is a platform for incident tracking, knowledge management, and project management functions for software projects and has become an indispensable part of many organizations’ workflows to ensure success of the customer and the product. However, extracting valuable insights from the vast amount of data stored in ServiceNow often requires manual effort and building specialized tooling. Users such as support engineers, project managers, and product managers need to be able to ask questions about an incident or a customer, or get answers from knowledge articles in order to provide excellent customer support. Organizations use ServiceNow to manage workflows, such as IT services, ticketing systems, configuration management, and infrastructure changes across IT systems. Generative artificial intelligence (ai) provides the ability to take relevant information from a data source such as ServiceNow and provide well-constructed answers back to the user.
Building a generative ai-based conversational application integrated with relevant data sources requires an enterprise to invest time, money, and people. First, you need to build connectors to the data sources. Next, you need to index this data to make it available for a Retrieval Augmented Generation (RAG) approach, where relevant passages are delivered with high accuracy to a large language model (LLM). To do this, you need to select an index that provides the capabilities to index the content for semantic and vector search, build the infrastructure to retrieve and rank the answers, and build a feature-rich web application. Additionally, you need to hire and staff a large team to build, maintain, and manage such a system.
amazon Q Business is a fully managed generative ai-powered assistant that can answer questions, provide summaries, generate content, and securely complete tasks based on data and information in your enterprise systems. amazon Q Business can help you get fast, relevant answers to pressing questions, solve problems, generate content, and take action using the data and expertise found in your company’s information repositories, code, and enterprise systems (such as ServiceNow, among others). amazon Q provides out-of-the-box native data source connectors that can index content into a built-in retriever and uses an LLM to provide accurate, well-written answers. A data source connector is a component of amazon Q that helps integrate and synchronize data from multiple repositories into one index.
amazon Q Business offers multiple prebuilt connectors to a large number of data sources, including ServiceNow, Atlassian Confluence, amazon Simple Storage Service (amazon S3), Microsoft SharePoint, Salesforce, and many more, and helps you create your generative ai solution with minimal configuration. For a full list of amazon Q business supported data source connectors, see amazon Q Business connectors.
You can use the amazon Q Business ServiceNow Online data source connector to connect to the ServiceNow Online platform and index ServiceNow entities such as knowledge articles, Service Catalogs, and incident entries, along with the metadata and document access control lists (ACLs).
This post shows how to configure the amazon Q ServiceNow connector to index your ServiceNow platform and take advantage of generative ai searches in amazon Q. We use an example of an illustrative ServiceNow platform to discuss technical topics related to AWS services.
Find accurate answers from content in ServiceNow using amazon Q Business
After you integrate amazon Q Business with ServiceNow, you can ask questions from the description of the document, such as:
- How do I troubleshoot an invalid IP configuration on a network router? – This could be derived from an internal knowledge article on that topic
- Which form do I use to request a new email account? – This could be derived from an internal Service Catalog entry
- Is there a previous incident on the topic of resetting cloud root user password? – This could be derived from an internal incident entry
Overview of the ServiceNow connector
A data source connector is a mechanism for integrating and synchronizing data from multiple repositories into one container index. amazon Q Business offers multiple data source connectors that can connect to your data sources and help you create your generative ai solution with minimal configuration.
To crawl and index contents in ServiceNow, we configure amazon Q Business ServiceNow connector as a data source in your amazon Q business application.
When you connect amazon Q Business to a data source and initiate the data synchronization process, amazon Q Business crawls and adds documents from the data source to its index.
Types of documents
Let’s look at what are considered as documents in the context of amazon Q Business ServiceNow connector.
The amazon Q Business ServiceNow connector supports crawling of the following entities in ServiceNow:
- Knowledge articles – Each article is considered a single document
- Knowledge article attachments – Each attachment is considered a single document
- Service Catalog – Each catalog item is considered a single document
- Service Catalog attachments – Each catalog attachment is considered a single document
- Incidents – Each incident is considered a single document
- Incident attachments – Each incident attachment is considered a single document
Although not all metadata is available at the time of writing, you can also configure field mappings. Field mappings allow you to map ServiceNow field names to amazon Q index field names. This includes both default field mappings created automatically by amazon Q, as well as custom field mappings that you can create and edit. Refer to ServiceNow data source connector field mappings documentation for more information.
Authentication
The amazon Q Business ServiceNow connector support two types of authentication methods:
- Basic authentication – ServiceNow host URL, user name, and password
- OAuth 2.0 authentication with Resource Owner Password Flow – ServiceNow host URL, user name, password, client ID, and client secret
Supported ServiceNow versions
ServiceNow usually names platform versions after cities for the added convenience of easily differentiating between versions and associated features. At the time of writing, the following versions are natively supported in the amazon Q Business ServiceNow connector:
- San Diego
- Tokyo
- Rome
- Vancouver
- Others
ACL crawling
To maintain a secure environment, amazon Q Business now requires ACL and identity crawling for all connected data sources. When preparing to connect amazon Q Business applications to AWS IAM Identity Center, you need to enable ACL indexing and identity crawling and re-synchronize your connector.
amazon Q Business enforces data security by supporting the crawling of ACLs and identity information from connected data sources. Indexing documents with ACLs is crucial for maintaining data security, because documents without ACLs are considered public.
If you need to index documents without ACLs, make sure they’re explicitly marked as public in your data source. When connecting a ServiceNow data source, amazon Q Business crawls ACL information, including user and group information, from your ServiceNow instance. With ACL crawling, you can filter chat responses based on the end-user’s document access level, making sure users only see information they’re authorized to access.
In ServiceNow, user IDs are mapped from user emails and exist on files with set access permissions. This mapping allows amazon Q Business to effectively enforce access controls based on the user’s identity and permissions within the ServiceNow environment.
Refer to How amazon Q Business connector crawls ServiceNow ACLs for more information.
Overview of solution
amazon Q is a generative-ai powered assistant that helps customers answer questions, provide summaries, generate content, and complete tasks based on data in their company repository. It also exists as a learning tool for AWS users who want to ask questions about services and best practices in the cloud. You can use the amazon Q connector for ServiceNow online to crawl your ServiceNow domain and index service tickets, guides, and community posts to discover answers for your questions faster.
amazon Q understands and respects your existing identities, roles, and permissions and uses this information to personalize its interactions. If a user doesn’t have permission to access data without amazon Q, they can’t access it using amazon Q either. The following table outlines which documents each user is authorized to access for our use case. For a complete list of ServiceNow roles, refer to documentation. The documents being used in this example are a subset of AWS public documents from re:Post pre-loaded into ServiceNow with access restriction.
# | First Name | Last Name | Document type authorized for access | ServiceNow Roles |
1 | John | Stiles | Knowledge Articles, Service Catalog and Incidents | knowledge, catalog, incident_manager |
2 | Mary | Major | Knowledge Articles and Service Catalog | knowledge, catalog |
3 | Mateo | Jackson | Incidents | incident_manager |
In this post, we show how to use the amazon Q Business ServiceNow connector to index data from your ServiceNow platform for intelligent search.
Prerequisites
For this walkthrough, you should have the following prerequisites:
Configure your ServiceNow connection
In your ServiceNow platform, complete the following steps to create an OAuth2 secret that could be consumed from your amazon Q application:
- In ServiceNow, on the All menu, expand System OAuth and choose Application Registry.
- Choose New.
- Choose Create an OAuth API endpoint for external clients.
- For Name, enter a unique name.
- Fill out the remaining parameters according to your requirements and choose Submit.
Note down the client ID and client secret to use in later steps.
Create an amazon Q Business application
Complete the following steps to create an amazon Q Business application:
- On the amazon Q console, choose Getting started in the navigation pane.
- Under amazon Q Business Pro, choose Q Business to subscribe.
- On the amazon Q Business console, choose Get started.
- On the Applications page, choose Create application.
- On the Create application page, provide your application details.
- Choose Create.
Make sure the amazon Q Business application is connected to IAM Identity Center. For more information, see Setting up amazon Q Business with IAM Identity Center as identity provider.
- On the Select retriever page, select Use native retriever for your retriever and select Starter for the index provisioning type.
- Choose Next.
- On the Connect data sources page, choose Next without connecting to any data source (we do that in the next section).
- On the Add groups and users page, choose Add groups and users.
- Add any groups and users to access the application.
For more details, refer to Adding users and subscriptions to an amazon Q Business application.
- Choose Create application.
Configure the data source using the amazon Q ServiceNow Online connector
Now let’s configure the ServiceNow Online data source connector with the amazon Q application that we created in the previous section.
- On the amazon Q console, navigate to the Applications page and choose the application you just created.
- In the Data sources section, choose Add data source.
- Search for and choose the ServiceNow Online connector.
- Provide the name, ServiceNow host, and version information.
If your ServiceNow version isn’t on the dropdown menu, choose Others.
- Choose Create and add new secret to create a new secret to connect with the ServiceNow platform account.
- Provide the connection information based on the OAuth2 endpoint created in ServiceNow previously, then choose Save.
- Leave the defaults for the VPC and Identity crawler
- For IAM role, choose Create a new service role (Recommended) and keep the default role name.
- Choose entities that you want to bring over from ServiceNow.
This example shows knowledge articles, Service Catalog items, and incidents. The Filter query option helps curate the list of items that you want to bring into amazon Q. When you use a query, you can specify multiple knowledge bases, including private knowledge bases. For more details on how to build ServiceNow filters, refer to Filters. For additional query building resources, see Specifying documents to index with a query.
- For Sync mode, select Full sync.
- For Sync run schedule, choose Run on demand.
- Leave the remaining options as default and choose Add data source.
- When the data source status shows as Active, initiate data synchronization by choosing Sync now.
Wait until the synchronization status changes to Completed before continuing to the next steps.
For information about common issues encountered and related troubleshooting steps, refer to Troubleshooting data source connectors.
Run queries with the amazon Q web experience
Now that the data synchronization is complete, you can start exploring insights from amazon Q. You have three users for testing— John with admin access, Mary with access to knowledge articles and service catalog, and Mateo with access only to incidents. In the following steps, you will sign in as each user and ask various questions to see what responses amazon Q provides based on the permitted document types for their respective groups. You will also test edge cases where users try to access information from restricted sources to validate the access control functionality.
- On the details page of the new amazon Q application, navigate to the Web experience settings tab and choose the link under Deployed URL. This will open a new tab with a preview of the UI and options to customize according to your needs.
- Log in to the application as John Stiles first, using the credentials for the user that you added to the amazon Q application.
- After the login is successful, choose the application that you just created.
- From there, you’ll be redirected to the amazon Q assistant UI, where you can start asking questions using natural language and get insights from your ServiceNow platform.
- Let’s run some queries to see how amazon Q can answer questions related to synchronized data. John has access to all ServiceNow document types. When asked “How do I upgrade my EKS cluster to the latest version”, amazon Q will provide a summary pulling information from the related knowledge article, highlighting the sources at the end of each excerpt.
- Still logged in as John, when asked “What is amazon QLDB?”, amazon Q will provide a summary pulling information from the related ServiceNow incident.
- Sign out as user John. Start a new incognito browser session or use a different browser. Copy the web experience URL and sign in as user Mary. Repeat these steps each time you need to sign in as a different user. Mary only has access to knowledge articles and service catalog with no incident access. When asked “How do I perform vector search with amazon Redshift”, amazon Q will provide a summary pulling information from the related knowledge article, highlighting the source.
- However, when asked “What is amazon QLDB?”, amazon Q responds that it could not find relevant information. This because Mary does not have access to ServiceNow incidents which is the only place where the answer to that question can be found.
- Sign out as user Mary. Start a new incognito browser session or use a different browser. Copy the web experience URL and sign in as user Mateo. Mateo only has access to incidents with no knowledge article or service catalog access. When asked “What is amazon QLDB?”, amazon Q will provide a summary pulling information from the related incident, highlighting the source.
- However, when asked “How do I perform vector search with amazon Redshift?”, amazon Q responds that it could not find relevant information. This because Mateo does not have access to ServiceNow knowledge article which is the only place where the answer to this question can be found.
Try out the assistant with additional queries, such as:
- How do you set up new blackberry device?
- How do I set up S3 object replication?
- How do I resolve empty log issues in CloudWatch?
- How do I troubleshoot 403 Access Denied errors from amazon S3?
Frequently asked questions
In this section, we provide guidance to frequently asked questions.
amazon Q Business is unable to answer your questions
If you get the response “Sorry, I could not find relevant information to complete your request,” this may be due to a few reasons:
- No permissions – ACLs applied to your account don’t allow you to query certain data sources. If this is the case, reach out to your application administrator to make sure your ACLs are configured to access the data sources.
- Email ID doesn’t match user ID – In rare scenarios, a user may have a different email ID associated with amazon Q in IAM Identity Center than what is associated in the ServiceNow user profile. In such cases, make sure the amazon Q user profile is updated to recognize the ServiceNow email ID through the update-user command in the AWS Command Line Interface (AWS CLI) or the related API call.
- Data connector sync failed – Your data connector may have failed to sync information from the source to the amazon Q Business application. Verify the data connector’s sync run schedule and sync history to confirm the sync is successful.
- Empty or private ServiceNow projects – Private or empty projects aren’t crawled during the sync run.
If none of these reasons apply to your use case, open a support case and work with your technical account manager to get this resolved.
How to generate responses from authoritative data sources
If you want amazon Q Business to only generate responses from authoritative data sources, you can configure this using the amazon Q Business application global controls under Admin controls and guardrails.
- Log in to the amazon Q Business console as an amazon Q Business application administrator.
- Navigate to the application and choose Admin controls and guardrails in the navigation pane.
- Choose Edit in the Global controls section to set these options.
For more information, refer to Admin controls and guardrails in amazon Q Business.
amazon Q Business responds using old (stale) data even though your data source is updated
Each amazon Q Business data connector can be configured with a unique sync run schedule frequency. Verifying the sync status and sync schedule frequency for your data connector reveals when the last sync ran successfully. It could be that your data connector’s sync run schedule is either set to sync at a scheduled time of day, week, or month. If it’s set to run on demand, the sync has to be manually invoked. When the sync run is complete, verify the sync history to make sure the run has successfully synced all new issues. Refer to Sync run schedule for more information about each option.
Clean up
To avoid incurring future charges, clean up any resources created as part of this solution. Delete the amazon Q ServiceNow Online connector data source, OAuth API endpoint created in ServiceNow, and the Q Business application. Also, delete the user management setup in IAM Identity Center.
Conclusion
In this post, we discussed how to configure the amazon Q ServiceNow Online connector to crawl and index service tickets, community posts, and knowledge guides. We showed how generative ai-based search in amazon Q enables your business leaders and agents to discover insights from your ServiceNow content quicker. This is all available through a user-friendly interface with amazon Q Business doing the undifferentiated heavy lifting.
To learn more about the amazon Q Business connector for ServiceNow Online, refer to Connecting ServiceNow Online to amazon Q Business.
About the Authors
Prabhakar Chandrasekaran is a Senior Technical Account Manager with AWS Enterprise Support. Prabhakar enjoys helping customers build cutting-edge ai/ML solutions on the cloud. He also works with enterprise customers providing proactive guidance and operational assistance, helping them improve the value of their solutions when using AWS. Prabhakar holds six AWS and seven other professional certifications. With over 20 years of professional experience, Prabhakar was a data engineer and a program leader in the financial services space prior to joining AWS.
Lakshmi Dogiparti is a is a Software Development Engineer at amazon Web Services. She works on the amazon Q and amazon Kendra connector design, development, integration and test operations.
Vijai Gandikota is a Principal Product Manager in the amazon Q and amazon Kendra organization of amazon Web Services. He is responsible for the amazon Q and amazon Kendra connectors, ingestion, security, and other aspects of the amazon Q and amazon Kendra services.