Skip to main content

2.14.5. Document AI Actions

You can configure action buttons that will be displayed in the document toolbar. Using these buttons, you can run an AI scenario and perform certain actions directly from the document form.

2.14.5.1. Configure AI Actions for a Document

Configuring AI actions consists of two main steps:

  1. Create an AI Scenario of type Document Action. When creating the scenario, pay attention to the following aspects:

    1. In the General Settings tab, in the Scenario Type field, select Document Action.
    1. In the Scenario Variables 1 tab, create variables that will receive the values of document attributes.

    2. In the Scenario Steps 1 tab, add the desired steps 2. The most typical scenario consists of the following steps (in the specified sequence):

  2. Configure AI Actions in the document type.

2.14.5.2. Apply AI Actions in a Document

Note:

Before applying AI Actions in a document, make sure you have completed all necessary configuration.

  1. Create a document of a type for which AI Actions are configured. Run a process to create a document or create a document manually:

    1. In the navigation panel, select the Documents 1 workspace.

    2. Select the Documents 2 shortcut, then in the toolbar select + 3.

    3. In the Document Type 1 field, select the type for which you configured AI actions, then select Create 2.

  2. If the created document matches the status configured in AI Actions, and your profile matches the configured role, you will see the AI Actions button in the document toolbar — select it.

  3. In the right panel, select the button with the name of the desired action to run the scenario.

  4. The AI will provide a response, which you can copy if needed by selecting the icon.

Tip:

To make the scenario more flexible, you can pass a request to the LLM not only through a scenario step, but also through a custom attribute of type Text. You can pass the request from such an attribute to the scenario using a variable.

To do this, create a custom attribute (for example, prompt) and add it to the document type form. Then, in the required AI scenario, create a variable that will pass the text of this attribute to the scenario. In the scenario step (in the Prompt field), use the created variable. This way, the scenario will be able to perform different actions depending on the request entered in the attribute.


For example, instead of a fixed step "Calculate the number of vacation days", you can configure a step with the text "Perform the following task {{prompt}}". Now, to run the scenario with a new request, you only need to: enter the request in the attribute 1, save the document 2, and click the AI Actions 3 button.