# Automations

> Rules that react to events (tags, webhooks, messages) and run actions.

Rules that react to events (tags, webhooks, messages) and run actions.

## `automation_toggle`

**Enable or disable an automation rule** · Changes data · can overwrite or remove · Listed to the agent from the start

Flips `enabled` on a rule by `rule_id`. It is how to activate a newly created rule (created disabled) after reviewing and simulating it. An enabled rule can send messages or run actions on its own, so get the user's OK before enabling.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `rule_id` | string | Yes |  |
| `descripcion` | string | No | One short sentence: what this call changes and why (10-200 chars, no personal data). |

## `automation_update`

**Update an automation rule** · Changes data · can overwrite or remove · Listed to the agent from the start

Replaces a whole rule (like a PUT, not a partial patch): resend all fields, not only the changed one. Optional `enabled` can activate the rule, and an active rule can send messages, so get the user's OK; if omitted, the current state is kept. Validates the vocabulary. Use `automation_toggle` to just enable or disable.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `actions` | array | Yes |  |
| `conditions` | array | Yes |  |
| `name` | string | Yes |  |
| `rule_id` | string | Yes |  |
| `trigger_type` | string | Yes |  |
| `condition_logic` | string | No | Default: `"AND"`. |
| `descripcion` | string | No | One short sentence: what this call changes and why (10-200 chars, no personal data). |
| `description` | string | No | Default: `""`. |
| `enabled` | boolean | No |  |
| `limits` | object | No |  |

## `automation_assets`

**Get data for building automation actions** · Read only · Reached with `dakso_explore`

Returns the organization's real data to fill action configs: existing `tags` (add_tag/remove_tag), pipeline `stages` (change_stage, deprecated), opportunity `pipelines` and ticket `ticketPipelines` with their stages (move_opportunity, create_opportunity, move_ticket, create_ticket) and approved `templates` (send_template). Call it before building those actions. Queues and skills (enqueue_live/set_routing) are configured in the admin and are not returned here.

No arguments.

## `automation_create`

**Create an automation rule** · Changes data · can overwrite or remove · Reached with `dakso_explore`

Creates an automation rule. It is created disabled (`enabled=false`): test it with `automation_simulate`, then enable it with `automation_toggle`. Validates the vocabulary (trigger, operators, actions) before creating. `conditions` = list of {field, operator, value?}; `actions` = list of {type, config, delayMinutes?}. Every send_template action needs `config.purpose` (commercial | collections | transactional).

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `actions` | array | Yes |  |
| `conditions` | array | Yes |  |
| `name` | string | Yes |  |
| `trigger_type` | string | Yes |  |
| `condition_logic` | string | No | Default: `"AND"`. |
| `descripcion` | string | No | One short sentence: what this call changes and why (10-200 chars, no personal data). |
| `description` | string | No | Default: `""`. |
| `limits` | object | No |  |

## `automation_delete`

**Delete an automation rule** · Changes data · can overwrite or remove · Reached with `dakso_explore`

Deletes an automation rule by `rule_id`. Destructive action. For safety the agent does not run this action: the tool returns a link to the Dakso admin screen where a person confirms it. Give the user that link.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `rule_id` | string | Yes |  |
| `descripcion` | string | No | One short sentence: what this call changes and why (10-200 chars, no personal data). |

## `automation_executions`

**List automation rule executions** · Read only · Reached with `dakso_explore`

Execution history of a rule by `rule_id` (optional `limit`): status success, partial, failed or skipped, with detail per action. Useful to diagnose why a rule did not do what was expected.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `rule_id` | string | Yes |  |
| `limit` | integer | No | Default: `20`. |

## `automation_get`

**Get an automation rule** · Read only · Reached with `dakso_explore`

Returns one full rule by `rule_id`: trigger, conditions, `conditionLogic`, actions (with their config), limits and `enabled`.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `rule_id` | string | Yes |  |

## `automation_simulate`

**Simulate an automation rule** · Read only · Reached with `dakso_explore`

Side-effect-free simulation: evaluates the conditions with real data and checks each action's preconditions (does the contact have a phone, does the stage or tool exist), returning what the rule would do without running anything. Pass `rule_id` (saved rule) or `rule` (inline draft). `sample_event` holds example event values, such as {"sentimentLabel": "negative"}; optional `contact_id` anchors the checks to a real contact. Always simulate before enabling with `automation_toggle`. Read-only.

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `contact_id` | string | No |  |
| `rule` | object | No |  |
| `rule_id` | string | No |  |
| `sample_event` | object | No |  |

## `automations_list`

**List automation rules** · Read only · Reached with `dakso_explore`

Lists all automation rules of the organization: `ruleId`, `name`, `triggerType`, `enabled` and a summary of the actions. Use it to see what is already set up.

No arguments.
