Create an Action

In this section, we will discuss the steps to create an action, configure the sample sentences and params for your ConvoKraft bot.

After you create a bot, you can add one or more actions to it. To add a new action in your ConvoKraft bot, follow the steps given below :

  1. After you create a new ConvoKraft bot or click on an existing bot, the bot’s details page will be displayed as shown in the screenshot below. Click Create Action.

create-action-button

  1. Provide a meaningful name for the action in the pop-up that appears. You can choose to configure the response of the action with a direct answer or based on business logic. Make a selection and click Next.

create-action-direct-answer

Respond with a direct answer

If you choose to configure the response of the action with a direct answer, follow the steps given below:

  1. Enter the appropriate sample sentences on how this question can be asked, that is the different possible variations of the question that the user is likely to use while conversing with the ConvoKraft bot. You can learn more about sample sentences from this page. Click Next.

just_sample_sentences

  1. Under What’s the answer section, enter the content that should be replied as an answer to the question. You can select a specific text in the answer and apply formatting styles to it by clicking the various formatting icon available in the toolbar. Learn more about the various formatting structures in detail from this section.
Note : The answer configured here is universal and common to all users irrespective of their region and timezone.

toolbar

  1. Click the Preview option in the Markdown editor toolbar to view a live preview of the content with applied formatting styles. Click Save.

Constructing answer by executing business logic

If you choose to configure the response of the action based on the execution of a business logic, either by fetching data or performing any operation, please follow the steps listed below:

based-on-business-logic

  1. Define the sample sentences for your action.

  2. Configure the required params for your action.

Note : You can add params only when you choose to configure your action's response based on a business logic.
  • To add a new param to an action:

Click the New Params option in the PARAMS section

new-param-button

  1. Choose the required param type from the list of data types supported by ConvoKraft and you will see a new dialog box to configure further details. Learn more about the attributes of each param type from params.

String

We will first create a new param of type String.

event-topic

You can configure the following details for the params:

  1. Enter the prompt message for user input and a failure message to display in case of invalid inputs.

  2. Enable Allow to skip, if required.

Note : The above mentioned attributes are applicable to all param types in ConvoKraft.

Single/Multi selection list

Next, we will create another param of type Single selection list :

  1. When you configure a single selection list/multi-selection list param, you can add the applicable options by clicking the New Option button as shown in the image below. To learn more about this param type, please refer to this page.
Note : You can also allow values at runtime other than the configured values, by enabling the allow values checkbox.

event-title

  1. You can also optionally configure custom button to perform further operations with the selected options by clicking the Add Button option beside the Submission Buttons label. The Configure Buttons screen will appear. Enter the values for required fields of each button. To learn more about these fields, please refer to this page.

add-new-button

To add another button, click New Button and once the required buttons are successfully added, click DONE.

  1. Choose the Mode of input as either Textual or Visual, based on your requirement.

single-selection-list-ex

  1. Associate a param with specific phrases in the sample sentences by selecting the required text. Select one of the configured params from the list shown, and associate it with the text right away. You can also click New param to create a new param.
Note : If you have not associated any param with the sample sentences, then the params will be invoked in the conversation in the exact same order in which they are defined.

param-association

  1. After you configure the required sample sentences and params for the action, click Save.

You can further edit the configurations by clicking on the Edit button. To learn more about viewing and managing an action, please refer to this page.

all-details-page

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