SDK

Customers with dedicated Koji instances can develop new integration scenarios using the SDK, a software development kit. This page helps you understand which tools you can use and where to start.

 

Key points

There are a few powerful tools and approaches that help you create new integration scenarios:

  • Workflow node for working with APIs;

  • Workflow node for implementing Python functions;

  • Python callbacks that Koji sends to users as a response.

Let’s dive into these approaches to understand when and how to use them.

Workflow

Workflow is a dialog model that allows users to go through a dialog using the predefined scheme. This is a tool that helps you design conversations.

With workflows you can ask users questions and keep the received answers, perform actions, such as ticket creation, or running search in a knowledge base. Create scenarios that involve knowledge base resources, conversations (including asking questions, clarifications, and so on), and external integrations.

To learn more about the workflow concept, its usage, and view the reference materials (including help pages on nodes), see the Workflow chapter in the documentation. It is available on your instance (substitute <yourinstance> with the actual name of your host): https://<yourinstance>.konverso.ai/doc/Workflow_781451265.html

Workflow nodes

Nodes are the building blocks of a workflow. There are many types of nodes: search nodes, interaction nodes, AI nodes, and so on. Each type has its own purpose.

In particular, there are two nodes that can be extremely useful when you create integration scenarios. These nodes are Web service and Call function.

Web service node

This node sends requests to a web service and parses the returned result.

As Atlassian offers a lot of APIs designed for Jira Service Management, you can use Web service node to leverage such APIs and integrate Jira Service Management with Koji.

Call function node

The Call function node is used for calling Python functions in your workflows.

There are nodes and built-in functions for you to implement in your workflows, but also you can build custom Python utilities to fit your organization’s needs. Create utilities to interact with users, invoke requests on external systems, and return results.

To implement custom Python code, you must use editable files. They allow you to add your own code into Koji in order to use it in Call function node, for example.

Custom Python callbacks

Intent in Koji is the primary logical unit of a conversation. The main idea of a conversation processing is extracting an intent and delivering a proper response to a user. 

Intents can have Python callbacks defined as their response. That means that once a given intent is detected by Koji, it replies to a user with the defined callback.

Callbacks allow you to run any kind of interaction with users, send requests to external systems, and eventually end the intent with a particular return code (completed, failed, etc.).

To implement custom Python code, use editable files. They allow you to add your own code into Koji in order to use it in callbacks, for example.