Configuring the Action Task Request - SOAP

After you describe the Bot action task, and then define authentication requirements, you are ready to start configuring the request object that asks for data from your Bot website, system, or web application for the task. This topic describes how to configure the request object for an action task with the Sub Type set to SOAP.

To define a task web service request object with Sub Type set to REST, see Configuring the Action Task Request - REST

What Do I Need to Do?

For an action task request in Kore and the Sub Type set to SOAP, you will need to define:

  • Define the WSDL URL for the SOAP request to get the operations that are available.
  • Select predefined or create custom alert task input fields.
  • Provide a sample response payload for your SOAP request.

The following illustration is an example of the Configure the Action Task Request page for a new task with the Sub Type set to SOAP defined in the General Information section.

To being the request object action task configuration for a SOAP request, enter the URL for your SOAP WSDL in the WSDL URL field, for example

 http://webservicex.net/globalweather.asmx?wsdl

Click Get WSDL Description to display a list of operations that are defined in the WSDL at the URL you specified.

In the Action column in the Available Operations section, click Use for the SOAP request that you want to use for your action task. Kore will automatically populate one or more Action Task Fields if necessary for user input as shown in the following image.

By default, the alert fields are defined as Field Type set to Textbox for user input, however, you can customize the fields as needed in the following section. 

Customizing SOAP Action Task Fields

You can customize the default input fields provided by Kore when you select Use for an Available Operation. To modify an action task field, in the first Action column in the Action Task Fields section, click Edit. The Set up Action Task Field dialog is displayed as shown in the following illustration.

Specify the values for the parameters in the Set up Action Task Field dialog as described in the following table.

Parameter NameDescription
Type of Action Task field The type of action task field used in the Bot task to execute. One of:
  • Query Field - This field type is used as part of a URL path or query within a URL. For example:

    http://app.asana.com/api/workspaces/{queryfield1}/project/{queryfield2}?userId={queryfield3}

  • Payload Field - Use this field type to represent payload data for an HTTP method, such as POST, PUT, GET, DELETE, and so forth. For example:

    {

    "taskId" : "{payloadfield2}"

    "message" : "{payloadfield1}"

    }

Field Name The title of the task input field displayed in the end-user interface, for example, User name to follow, as shown in the following illustration.

