Configuring External Search Source in Employee Center

MichaelCreatura
Tera Guru

 

Hello,


Following this article - https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/build/service-portal/task/search-s... I have created the below Search Source to lookup Knowledge Articles in another instance of ServiceNow we use. 

 

MichaelCreatura_0-1681912536332.png


Below is the content in the article that I have pasted into the 'data fetch script field', the highlighted I will change the name of the instance I would like to refer to.

 

MichaelCreatura_1-1681912622814.png

 

Do I need to add anything else to the data fetch script? I have been given a username and password service account to access but I am unsure where this goes. 

This is what I have in the 'facet generation script' field:

MichaelCreatura_0-1681913065641.png

 

Thank you for any assistance! 

1 ACCEPTED SOLUTION

does your user have sufficient roles to read those article in the question now. So can you confirm what all your user has (in external system)?

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

View solution in original post

13 REPLIES 13

Yes it should work for you.

 

and for warning you can also use global.JSON() if its coped application 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Hello, 

 

For some reason, the External Search Source is not working. 

 

Looking at the below I've added our service account details. Replacing "search_user" with "USERNAME" and "search" with "PASSWORD" and I copied the URL directly from the ServiceNow guide only amending the instance name. 

 

MichaelCreatura_0-1682072868867.png

Does the account need any specific access requirements, licenses etc? This is just a standard user account with access to the Service Portal only. This account is also in the sys_users table in the external instance of ServiceNow that we are attempting to search, it does NOT exist in the instance where we are configuring the search source - should it be? 

Also is the URL correct to reference all knowledge bases in the external instance of ServiceNow which we are attempting to search? 

User you are using should only be present in external instance from where KB article needs to be shared.

But try adding roles like rest_service, web_service_admin , soap_service role to that user to allow read access via this method. You may also want to check read ACLs associated with KB. but try giving roles one by one and see . 

Also share the what are you getting on screen when this call is made.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

If I go to the following URL in a new tab and enter the given credentials (which has no roles):
https://instancename.service-now.com/api/now/table/kb_knowledge?sysparm_query=GOTO123TEXTQUERY321%3D

I get the following error:

MichaelCreatura_0-1682325822471.png


It is probably worth noting on 'Employee Center' I have disabled AI Search and removed the following:

MichaelCreatura_1-1682325901669.png

and my added search source is here:

 

MichaelCreatura_2-1682325947299.png

 

I see you havent added any search text in URL which you are hitting append your query with some text.

Example:  sysparm_query=GOTO123TEXTQUERY321%3DSAP

here SAP is the keyword we are searching in KB.

if this didnt work then please add roles to user (said in my previous comment ) and try again

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure