Skip to content
SurfaceDocs
FRGet started
DocsFlows & automation

Triggers and deadlines

Start operations in response to explicit conditions.

Define the trigger

A trigger connects an event or deadline to a declared operation. It specifies scope, conditions and repetition policy. Data changes and automated operations retain the same controls as manual Actions.

Element Expected values Description
Source Declared event or data Signal origin
Condition Rule and authorized context Determines applicability
Deadline Contract date, time or policy Determines applicable timing
Effect Admitted Action or operation Work to start or flag
Identity Stable key and occurrence Controls repetitions

Example

A quote awaiting approval approaches its deadline. The trigger checks that a decision is still pending and signals required attention. An accepted quote must not receive the same treatment because an old signal arrives late.

Time and recovery

Use an explicit time policy: effective date, timezone and calculation rules where applicable. The engine retains the signal and its processing. Retrying finds the processed occurrence instead of reproducing its effect.

See the deadline reference and rules before configuring automation.

Applied examples : Propose a review at the right time

A change to the amount proposes a review; a deadline bounds the watched objects.

Configuration

Fragment placed in triggers[]. Properties and accepted values.

{
  "key": "quote-review",
  "enabledByDefault": false,
  "event": {
    "kind": "revision",
    "definitionPaths": [
      "workspace/quotes/surface/quote"
    ],
    "fieldKeys": [
      "amount"
    ]
  },
  "ruleKeys": [
    "positive-amount"
  ],
  "actionKey": "review-quote",
  "mode": "propose",
  "executionCapability": null,
  "maximumCascadeDepth": 1,
  "historicalEvents": "explicit-backfill-only"
}

Variation and connection

Fragment placed in triggers[].deadline. Properties and accepted values.

{
  "contract": "SurfaceTriggerDeadline@2",
  "sourceQueryKey": "pending-quotes",
  "maximumScheduledNodes": 50,
  "lateToleranceMs": 300000
}

UI layout example

The illustrative layout below places this configuration in the Clients/Quotes app. Insert each fragment at the stated location, with Field, Query and Action references matching the Model declarations.

  1. Qualify need
  2. Prepare proposal
  3. Wait for decision
  4. Retain result
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
Triggers and deadlinesPropose a review at the right time
Clients
✓
Qualify needCompleted
✓
Prepare proposalCompleted
03
Wait for decisionDecision required
04
Retain resultUpcoming
Preparation is awaiting a decision

The proposal and its sources remain available while waiting.

Review proposal
Search for a concept, field or action.Esc