Help Hint The help text displayed below the task setting title to describe the task, for example, Enter username/screen name of the user to follow on twitter as shown in the previous illustration.
Field Key The Bot key that represents the end-user input value that you want to collect, for example, workspace.
Field Type Specifies the type of task input field displayed in the end-user interface to collect user input for the request object to assign to the Field Key value. One of:
  • Date - Displays the Format field where you can select the date format syntax for the end-user to define when the task is configured for their account. In the Select Date Format drop-down list, select one of the following:
    • dd-MM-YYYY - For example, 16-05-1999
    • MM-dd-YYYY - For example, 05-16-1999
    • dd-MM-YY - For example, 16-05-99
    • YYYY-MM-dd - For example, 1999-05-16
  • URL - Displays a text box for the end-user to enter a URL including field validation for a correct URL syntax. In the Placeholder field, enter the help hint displayed in the text box, for example, Enter the URL for the website here.
  • Textbox - Displays a text box for the end-user to enter text as the task input field, typically just a few words. In the Placeholder field, enter the help hint displayed in the text field, for example, Type in the name you want to embroider.
  • Label - Displays a static text label for the end-user when the task is configured in their account, for example, That's all there is to it!
  • Static Dropdown - Displays a drop-down list of choices to the end-user. Click Add Option to begin adding the list of items to display to the end-user with the following parameters:
    • Option Name - The name of the option displayed to the end-user.
    • Option Value - The value the represents the Option Name returned to the application.
    • Searchable - Select to enable dynamic search and display as the end-user enters text in this field, or if no matches, allow free-form entry.
    Click Save. To add additional items, click Add Option again.
  • Dynamic Dropdown - Displays a drop-down list dynamically populated at runtime based on the response from a URL for your Bot, for example, a list of projects for a JIRA task notification. Define the following properties for a dynamically populated dropdown.
    • Endpoint URL - The Bot endpoint URL, for example, https://app.asana.com/api/1.0/workspaces.
    • Endpoint Content Type - The content type expected from the specified endpoint URL. One of: JSON, RSS, XML, URL Encoded JSON, CCV, Text, or Twitter Encoded JSON.
    • Endpoint Method - One of:
      • GET - Specifies an HTTP Request GET method for the task field.
      • POST - Specifies an HTTP Request POST method for the task field.
    • Response Path - The path in the response that contains the desired drop-down list values, for example, data.
    • Label Key - The key for the label of the drop-down option, for example, name.
    • Option Value Key - The key for the value of the drop-down option, for example, id.
    • Searchable - Select to enable dynamic search and display as the end-user enters text in this field, or if no matches, allow free-form entry.
  • Directory - Displays a file directory list dynamically populated at runtime based on the response from a URL for your Bot, for example, a directory of Google Drive files. Define the following properties for a dynamically populated directory list.
    • Endpoint URL - The Bot endpoint URL, for example, https://www.googleapis.com/drive/ve/files.
    • Endpoint Content Type - The content type expected from the specified endpoint URL. One of: JSON, RSS, XML, URL Encoded JSON, CCV, Text, or Twitter Encoded JSON.
    • Endpoint Method - One of:
      • GET - Specifies an HTTP Request GET method for the task field.
      • POST - Specifies an HTTP Request POST method for the task field.
    • Response Path - The path in the response that contains the desired drop-down list values, for example, data.
    • Label Key - The key for the label of the drop-down option, for example, name.
    • Option Value Key - The key for the value of the drop-down option, for example, id.
  • Dynamic Checkbox - Displays a list of dynamically populated selectable checkboxes at runtime based on the response from a URL for your Bot, for example, a list of projects for a JIRA task notification. Define the following properties for a dynamically populated list of checkboxes.
    • Endpoint URL - The Bot endpoint URL, for example, https://app.asana.com/api/1.0/workspaces.
    • Endpoint Content Type - The content type expected from the specified endpoint URL. One of: JSON, RSS, XML, URL Encoded JSON, CCV, Text, or Twitter Encoded JSON.
    • Endpoint Method - One of:
      • GET - Specifies an HTTP Request GET method for the task field.
      • POST - Specifies an HTTP Request POST method for the task field.
    • Response Path - The path in the response that contains the desired list of checkbox values, for example, data.
    • Label Key - The key for the label of the checkbox option, for example, name.
    • Option Value Key - The key for the value of the checkbox option, for example, id.
  • Textarea - Displays a text area box for the end-user to enter text as the task input, typically for several sentences. In the Placeholder field, enter the help hint displayed inside the text area.
  • Checkbox - Displays a list of choices with selectable checkboxes to the end-user. Click Add Option to begin adding the list of items to display to the end-user with the following parameters:
    • Option Name - The name of the option displayed to the end-user.
    • Option Value - The value the represents the Option Name returned to the application.
    • Searchable - Select to enable dynamic search and display as the end-user enters text in this field, or if no matches, allow free-form entry.
    Click Save. To add additional items, click Add Option again.
  • Password - Displays a mandatory password input field for the end-user when the task is configured for their account.
  • Type Ahead - Displays a dynamically populated drop-down list of choices to the end-user at runtime when the user enters three or more characters that match the search results based on the response from the URL defined for the task. For example, a list of projects for a JIRA task notification message. Define the following properties for a dynamically populated drop-down.
    • Endpoint URL - The Bot endpoint URL, for example, https://app.asana.com/api/1.0/workspaces.
    • Endpoint Content Type - The content type expected from the specified endpoint URL. One of: JSON, RSS, XML, URL Encoded JSON, CSV, Text, or Twitter Encoded JSON.
    • Endpoint Method - One of:
      • GET - Specifies an HTTP Request GET method for the task field.
      • POST - Specifies an HTTP Request POST method for the task field.
    • Response Path - The path in the response that contains the desired drop-down list values, for example, data.
    • Label Key - The key for the label of the drop-down option, for example, name.
    • Option Value Key - The key for the value of the drop-down option, for example, id.
    • Editable - Enables the end-user to enter text free-from in the field as an option when type-ahead search results do not match.
  • Email - Displays a text box for the end-user to input an email address. In the Placeholder field, enter the help hint to display to the end-user inside the text box.
  • Date & Time - Displays a text box for the end-user to input a date with time. In the Format field, enter the expected date or time format to display to the end-user in the date text box. In the Select Date Format drop-down list, select the date with time format.
  • Time Zone - Displays a drop-down list of time zones based on the operating system settings.
  • Location - Displays a text box for the end-user to enter a geographical location, for example, Orlando, FL, or 32801.
  • Search Control - Displays a text box for the end-user to enter one or more search terms with dynamically populated search results as the user types. Define the following properties for a dynamically populated dropdown.
    • Endpoint URL - The Bot endpoint URL, for example, https://app.asana.com/api/1.0/workspaces.
    • Endpoint Content Type - The content type expected from the specified endpoint URL. One of: JSON, RSS, XML, URL Encoded JSON, CSV, Text, or Twitter Encoded JSON.
    • Endpoint Method - One of:
      • GET - Specifies an HTTP Request GET method for the task field.
      • POST - Specifies an HTTP Request POST method for the task field.
    • Response Path - The path in the response that contains the desired drop-down list values, for example, data.
    • Label Key - The key for the label of the drop-down option, for example, name.
    • Option Value Key - The key for the value of the drop-down option, for example, id.
  • Nested Form - Displays end-user input fields in a nested format below the parent input field. Specify the following fields for a nested form input field:
    • Array Element Type - Select the data type of the parent input form element.
    • Add Nested Form Field - Click to add one or more nested form fields.
  • File Upload - Displays end-user control to search for, and select a file to upload.
