Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. On the Connected Apps page, click Create Operation as shown below.



    The Create Operation page appears as shown below.
  2. In the Operation Details tab, enter the Operation Name.
  3. The system automatically displays the default Skill Domain of the tenant. 
  4. Uniform Resource Identifier (URI), is used to refer to the information resource. Enter the URI.
  5. Select the operation Method. It uses an API request chaining framework for bots to push or request data from your websites, systems, and web applications using Webservices.
    The following operation methods are available:
    • Get: To retrieve data
    • Post: To create data
    • Put: To edit the data
    • Delete: To delete the data
    • Patch:  To make partial updates to the resource
  6. The system automatically displays the Supported Operation as invoke REST API.
  7. Specify the operation Timeout (in milliseconds), the amount of time to wait for a web service response when invoking an outbound request.  The default value is 10000 milliseconds, 10 seconds, and the maximum allowed value is 3 mins, 180000 milliseconds.
  8. Click Next to specify the Request Configuration details.
    The Request Configuration page Configuration page appears as shown below.
  9. Path Parameters: The path parameter is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL. Example, http://myserver.com/some-path/{parameter1}/path-continued/{parameter2}. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values. 
    1. Enter the External Field and the Value.
  10. Query Parameters: The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (?) after the resource name. Example, https://myserver.com/resource-name?param1=value1&param2=value2. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values. 
    1. Enter the External Field and the Value.
  11. Headers: Headers are mostly classified as request headers. You will have to set the request headers when you are sending the request. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values. 
    1. Enter the External Field and the Value.
      The following sample headers are encountered the most.
      • Authorization: Includes credentials containing the authentication information of the client for the resource being requested. 
      • Accept-Charset: This is a header that is set with the request and tells the server about which character sets are acceptable by the client. 

      • Content-Type: Indicates the media type (text/HTML, text/JSON, XML/custom or multipart/form-data) of the response sent to the client by the server, this will help the client in processing the response body correctly.

        Info
        • Use multipart/form-data as Content-Type to send an attachment file to the client-server.
        • If you wish to overwrite the Global Header configurations defined at the Instance level, select Ignore Global Headers. The system will then consider the configurations defined at the Operation level. Similarly, you may overwrite the Path Parameter and Query parameter as well.


  12. Outbound Payload: Request payload needs to be passed to complete the request. Form Data is the default encoding a web form uses to transfer data. The text box area accepts simple key-value pairs and complex/nested JSON. 

  13. To send an attachment as Outbound payload, use Attachment Mapping. Enter a External Field and select an attribute with datatype File as Value.



  14. Click Next to create the Response Configuration.

...

Info
  • When an Operation is added to the Conversation Flow of a skill, Local attributes created in the Operations can be used to build the skill. A local attribute can be referred to as @{local.<Attribute identifier>}
  • When referring Use JSON type attributes to store JSON data received from Integration. To refer to a list/array of values in a JSON path, use datatype as the LIST type attribute.

Error Handling

This section is used to define the behavior and bot response to the user when the operation execution results in an error. You can create multiple rules handling errors from web service operations.

...

  1. On the Tenant menu, click Integrations.
  2. All the Connected Apps are listed as shown below where the option to edit is available.
  3. Click on the Edit button . The Connected App page appears. 
  4. Here we can edit the details like Integration Type, Default Instance, Login operation, and Logout Operation.
    The Login and Logout operations are useful when a functionality/operation requires a pre-login and post-logout condition. 
    For example, the login and logout operation can be used for session control. When executing an operation through a skill the login operation would generate a token and reserve the session. Upon completion of the task, the log-out operation will release the session. This ensures optimal utilization of sessions allocated to the API user.


  5. Once the required operations are selected, click on Update button to save the changes.


...