🦸AI functions | AI-functions
How to enable AI to perform actions in internal and external systems.
Choose how to get information: video tutorial (timestamp 07:55 — 10:49) or the text with images below.
Professional settings — a settings block where you can create various functions for the AI manager to interact with internal and external APIs. The block is located in the AI manager editing form.

Setting tags on a dialog via functions
Tags are used so that the AI manager can automatically mark dialogs at the right moment. This is needed for convenient visualization and filtering of dialogs in your personal account, as well as for performing actions in external integrations.
How to set tags via a function:
In your Selarti personal account, go to the section “AI”. Then click on the row with the AI to which you want to add tags.

Go to the section “Professional settings”.

In the dropdown menu “AI functions” select the desired tag.

If necessary, supplement or change the function description, to do this click “Add function”.

To reset AI function parameters, click “Cancel”.

Test the correctness of tag assignment, to do this click 'AI Testing'.

Click “Save”, to save changes.

Custom API setup
Function custom API allows you to connect external services and integrations so that the AI manager can process user requests and transfer data to external systems. This is a simple and convenient way to automate various tasks.
Usage examples
Connecting an external resource: you can connect the AI to any external service. For example, by integrating with a weather service, the AI will be able to provide up-to-date weather information in response to user requests. When requesting current weather information, the AI will send an API request to the external service, receive the data, and return a response, taking the dialog context into account.
Call scheduling function: The AI manager can help schedule calls by integrating with external systems. For example, the AI will request available time slots for a call, receive the necessary data, and record the event in a calendar or CRM system.
Task scheduling or user follow-up: Using an external API, the AI can track and schedule actions based on time conditions, for example, send a reminder to the user or schedule a follow-up contact after a specified time interval.
Advanced capabilities: Integrations can include ordering goods or services. For example, the AI manager can help order a taxi or coffee from a nearby cafe by integrating with the relevant services.
How to set up custom API
Concept description
Custom API functions allow you to integrate AI with external resources by sending POST requests via API to transfer and receive data. You can set up sending structured JSON requests to your server, for example, to add deals to a CRM or to receive information such as available slots in a calendar.
When a user sends a message, the AI automatically checks if functions need to be performed. If there is not enough data, it will request the missing information, then send a request to your server. The server will process the webhook, return a response, which will be sent to the AI, and then a final response will be generated. One user message can initiate an unlimited number of different functions.
In your Selarti personal account, go to the “AI” section. Then click on the row with the AI to which you want to connect an external resource.

Go to the section “Professional settings”.

In the dropdown menu, select “custom api”.

Write an instruction for the AI, describe what this function should do.

Create a JSON object describing the structure of the POST request to your server. All types of json schema are supported https://json-schema.org/understanding-json-schema
Example for creating a deal in CRM:
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "user name"
},
"phone": {
"type": "string",
"description": "User's phone"
}
},
"additionalProperties": false,
"required": [
"name",
"phone"
]
}
We expect to receive such an object on the server.
{
"name": "Sergey",
"phone": "+7999999999"
}
If the dialog lacks the necessary data to perform the function, the AI can ask for it additionally.
Add the server URL that will process webhooks from the AI, for example, Make.

Specify rules in the AI instruction on how to interact correctly with the function.

Example of implementing data reception in Google Sheets.

Add a webhook response. This information will be sent to the AI, processed, and then a response will be generated for the user based on the dialog context and the server response information.

Test the correctness of the function execution.

Check the request and processing logs.

In Google Sheets, we received the created row.
Last updated