Data Type  The end-user input data type expected. One of:
  • String - The end-user can input any sequence of numbers, letters, or special characters.
  • Number - The end-user can only input digits 0-9. No special characters are allowed.
  • Boolean - The end-user can only input a Boolean value of true or false.
  • Object - Data from a Bot can be received as JSON objects, for example, as location details defined as:

     "location" : {

                   "lat" : 17.4374614,

                   "lng" : 78.4482878

                }

    where you can refer to the properties in a request chain or action request as location.lat, and location.lng.
  • Array - The end-user can pass a comma-separated list of values to the Bot. For example, in Google Calendar, multiple attendees with data can be passed as:
    "attendees": ["user1", "user2", "user3"]
    When selected, specify the Type for the end-user input as one of:
    • String
    • Number
    • Boolean
    • Object
    • Array
    • Date
  • Date - The end-user can enter or use a date picker control to provide a calendar date value.
Is Multi Select Select to enable this control to allow end-user input of more than one selection or entry.
Visibility Specify if the task input field should be visible or hidden from the end-user. If the field must be hidden, select Hidden. The default is Static (visible).
Depends On Defines a dependent task input field, for example, a project field may be dependent on a workspace field.
Mandatory Select if the end-user must define this setting to save the task settings configuration.

Click Add & Continue to save the task field for the task request and create another task field, or click Add & Exit to save the task field for the task request and close the dialog.

For multiple task input fields, you should order the task fields in the order the end-user should input values as shown in the following illustration.

For example, your end-user may need to select dates for report, and then choose a line item from that report. Use the Move Up  icon and the Move Down  icon in the Actions column in the Task Field(s) section to reorder the task fields if needed.

Click the Edit  icon to modify the settings for an existing task field.

Click the Delete  icon to delete an existing task field. 

Warning: No confirmation dialog is displayed when deleting a task field. If you click Continue or Save, the delete task is permanent and cannot be undone.

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 payload for your task responses. When you define the sample response, the keys specified in the Sample Response Data text area are available as drop-down choices for handling the data in the task response from the Bot.

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.

Next Steps

After you finish defining your task request object, click Continue to display the Configure Response Object for your Task dialog. For more information, see Configuring the Action Task Response.

Comments