Overview
Automation — Overview
Automation is Corteksa's workflow engine. A workflow watches for something to happen in the CRM (a trigger), optionally checks the record against conditions, and runs one or more actions — update a field, send a WhatsApp message, call a webhook, create a record, and more. It runs directly on live CRM data: it sees objects, fields, statuses, messaging sessions, and templates natively.
When should I use Automation?
- You want a rule like "when a deal is marked Won, send the customer a WhatsApp".
- You want to auto-update records — stamp a status, copy a value, assign an owner.
- You want date-anchored reminders — "1 day before a subscription ends, message the contact".
- You want to notify external systems when CRM data changes (outbound webhook).
- You want first-reply automations on incoming chats (a welcome message).
For one-off manual sends use Messaging directly; for schema/record changes use the CRM API.
Key concepts
A workflow is addressed by slug (never a numeric id) and has four parts:
| Concept | What it is |
|---|---|
| Trigger | The event that starts the workflow (trigger_type + trigger_config). One per workflow. |
| Conditions | An optional AND/OR filter (filter_config) — the workflow only runs if the record passes. |
| Action | The effect (action_type + action_config). Always runs first. |
| Steps | Optional follow-ups (steps[]): more Actions plus Delay, Condition (branch), and Approval gates, run in step_order. |
A workflow is created paused (is_active: false) and only fires after you
activate it (PUT /workflow/:slug/toggle).
Available triggers
trigger_type | Fires when | Key config |
|---|---|---|
record_created | A new record is created on an object | object_slug |
field_changed | A watched field's value changes | object_slug, watched_fields[] |
status_changed | A status field transitions to a value | object_slug, status_field_slug, from_status, to_status |
message_received | A message arrives on a connected channel | session_slugs[], message_contains, direction |
first_message | A chat receives its very first message | session_slugs[], message_contains |
scheduled | A cron tick (optionally scanning an object for date reminders) | cron_expression, timezone, object_slug, reminder |
Available actions
action_type | Effect | Key config |
|---|---|---|
update_status | Set a record's status field | status_field_slug, new_status_value |
update_field | Set one or more field values | field_updates[] |
send_message | Send messaging text/media (reply or find-or-create a chat) | session_slug, message_template |
send_template | Send a pre-approved WhatsApp Cloud template | session_slug, template_name, variable_mapping |
send_webhook | Outbound HTTP POST/PUT/PATCH | url, method, payload_mode |
create_record | Create a record on any object, optionally linked | object_slug, field_values[] |
generate_records | Spawn N linked child records on a recurring cadence | target_relation_field, date/periodicity fields |
noop | Synthetic pass-through (trigger → condition only) | — |
Action text supports {{variable}} interpolation — record fields, trigger diff
({{old_value}}, {{new_value}}, {{admin_name}}), system dates
({{today}}, {{now}}, {{TODAY + 3}}), and message context
({{message_body}}, {{sender_name}}, {{sender_phone}}).
Next
- Build the builder UI → Frontend Integration
- How it runs → Architecture
- The endpoints → REST API