After you define the basic settings and authentication for an alert task, you are ready to start configuring the request object that asks for data from your Bot website or web application.
The options to define for the request object are based on the Connection Type specified for the task. One of:
- Webhook - The web application pushes data for the alert task to Kore.
- RSS - The web services sends data to Kore with polling.
- Webservice - The web service sends data to Kore when polled by Kore.
This topic describes how to define the request object for a task with the Connection Type specified as Webhook.
What Do I Need to Do?
For a task with the Connection Type specified as Webhook, you will need to define:
- The web service Content Type exchanged between Kore and your web application.
- The keys expected in the response payload to your request.
- The alert task path in the response payload.
The following section describes how to configure an alert task using a webhook. To learn how to configure the request object for an alert task with a Connection Type set to webservice or RSS, see Configuring the Alert Task Request Object - Webservice or Configuring the Alert Task Request Object - RSS.
Webhook Alert Task Request Object Configuration
This section describes how to configure the request object for an alert task where the Connection Type is defined as Webhook. The Connection Type determines the parameters displayed in the Configure the Alert Task Request dialog. The following illustration is an example of a configuration for an alert task with the Connection Type defined as Webhook.
To get started for a webhook configuration of the task request object, you must define the Content Type exchanged between Kore and your Bot website or application, and the key/value pairs expected in the task payload response.
In the Content Type field, select one of the following supported data types for your sample response data.
- RSS - Rich Site Summary, or Really Simple Syndication, is a family of standardized formats used to publish frequently updated information such as blog entries, news headlines, audio, and video.
- XML - Extensible Markup Language is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable. Oftentimes, Web Services use XML schemas to process the XML data.
- URL Encoded JSON - URLs using JSON encoding for reserved characters.
- CSV - Comma-separated value lists.
- Text - Text-based key value pairs.
- Twitter Encoded JSON - URLs for Twitter using JSON encoding for reserved characters.
Adding Sample Response Data
In the Sample Response Data field, enter or paste examples of the key value pairs that you expect to receive in the task payload. When you define the task response object, the keys specified in the Sample Response Data field are available as drop-down choices for handling the data to display to the end-user.
To format the view of the response as a JSON structure with indentation as shown in the previous illustration, click the Formatted icon.
To format the view of the response in serialized compact form as shown in the following illustration, click the Unformatted icon.
Defining the Alerts Path
The last field, Alerts Path, is an optional field that you can specify if the Sample Response Data field contains a hierarchical tree structure of data and you only want a specific hierarchical level submitted for the task request object.
For example, in the following sample response data, you may only want to expose the user data in the alert task response by defining user in the Alerts Path field.
"displayName": "John Doe",
After you enter the sample response data, click Continue, or Save when editing task to move to the Response Object page. For more information, see Configuring the Alert Task Response Object.