Action Models

A ConvoKraft bot can be configured to perform actions while conversing with the user. An action of a bot is characterized by its sample sentences, params, and bot logic. The actions configured to respond with a direct answer is defined with its relevant sample sentences. On the other hand, the actions that execute bot logic, may require user inputs for performing certain operations, which requires you to set params for the actions along with the sample sentences.

Sample sentences

Sample sentences are the example invocations that end users would say to invoke a particular action in their conversational language. These sample sentences help to enhance ConvoKraft’s intelligence in understanding a user input better.

Listed below are a few typical sample sentences that can be configured to create an event :

  • “Create an event”
  • “Schedule a meeting”

Practically, users would speak out data as part of invoking instructions, so sample sentences may also include certain param values. As in the examples below, a user may mention the event title, start time, and end time as a part of their initial invoking sentence while trying to schedule an event.

  • “Create an event from 5 PM to 6 PM to discuss about the Zylker deal.”
  • “Schedule a meeting with John at 5 PM.”

If the invoking sentence does not contain all the required params, the bot will prompt the user for those required param values.

The sample sentences define the intention of a particular action, and the params define the entities that would be required to fulfil that action. Thus, the data model of any ConvoKraft action is attained using the combination of sample sentences and params.

To learn more about sample sentences and their significance in action configuration, refer to this page.

Params

Params are the input data required to fulfil or execute an action. For example, the params of an action configured to create an event in your calendar would typically be the event title, start time, end time, event venue, and more.

To learn more about params and their types, refer here.

Bot logic

The conversational flow and execution of an action depends upon the business logic (or bot logic) defined for it. ConvoKraft supports the following development platforms to define the bot logic of an action :

All the declared params of an action are passed to the business logic to execute the action. In addition to the declared params, other environmental data (such as details about the user or the client application) that would be needed to execute the business logic will also be passed as input arguments to these functions.

  1. Catalyst Functions

Catalyst Functions are custom-built coding structures which contains the intense business logic of your Catalyst application. Catalyst Integration functions allows you to code and use a Catalyst function as a backend of other Catalyst or Zoho services and establish an integration with them. When you invoke the action in ConvoKraft, it would automatically invoke the configured integration function through a HTTP call.

Note: Integration Functions is currently not available to Catalyst users accessing from the EU, AU, IN, or CA data centers. Users accessing from these DCs will not be able to use ConvoKraft Integration functions to code their backend logic for their bots, and can instead avail the other options.

While using Catalyst Functions, your business logic can be defined in the following programming environments:

You can create a Catalyst Function by navigating to the Serverless service in your console or even use the Catalyst CLI to create and code your functions from the local environment.

Catalyst functions are highly scalable and efficient. The server infrastructure upon which the functions are hosted is entirely handled by Catalyst eliminating the need for you to manage the backend and enabling you only to work on developing the business logic. In addition to providing powerful backends for your applications, Catalyst functions are robust and reliable in nature, providing a seamless integration with ConvoKraft.

To learn more about using Catalyst functions to define the business logic of your ConvoKraft actions, refer here.

  1. Deluge Functions

Deluge is the native online scripting language of the Zoho cloud environment. It has a user-friendly syntax allowing seamless integration between two Zoho services, or with a third party service.

The business logic of the ConvoKraft actions must be written in Deluge through the following pre-defined function templates:

  • Execution (mandatory) : This is the core function involved in execution of all the actions of a ConvoKraft bot.

  • Context Handler (optional) : This function is invoked for every user input during an action. It can be used to change the order of params in the conversational flow, skip them if required, or even perform custom validations.

  • Button Click (optional) : This function can be used while defining a button card’s business logic. This is a part of the execution function type that focuses on the implementation of custom buttons.

These functions are hosted in the Zoho cloud and will be executed at their respective invocation points during an action execution. Similar to Catalyst functions, Deluge functions are also highly efficient, and their hosting and maintenance are fully handled by Zoho. You can learn more about using Deluge functions to define the business logic of your ConvoKraft actions here.

  1. Webhooks

In the case of webhooks, you can code the backend logic in an external platform and invoke it through the webhooks configured within ConvoKraft. The business logic of the actions must be built, managed, and hosted externally in a publicly hosted server that is accessible to ConvoKraft. You will be required to use REST APIs to access the logic from the bots you build. The configured Webhook URL will be invoked by ConvoKraft at the appropriate invocation points during the action execution.

While using webhooks, your business logic can be defined in any convenient programming language of your choice. But on the contrary to Deluge and Catalyst functions, when using webhooks, you will have to manage the infrastructure setup and configuration completely from your end. Learn more about using webhooks to define the business logic of your ConvoKraft actions from this page.

Last Updated 2024-06-11 18:57:28 +0530 +0530