Diska
Actions

Custom actions

Call your company's API (HTTP) before, during or after the call and use the response in the conversation.

A custom action makes an HTTP request to an external API — your CRM, booking system or ERP — and hands the response back to the agent. Open Acções → Acções personalizadas (Actions → Custom actions).

The list shows Nome (Name), Método (Method), URL do endpoint (Endpoint URL), Autenticação (Authentication), Agentes and Estado (Status: Não inicializado — not initialized, Inicializado — initialized, or Falhou — failed), with filters by method, authentication and status.

Creating an action

Click Criar novo (Create new). The editor has two columns: on the right you configure the action, on the left (Resultados — Results) you test it. Ocultar resposta / Ver resposta (Hide / Show response) hides or shows the results column.

«Configurar» tab (Configure)

FieldDescription
Nome da acção (Action name)Required, in snake_case (e.g. check_order).
Descrição (Description)Tell the AI how and when to use this tool (e.g. "Use when the customer asks about an order's status."). In a Prompt Builder agent, this is the text the agent uses to decide to call the API.
Método do endpoint e URL (Endpoint method and URL)GET, POST, PUT, PATCH or DELETE, and the full URL. Use <name> for variable parts (e.g. https://api.example.ao/orders/<order_number>).
Autenticação (Authentication)Sem autenticação (None) or Personalizada (Custom). For custom, enter a Bearer token (sent as Authorization: Bearer …) or a Cabeçalho (Header) and its Valor (Value). These values are stored encrypted.
Tempo limite (Timeout)From 1 to 30 seconds (Máx. 30 segundos). With Sem tempo limite (No timeout), the platform waits up to 10 seconds.
Cabeçalhos (Headers)Key/value pairs; the key cannot be empty.
Corpo do pedido (Request body)JSON sent with POST, PUT and PATCH (disabled for GET and DELETE). It must be valid JSON and cannot be empty. Use <name> for dynamic values.
Variáveis de entrada (Input variables)Detected automatically from the URL, headers and body.

The URL cannot point to local or private-network addresses: Diska rejects it for security.

«Instruções de IA» tab (AI instructions)

What the agent should say at each stage of the action:

FieldDescription
Mensagem inicial (Start message)What to say when the action starts running.
Mensagem de atraso (Delay message)What to say if the action takes longer than expected.
Limiar de atraso (Delay threshold)How long to wait (0–30 s) before the delay message.
Max retries (HTTP)From 0 to 5. Shown in the simulation; on calls, the action makes a single request.
Mensagem de falha (Failure message)What to say if the action fails.
Deixar o agente falar naturalmente (Let the agent speak naturally)The agent says something that fits the context and falls back to your messages if it cannot. Turn it off to use only your messages.

Click Guardar (Save).

Testing: Inicializar and Simular

In the Resultados column, under Configurar entradas (Configure inputs), enter a Valor de teste (Test value) for each Variável dinâmica (Dynamic variable). Then:

  • Inicializar (Initialize) — saves the action and makes the real request to the API with the test values. Estado becomes Inicializado (2xx response) or Falhou, and the response appears under Corpo da resposta (Response body).
  • Simular (sem HTTP live) (Simulate, no live HTTP) — available once saved. Shows the request that would be sent and the agent's message sequence, without calling the API.

Connecting it to the agent

Prompt Builder

Under Acções, a custom action can go into all three groups:

GroupWhat happens
Antes da conversa (Before the conversation)The API is called before the conversation starts; the response becomes available as call variables. The conversation only starts once the request finishes, so use fast APIs.
Durante a conversa (During the conversation)The agent calls the API when the Descrição says so and fills the <name> placeholders with data from the conversation. The response fields become available as action results.
Depois da conversa (After the conversation)The API is called after the call ends.

Each attached action has an optional Mapeamento de variáveis (Variable mapping, source → target) to fill the inputs from call variables.

Flow Designer

  • With the Custom action node, at a fixed point of the flow.
  • Under Acções on a Conversation node (the agent uses it when needed, during that step) or on an End call node (it runs before the farewell).
  • On the Antes da conversa node.

In the Testar panel, with the draft the requests are simulated; with the published version, the API is called.

Copyright © 2026