> For the complete documentation index, see [llms.txt](https://docs.hala.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hala.ai/how-to/create-skill-for-servicenow.md).

# Create skill for ServiceNow

Last Updated: 25.10.2019

You can integrate Hala with ServiceNow for creating new incidents in ServiceNow or for processing the new incidents that end-users create in ServiceNow (with this approach you can use AI technologies for the automation of the incidents in ServiceNow).

**Step 1.** Go to the `Integration` section on the [Hala Platform](https://platform.hala.ai/), and add the new integration for ServiceNow. Provide the values and `Save` your integration.

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTuAwoIhCklXqV2A5p%2FScreen%20Shot%202019-10-18%20at%203.17.02%20PM.png?alt=media\&token=52a845db-aa6a-4d94-ae5f-d5cf504284f8)

**Step 2.** Go to the `Actions` section on the [Hala Platform](https://platform.hala.ai/),  and create a new `action`.  Provide the name for the action and select the integration.&#x20;

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTuHA5bLQ8PIvRlKtf%2FScreen%20Shot%202019-10-18%20at%203.22.48%20PM.png?alt=media\&token=cbfd3945-61e1-4bc9-84d6-276d15d700fd)

**Step 3.** Make the configuration of your API service. You can read more information about the ServiceNow API documentation [here](https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/integrate/inbound_rest/task/t_GetStartedAccessExplorer.html). After filling the values, please save your changes.

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTuMBpwrPASfQb8bbY%2FScreen%20Shot%202019-10-18%20at%203.42.46%20PM.png?alt=media\&token=89bf264c-af49-47fb-a2c1-5d6fb879dd04)

**Step 4.** You have set up integration and action. Now, you need to create an intent to recognize the user input about creation of new incident. Go to the `Intents` section on the [Hala Platform](https://platform.hala.ai/) and press `New Utterance`

**Step 5.** To change the default name of the intent, click on icon pencil next to the default value, or you can click on the default value, and then you will be able to modify it. <img src="https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrOJiy_3_d7-vnIotZh%2F-LrOJszLxa65RtZ1W2Ew%2Fdoc-111.png?alt=media&amp;token=5460e588-e231-4f60-8a85-0e45477a3a57" alt="" data-size="original">&#x20;

**Step 6.** Specify the name of the intent and press Enter <img src="https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTv8DXsVCWu31XSc8_%2FScreen%20Shot%202019-10-18%20at%203.51.39%20PM.png?alt=media&amp;token=e030019c-8777-4b02-9c7b-9960e6ab3a94" alt="" data-size="original">&#x20;

**Step 7.** Now you need to provide training examples (at least five examples).

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTvGO-BxaG5CEUP6J4%2Fintent.png?alt=media\&token=92b7cd78-18ef-4504-817b-e72241cfdab7)

**Step 8.** `Save` your changes and `train model`

**Step 9.** Go to the `Skill Kit` section on the [Hala Platform](https://platform.hala.ai/) and create a skill by pressing the button `Create skill`

**Step 10.** Provide the name of the skill, description, and tags (last two is optional). Press next for creating the dialog flow.&#x20;

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTvZiyRlKYVv5xn1gS%2FScreen%20Shot%202019-10-18%20at%203.43.26%20PM.png?alt=media\&token=0a24b984-d469-4707-8da7-d6c7885dc16d)

**Step 11.** You will be promoted to the interface for creation dialog flow. Create the first root node by pressing the button `Add new`

**Step 12.** Open the created dialog node and fill it.&#x20;

* Field Name - you can enter any value, for example "Create new incident"
* Conditions - here you need to specify created intent `intent.sys_createNewIncident`

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTvfPDk32G-cMUuhDr%2FScreen%20Shot%202019-10-18%20at%203.43.45%20PM.png?alt=media\&token=6a3f7386-e26f-4ef6-982b-3ba06c98db03)

* Actions - skip this section
* Context - skip this section
* Output - provide the response to the user

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTvrnpn6u6ixZUkkdi%2FScreen%20Shot%202019-10-18%20at%203.43.55%20PM.png?alt=media\&token=e0a4e25a-c0bc-4ad3-8731-680e77160a76)

**Step 13.** Create a child node to process the user input.

**Step 14.** Open the child node and fill it.&#x20;

* Field Name - you can enter any value, for example "Get problem description"
* Conditions - here you need to specify the condition `input.text`

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTw8wngIxemCOxoiao%2FScreen%20Shot%202019-10-18%20at%203.44.05%20PM.png?alt=media\&token=3c266bbe-0c55-4eb3-a7f3-05a5b94111c1)

* Actions - When we got the needed information from the end-user, we can send the API request to the ServiceNow. Add the Action that we have created previously. When you add the action, you would need to specify the context variable where the response from the ServiceNow will be stored, for example, `context.serviceNow`

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTtpxTGIhJb4ZbAtOW%2F-LrTwUy9i5v7g2FgzcRI%2FScreen%20Shot%202019-10-18%20at%203.44.22%20PM.png?alt=media\&token=d1e3f982-1ca8-4ad1-9ec2-3ee516cdd171)

* Context - We need to save the description of the problem into the context variable `description`

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTxA4WiwMo98UPMbrG%2F-LrTxJlwQLb-Ipv8xIl4%2FScreen%20Shot%202019-10-18%20at%203.44.30%20PM.png?alt=media\&token=20b96340-d650-41c3-b958-aa538c68b4ec)

* Output - In output you can write something like this "Please wait, I am creating a new incident in ServiceNow."

**Step 15.** Create a new child node to process the API response from the ServiceNow. &#x20;

Open the created node and fill it:

* Field Name - you can enter any value, for example "Create incident in ServiceNow"
* Conditions - Specify the context variable that was created for the Action Response on previous steps: `context.serviceNow`

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTxA4WiwMo98UPMbrG%2F-LrTxouFXlxgLgbNmKXt%2FScreen%20Shot%202019-10-18%20at%203.44.44%20PM.png?alt=media\&token=2be3dfa6-4f60-4474-8976-e1ea117cc039)

* Actions - skip this section
* Context - skip this section
* Output - For output you can use the next text:&#x20;

```
Answer from Service now {{context.serviceNow.result.number}}
```

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTxA4WiwMo98UPMbrG%2F-LrTxzT_AfhPuqPpxZlD%2FScreen%20Shot%202019-10-18%20at%203.45.35%20PM.png?alt=media\&token=6b7987ae-20f2-4792-97ec-38aea8d575de)

**Step 16.** Save the changes by pressing button "Save Changes". You dialog tree should look like this:

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTxA4WiwMo98UPMbrG%2F-LrTyKbMcazHTxhMqkXx%2FScreen%20Shot%202019-10-18%20at%204.05.29%20PM.png?alt=media\&token=5f085428-56f2-4d6c-bd61-020ee863af23)

{% hint style="warning" %}
Remember to save your changes.
{% endhint %}

**Step 17.** Test the results. Go to the [Hala Web Chat](https://chat.hala.ai/) by using the next link <https://chat.hala.ai/> and type the first message in the chat. You can type one of the trained phrases, or you can use new phrases that weren't specified in intent training.

![](https://3295177523-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lit4AWYuRQwOi31ApzH%2F-LrTxA4WiwMo98UPMbrG%2F-LrTyw-pqgqYbL8NKb4j%2FScreen%20Shot%202019-10-18%20at%204.08.09%20PM.png?alt=media\&token=bbd218c8-f668-4ead-bbf8-0c63045b2f71)

{% hint style="success" %}
Congratulations! You have created the skill and tested it.
{% endhint %}
