Aptli

Automations

Automations let you define rules that fire automatically when specific events occur — without manual intervention. They are configured once by an admin and then run continuously in the background.

How Automations Work

Event occurs in Aptli
       ↓
System checks all automations for matching trigger
       ↓
Conditions evaluated (if any)
       ↓
Action(s) executed

Automations use an event-driven model. The system does not poll or run on a schedule (for scheduled tasks like nightly alerts, see Work Order notifications below); instead, automations react instantly when the triggering event fires.

Trigger Types

GIS Import Events

TriggerWhen It Fires
geo.import.createdA file upload is accepted and the import job is queued
geo.import.completedThe background conversion finishes; features are ready to review
geo.import.failedThe file conversion fails (error, corrupt file, etc.)

Context available:

  • job — the import job record (id, filename, fileType, featureCount, status)
  • actor — the user who uploaded the file (null for system-initiated imports)

Work Order Events

TriggerWhen It Fires
workorder.createdA new work order is saved
assignment.statusChangedStatus transitions (pending → in-progress, completed, cancelled)
assignment.cancelledA work order is cancelled
assignment.reassignedAssigned users change
assignment.pickupCompletedA QR pickup scan completes the inventory transfer

Report and Validation Events

TriggerWhen It Fires
report.createdA work report is created
report.submittedA report is submitted for validation
report.validatedA report passes validation
report.rejectedA report is rejected by a validator
validation.createdA validation record is created
validation.statusChangedA validation status transitions

Project and Task Events

TriggerWhen It Fires
project.createdA new project is created
task.createdA new task is created

Inventory Events

TriggerWhen It Fires
inventory.createdNew inventory is received
inventory.updatedExisting inventory is modified
stock.batchReceivedA batch receipt of inventory arrives
stock.adjustedA manual stock adjustment is made
stock.convertedA unit conversion is applied
stock.transferredStock moves between sites
stock.lowStock falls below minimum level
stock.staged.allocatedStaged inventory is allocated to a resource

User Events

TriggerWhen It Fires
user.invitedA new user invitation is sent
user.oauthLinkedA user links an OAuth provider
user.deactivatedA user account is deactivated

Help Request Events

TriggerWhen It Fires
helpRequest.createdA new help request is submitted
helpRequest.statusChangedA help request status changes

Version and File Events

TriggerWhen It Fires
version.submittedForReviewA GIS version is submitted for admin review
version.committedA GIS version is committed (goes live)
file.uploadedA file attachment is uploaded
file.quarantine_failedA file fails the security scan
file.deletedA file attachment is deleted

Scheduled Triggers

TriggerWhen It Fires
schedule.dailyOnce per day
schedule.weeklyOnce per week
schedule.monthlyOnce per month

Conditions

Conditions narrow when an automation fires. They are evaluated against the event context. Examples:

  • job.fileType == 'gdb' — only fire for GDB imports
  • workOrder.status == 'completed' — only fire on completion, not cancellation
  • actor.email endsWith '@myorg.com' — only fire for internal users
  • job.featureCount > 1000 — only fire for large imports

Conditions use a simple expression language. Multiple conditions are ANDed together (all must pass).

Actions

The following action types are available when building automations:

ActionDescription
send_notificationSend a push notification to a user or group
send_emailSend an email to a user or group
call_webhookPOST a JSON payload to an external HTTPS URL
create_workorderCreate a new work order
create_assignmentCreate a new assignment
create_taskCreate a new task
update_fieldUpdate a field on the triggering record
run_calculationExecute a configured calculation rule

send_notification / send_email

Parameters:

  • to — user ID, role name, or creator / assignedTo keywords
  • subject — email subject line (supports template variables)
  • body — message body (template variables: {{job.filename}}, {{workOrder.name}}, etc.)
  • channelemail, push, or both

call_webhook

POST a JSON payload to an external URL.

Parameters:

  • url — HTTPS endpoint to call
  • headers — optional custom headers (e.g., Authorization)
  • includeContext — whether to include the full event context in the payload

Creating an Automation

  1. Navigate to Admin → Automations
  2. Click New Automation
  3. Fill in:
    • Name — descriptive label
    • Trigger — select from the trigger type list
    • Conditions (optional) — add filter expressions
    • Actions — add one or more actions
  4. Set Active toggle to enable
  5. Click Save

Testing an Automation

From the automation detail page:

  1. Click Test Run
  2. Select a sample event from recent activity (or paste a JSON context manually)
  3. Click Run — the system evaluates conditions and executes actions in a dry-run mode (actions are logged but not actually sent / called)
  4. Review the test output for errors

Monitoring

The Automation History tab shows:

  • Last 50 executions
  • Trigger event that fired it
  • Conditions result (pass / skip)
  • Action results (success / error per action)
  • Timestamp and duration

Failed actions appear in red. Click a row to see the full error.

Best Practices

Start with notifications. The most common use case is sending an alert when a job completes or fails. Test this before building complex chains.

Use conditions liberally. An automation that fires on every event is noisy. Add conditions to target only the situations that matter.

Keep actions idempotent. If an automation fails partway and retries, the actions should be safe to run twice (e.g., send-email is idempotent because a duplicate notification is at worst annoying, not harmful).

Avoid long chains. Automations that trigger other automations are powerful but hard to debug. Document the chain clearly in the automation names and descriptions.

Permissions

ActionRequired Right
View automationsautomationsView
Create / edit automationsautomationsModify