Defining an Action

Defining an Action

Adding a new Action

To add a new action to a bot, follow the steps as given below. 
  1. In the bot's detail page, under the ACTIONS tab, click the + ADD ACTION option.

  2. The Create New Action page appears. Give a meaningful name for the action.
  3. Based on the intention of the action, choose if your action should 'Answer a question' or 'Perform an Operation'.
  4. If the intention of your action is to answer a question, choose whether the action should 'Give a Direct Answer' or 'Construct Answer by Fetching Data'
  5. Define Sample Sentences and Parameters as required.

  6. Click DONE and you will be redirected to the Configuring Functions page. 
  7. If required for your action, define Context handler function.
  8. After that, in Configuring Functions page, click on EDIT EXECUTION FUNCTION and define the Execution Function.
  9. You can test your code using the sample chat window in the right panel of the Execution Logic page.  
  10. After defining the function and testing the action, click DONE.
The intended action would now be created and displayed under ACTIONS section. The created actions can be segregated using ACTIONS section's filter. It segregates actions as,
  1. Active — Actions which are created and available to use when published
  2. Inactive — Actions which were created and later deactivated. These actions are unavailable for chat.

    Note:
    The actions under the Active section will be available to chat from the bot only after the bot is published.

    • Related Articles

    • Defining Sample Sentences

      Defining sample sentences is the key in defining your action, because this is what the user is likely to tell Zia in order to trigger your action.  If you have chosen the action intention as "Perform an Operation", then sample sentences must be ...
    • Defining Params

      Params are the input data that must be received from the user, in order to complete 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 ...
    • Defining Deluge Functions

      Functions are custom hooks written by action developers that are invoked by Zia at various points during an action's execution. The conversational flow and the execution of an action are determined by the functions defined for that action.  The ...
    • Action Followups

      Action Followups defines what the bot should recommend the user after executing an action, in order to engage the user further in conversation. The bot can display a list of suggestions or ask if it can invoke another action, that might be ...
    • Testing an Action

      To ensure that your action doesn't have any functional issues, you may have to test your action before deploying it to production. In addition to that, you can also verify the user experience and ensure that it works as you have configured. To test ...