Model & Flow of Actions

Model & Flow of Actions


An Action of a Zia bot is characterized by its Sample sentences, Params and Functions.

Params

Params are the input data that are required to fulfill or execute an action. If we consider the execution of an action analogous to filling a form, then the fields in the form are considered as the params for the action.

For example, the params of an action written to create an event would typically be title, start time, end time and so on.

Sample sentences

Sample sentences are the example invocations that end users would say to invoke a particular action in their natural language. These Sample sentences constitute to Zia's intelligence in understanding a user input.

Typical sample sentences for the create event action would be the following.
  1. Create an event
  2. Schedule a meeting

Practically, people would speak out data as part of invoking instructions and hence sample sentences may also include certain param values. As in the examples below, user may say the event title, start time and end time as a part of their initial invoking sentence while trying to schedule an event.
  1. Create an event from 5 PM to 6 PM to discuss about the Zylker deal.
  2. 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 param values. 


Thus Sample Sentences define the intention of a particular action and the Params define what are all the entities that would be required to fulfill that action. The data model of an Action for Zia’s intelligence is formed by the combination of the Sample sentences and Params.


Functions

Functions are the custom hooks to be written by developers that are executed by the bot during execution of an action. Functions control the flow of an Action. The business logic of an action are defined in these Functions.


All the functions must be written in Deluge, the native online scripting language of the Zoho cloud environment.  All the declared params of an action are passed as input arguments to these functions, in addition to some other environmental data that would be needed to execute the business logic.

Every action can have the below functions, that are executed at their respective invocation points during an action execution.
  1. Action Execution (mandatory) — invoked at the end of an action, after all params are filled.
  2. Context handler (optional) — invoked for every user input in the course of an action.

Action execution flow

  1. Whenever a user inputs a sentence in a Zia bot, Zia tries to understand the user input to detect the intention of the user input.
  2. If the intention matches with any one of the intentions of the configured actions, then Zia will prompt the user for the params that are required to fulfill that action, in the form of a conversation.
  3. For every user input, the Context Handler Function will be invoked, if enabled.
  4. Once all the configured params are received from the user, Zia executes the Action Execution Function.
  5. The return value of the execution function is sent as a reply message to the user.

    • Related Articles

    • Integrate with Zoho Flow

      Zoho Flow is an integration platform which connects cloud applications. It helps you set up workflows to automate information exchange among the apps you use. With Zoho Flow, you no longer need to learn code to integrate. Zoho Campaigns lets you to ...
    • Notebook & Flow

      Zoho Flow is an integration platform that lets you connect your favorite apps together so you can save time, simplify tasks and reduce workload. Connect Notebook with your favorite apps using Flow.   A sample integration and the steps to achieve it ...
    • Cumulative flow diagram (CFD)

      Understanding the Cumulative Flow Diagram (CFD) The Cumulative Flow Diagram (CFD) tracks the progress of the team's work items according to their status. Every work item is tagged with a particular status in the sprint board, and the CFD represents ...
    • What is a Cumulative Flow Diagram?

      The Cumulative Flow Diagram (CFD) calculates the progress of a sprint by tracking the number of work items in each status. This determines which status requires additional attention or resources.
    • Bulk actions

      Bulk actions include Reset Password, Reset MFA, and Disable MFA. These can be performed for multiple users simultaneously. When used along with Advanced filtering, they can be applied to a specific set of users. You can perform bulk actions when more ...