Developers
ENPT

Automations

Write WHEN/THEN rules that make the avatar act during a conversation, such as creating a ticket, calling your API or asking for a person.

An automation is a rule the avatar follows during a conversation: when a situation happens, then an agent runs. For example: when the customer asks for a refund, create a ticket; when the customer gives an order number, look it up in your system.

You write the situation in plain language. While talking, the avatar checks which automations apply and runs their agents.

To open the screen, go to the menu and, under Automate, click Automations.

Automations or Flows?

Automations are rules the avatar decides to run inside a conversation. Flows are visual step-by-step processes started by a trigger, such as a message, a schedule or a call from another system. See Flows.

Modules

Automations are grouped in modules (listed under Automation Modules). A module gathers related automations, for example "Sales" or "After-sales". Each module has:

  • General Module Instructions: guidance that influences every automation in the module.
  • AI Model: the model that decides which automation to run.
  • The list of automations, and a Statistics tab.

To create a module, start from scratch with New Module or pick one of the Templates. Some templates require additional permissions.

Write an automation

Start editing

Open a module and click Start editing.

Add the automation

Click New Automation and give it a name, such as "First contact" or "Refund request".

Describe the trigger

In When, describe in what situation the automation should run. Keep it short: long instructions spread the AI's attention.

Choose the agents

In Then, pick one or more agents and configure each one.

Add instructions (optional)

Click Add Instruction to guide the avatar's behavior when the automation runs, for example "Apologize to the customer".

Save

Click Save changes, then Finish editing.

Turn on Run only once per conversation when the automation should not repeat, such as a welcome message. Once it runs, it is no longer offered in that conversation.

When a teammate is editing the same module, Tolky shows who is editing. If you stay idle while editing, Tolky warns you and then ends the editing session, discarding unsaved changes.

Agents

An agent is the action that runs in Then. The list depends on what is enabled for your account. Common examples:

AgentWhat it does
Call APICalls an endpoint of your system, for example to look up an order or register a lead, and gives the result to the avatar.
Request Human SupportFlags that the conversation needs a person and highlights it in Conversations.
Ticket creationCreates a ticket using your instructions and the conversation history, optionally distributed by department. See Tickets.

Automations can also apply Smart Tags of the type Trigger via Automations and send scheduled messages configured in Follow-up.

Statistics and history

The Statistics tab shows, for a period, how many decisions were made, how many were discarded by review and how many actions ran, with the success rate, the average execution time and the conversion of each automation. In the details of an automation, click View executions to see the history of its agents.

Version History lists each saved version with who changed it and when. Click Compare to see the differences against the current version.

Test in an environment first

Changes saved in a test environment stay as drafts until you promote the environment to production.

AdvancedTechnical details

How a decision is made. On each message, the module's model reads the conversation, the general instructions and the When of each active automation, and selects which ones apply. A review step can discard the choice before the agents run; the statistics show these as "Discarded by review".

Data preconditions. Besides the When text, an automation can have conditions on captured form fields (for example, a field is filled or a date is older than some days). Conditions are combined with AND and are checked deterministically before the AI decides, so the automation is only offered when they are met.

API. Modules and their automations can be managed with a host token through the decisions endpoints, all under /api/externalAPIs/public/tolkyReasoning/decisions/:

EndpointUse
POST .../listList the modules.
POST .../listAgentsList the agents available to the account.
POST .../saveCreate or update a module.
DELETE .../delete/:idDelete a module.

In the saved module, each automation is an item of chainJson with a description (the trigger), the agents it runs (agentName, schemaName) and its instruction content. See Authentication.

Previous

Departments and distribution

Next

Flows