Integrating ServiceNow with Kore.ai Web SDK (v3)

Integrating Kore.ai Web SDK with ServiceNow

Introduction

Kore.ai’s Web SDK (v3) enables seamless chatbot integration with various enterprise applications, including ServiceNow. This integration allows organizations to automate ServiceNow ticketing, fetch incident details, and perform other ServiceNow operations directly within their Kore.ai chatbot.

Prerequisites

Before starting the integration, ensure you have the following:

  • Access to a ServiceNow instance with API permissions.
  • A Kore.ai bot created and configured on the Kore.ai platform.
  • The Kore.ai Web SDK (v3) set up in your web application.
  • API credentials for authentication (OAuth or Basic Auth) in ServiceNow.

Steps for Integration

1. Configuring ServiceNow

Enable API Access

  • Navigate to System Web Services → REST in ServiceNow.
  • Create a new REST API and note the API endpoint.

Generate API Credentials

  • Create a new user with the required permissions to access the ServiceNow API.
  • Generate an API key or use Basic Authentication credentials.

Test API Access

  • Use Postman or cURL to test the ServiceNow API before integrating it with Kore.ai.

2. Setting Up Kore.ai Web SDK

Modify the Web SDK Configuration

  • Locate the kore-config.js file in your Kore.ai Web SDK.
  • Add ServiceNow API details under the integration section.

Create a Custom Webhook for ServiceNow

  • Navigate to the Kore.ai Bot Builder.
  • Go to Dialog Tasks → Service Nodes.
  • Configure a Service Node to make API calls to the ServiceNow endpoint.

Script the Integration Logic

  • Modify the SDK’s webhook function to handle responses from ServiceNow.

3. Embedding Kore.ai Web SDK in ServiceNow

Create a New Widget

  • Go to the ServiceNow Developer Portal and open the Widget Editor.

  • Create a new widget and copy the Web SDK embed script from the Web/Mobile channel in Kore.ai.

  • Paste the script in the Client Script editor or within the HTML Template of the widget.
Example Script:
(function () {
 var script = document.createElement('script');
 script.src = 'https://cdn.jsdelivr.net/npm/kore-web-sdk@11.11.0/dist/umd/kore-web-sdk-umd-chat.min.js';
 script.onload = function () {
   KoreChatSDK.chatConfig.botOptions.API_KEY_CONFIG.KEY = '<your_api_key>';
   var chatWindow = new KoreChatSDK.chatWindow();
   chatWindow.show(KoreChatSDK.chatConfig);
 };
 document.head.appendChild(script);
})();

Configure API Key or JWT

  • Copy the API Key from the embed script in Kore.ai’s Web/Mobile channel and update the script above.


  • Alternatively, configure your own JWT service instead of using the API Key.

Add the Widget to the Service Portal

4. Testing the Integration

  • Verify API Calls: Ensure that the Kore.ai chatbot fetches and updates ServiceNow records correctly.
  • Debug Issues: Use browser console logs and Kore.ai’s debugger for troubleshooting.
  • Deploy & Monitor: Once tested, deploy the chatbot and monitor interactions using Kore.ai’s analytics.

Common Issues & Troubleshooting

Issue Possible Solution
Authentication errors Ensure API credentials are correct and have the necessary permissions.
API request failures Verify the API endpoint and request format.
Data not updating Check ServiceNow logs and API response codes.

Conclusion

Integrating ServiceNow with Kore.ai Web SDK (v3) allows businesses to automate IT service management and improve user experience. By following the steps above, you can ensure a seamless connection between Kore.ai and ServiceNow.

If you have any questions or face any challenges, feel free to share them in the **[Kore.ai Community]

Additional Information : (web-kore-sdk/docs/integrations/servicenow at v3/dev · Koredotcom/web-kore-sdk · GitHub)**!