ServiceNow : Custom App

Objective

This guide will help you to quickly connect to ServiceNow and create various methods to pull the data. The purpose is to demonstrate how easy it is to integrate an external database to the VoiceWorx platform.

Pre-requisites

  1. Create ServiceNow account

You should have an ServiceNow account, at least one instance and application registered in the ServiceNow. You can follow this document for complete guidance.

  1. Configure Integration with VoiceWorx

Once the ServiceNow account is ready, the next step is to configure integration with the VoiceWorx portal. Follow this guide to complete the configurations.

Steps

To proceed with these steps, you should have all the pre-requisites satisfied. If you are missing something, please go back and make sure you satisfy all of them.

Once done, you are ready to get started using VoiceWorx platform with ServiceNow.

Step 1 Connect to ServiceNow

Login to the VoiceWorx portal at https://portal.voiceworx.ai

To Configure SeviceNow, browse to: Integration > Connect System > Connect External System in the VoiceWorx platform and select options as shown below. Make sure that Prerequisite#2 has been fulfilled by your organization administrator before proceeding with this.

On Clicking connect system, the user will be prompted to allow access to the developer instance in SeviceNow.

Enter the login credentials and click “Login”.

  1. After a successful login to ServiceNow, SmartOffice would request to connect with your ServiceNow instance. Click the “Allow” button. Connection of VoiceWorx portal with ServiceNow will be successful after the access has been allowed as shown below:

.

If you face issues in this connection, you might want to go and visit ServiceNow: Connect to VoiceWorx document guide.

  1. Your ServiceNow integration is now available for use in VoiceWorx portal.

Step 2 Create an App for ServiceNow

To create an app, browse to Custom Apps > Manage Apps and click on Create New Custom App button as shown below.

You should see a small popup as shown below.

Click on save, this will create an app and you should see a screen as shown below,

This shows that an app is successfully created, and you have various options like setup data sources. This is explained in next step.

Step 3 Create a Data Source

To follow this step, make sure you have completed above Step 2. If not please go back and do it.

A Data Source connects the app with the ServiceNow integration we did in Step #1. Once you have an app created, you can go o Data Sources by either clicking on “Data Source” button or by clicking on “Data Sources” tab.

Now you should see screen as shown below.

To create a data source, click on ‘Create New Data Source’ button and you should see a popup screen as shown below

Give a name of your choice and make sure you select the ServiceNow integration that you have created in Step 1 and click on Save. Now you should see a Data Source created as shown in below screenshot.

once a data source is created, you are ready to start creating various methods.

Step 4 Create Methods to fetch the data from ServiceNow

To use this step, make sure you have completed previous step. If not go back and complete it.

Methods allows you to fetch data from the ServiceNow table. To access the methods, click on the “Methods” tab which is next to the “Data Sources” tab.

As of the publication date of this document, the VoiceWorx platform supports following DynamoDB methods,

  1. Create Ticket

  2. Create Ticket by Priority

  3. Execute Query

  4. Get All Tickets

  5. Get Open Tickets

  6. Get Tickets by Assignee

  7. Get Tickets by Priority

  8. Get Tickets by Requester

  9. Get Tickets by Status

  10. Get Tickets by Subject

  11. Get Tickets Count by Assignee

  12. Get Tickets Count by Priority

  13. Get Tickets Count by Requester

  14. Get Tickets Count by Status

Depending on requirement, you will have to use an appropriate method, this document will explain each of these methods with an example.

Let’s start with a use case.

Scenario/ Use Case (ServiceNow Assistant):

You have a ServiceNow to organize ticketing in your organization.

You want to create a ticket for an issue you are facing. For this, you can use CreateTicket method as explained below.

Method: CreateTicket

This method requires three parameters as explained below.

Parameters:

Other than these two parameters, you need to provide the following standard inputs

Method: GetOpenTickets

Create new method

Parameters: Not required

Sample Response:

Method: GetTicketsByStatus

Parameters:

Method: GetTicketsByRequester

Parameters:

Sample Response:

Similarly, all methods available for ServiceNow can be customized.

Create Intents:

The next step of app building is creating corresponding Intents for the above methods.

CreateTicketIntent

Name: CreateTicketIntent

Intent Type: Search

Intent Action: Execute Method

Data Source: ServiceNowDS

Data Source Method: CreateTicket

  1. GetTicketsByAssignee

Name: GetTicketsByAssignee

Intent Type: Search

Intent Action: Execute Method

Data Source: ServiceNowDS

Data Source Method: GetTicketsByAssignee

Now, repeat the same process for other remaining methods.

Create Slots

You have to create slots corresponding to the parameters in the above created method. For example, for method GetTicketsByAssignee, Assignee was the parameter used. Now, create Assignee as the Slot for GetTicketsByAssignee.

Details:

Name: Assignee

Slot Order: 0

Reprompt Message: Whose tickets shall I search?

Type: Full Name

Custom App: ServiceNow Demo

Intent: GetTicketsByAssignee

Create Utterances:

Utterances are used for invocating the intent. You have to create utterances corresponding to each intent. For example, let’s create utterance for CreateTicketIntent.

Go to Utterances tab, select CreateTicketIntent in the dropdown and click on ‘Create New Utterance’.

You can also create multiple utterance for an intent. You can also opt for the Bulk Edit feature to create multiple utterances at one go.

Again, you have to create utterances for every intent.

Create Inputs

Now, create inputs corresponding to the intents created in above steps. One input corresponding to one input has to be created.

Details:

Name: GetTicketsByRequester

Custom Skill: ServiceNow Demo

Custom Intent: GetTicketsByRequesterIntent (any intent you’ve created)

Data Source: ServiceNowDS

Data Source Method: GetTicketsByRequester

Publish App

The final step is to publish app to your desired channel. Let’s publish the app to Alexa for this demo.

Select Publish tab and click on Add App Publishing.

After the setup is done, Publish the App to Alexa.

Select the LWA account and click on publish.

You shall get the success message and you can go to your Alexa developer account and test the app by clicking on Go to Alexa Skill. Make sure to log in with the same LWA credential to which the app has been published.

Few Snaps of ServiceNow Assistant Test on Alexa Developer Console.

Last updated