Workflows
Action chains started by events, transitions, schedules or a manual call.
A workflow is an ordered list of actions. It starts from a record trigger (create, edit, delete, with field criteria), a lifecycle transition, a schedule (a trigger with a cron expression; the workflow runs a saved query and acts on its rows) or a manual call.
Built-in actions
| Area | Actions |
|---|---|
| Records | CreateRecord, UpdateRecord, DeleteRecord, BulkInsert |
| Queries | SelectQuery, ExecuteQueryById, ExecuteQueryByName |
| Database | ExecuteSP, ExecuteFunction (and async variants) |
| Logic | If, ForEach, EvaluateLiquid |
| Lifecycle | GetAvailableStatuses, UpdateStatus |
| Settings | FetchConfig, ManageSettingsCRON |
| Release | ApplyRelease |
| Integration | HttpRequest |
| Notifications | SendNotification, SendEmail, SendSms, SendInAppNotification, SendWebhookNotification, SendMultiChannelNotification, SendPushNotification |
Actions read tokens such as {{Reqtokens.Field}} and {{PreviousOutputs.name}}. Custom actions are written in C#.
Workflows run their actions in one pass. Waiting steps, human tasks inside a workflow and a stored run history are not available yet; use approvals for human decisions. Push notification delivery is coming soon.
How automation starts
| Source | Runs when |
|---|---|
| Record event | A record of the chosen AppObject is created, edited, created or edited, or deleted. |
| Schedule | A CRON schedule fires, for example every weekday at 06:00. |
| Lifecycle transition | A record completes a transition that lists the workflow in its After phase. |
| Manual | A user or an integration starts the workflow on demand. |
Event triggers are evaluated as part of the save, so a new or changed trigger applies to the very next save. A notification attached directly to a trigger is sent without any workflow; see Notifications.
Create an event workflow
- Go to Administration > Workflow and choose +. In TAF Studio, run
TAF: New WorkfloworTAF: New Trigger. - Enter a clear name and, optionally, a description.
- Select the AppObject the workflow watches and the trigger type Event Based.
- Choose the Trigger Event: Created, Edited, CreatedOrEdited or Deleted.
- Choose the Trigger Occurrence: Everytime the conditions are met, or only the FirstTime for each record.
- Choose the TriggerField Criteria: when any field is updated, when any of the selected fields is updated, or only when all selected fields are updated. Pick the fields to watch.
- Add Criteria: choose AND or OR, then add conditions of field, operator (such as Equal To, Contains, Greater Than) and value.
- Choose Submit.
Watch specific fields rather than any field where you can, and use FirstTime for work that must happen once per record, such as setting up onboarding tasks for a new employee.
Add actions
Open the workflow from the list to reach the designer. Drag an action from the list on the left to the design area, give it a display name and fill in its parameters, then choose Submit. Actions run in the order shown, and the workflow preview shows the sequence. An action can be set to continue on error, or to stop the chain.
| Group | Built-in actions |
|---|---|
| Records | Create record, update record, delete record, bulk insert |
| Queries and database | Run a DSQ by id or name, select query, run a stored procedure or function |
| Logic | If, for each, evaluate a template expression |
| Lifecycle | Get the available statuses, update a record’s status |
| Integration | HTTP request, fetch configuration |
| Notifications | Email, SMS, push, in-app, webhook, multi-channel, or a configured notification |
Values from the triggering record and from earlier actions are passed to later actions as tokens, and action settings can reference them through templates.
Custom workflow actions
For logic the built-in actions cannot express, such as converting a lead into a person, an account and a deal, write a custom action:
- Go to App Builder > App Setup > Custom Scripting and choose Add Script.
- Select Workflow Action as the script type and choose C# as the language. Custom workflow actions run on the platform, and scripts that run on the platform are C#.
- Name it descriptively, for example
ConvertLeadToDeal, and add a description.
A workflow action receives its inputs as tokens, reads and writes records through the platform's query API (so access rules, audit and hooks still apply), and returns a response with logs and errors. Validate required tokens at the start, keep each action to one purpose, and process large sets in batches. Once saved, the action appears in the workflow designer next to the built-in ones. See Custom scripts for the full script model and Scripts and debugging for checking and debugging scripts in Studio.
Scheduled workflows and jobs
A scheduled trigger needs a schedule instead of an AppObject event. The platform's job scheduler registers a recurring job for it and fires it on time; each firing starts the linked workflow. The same scheduler runs other timed work:
- Recurring (CRON) and one-time jobs.
- Report schedules, which produce and send a report on a recurring or one-time basis. See Reports and import.
- The approval deadline sweep, which sends reminders and escalations for overdue approval steps.
Typical scheduled work
- Create each person's weekly timesheet from their time logs.
- Process files dropped into a location in batches, moving failures aside.
- Remind owners about records that have not moved for a week.
Test and troubleshoot
| Symptom | Check |
|---|---|
| The workflow does not start | The AppObject and trigger event match what you are doing, and the criteria match the record. |
| It runs too often | Change the occurrence from Everytime to FirstTime, or watch fewer fields. |
| A field change is ignored | The field is selected in the trigger field criteria. |
| A scheduled trigger never fires | The trigger has a schedule set. |
In Studio, TAF: Run Workflow runs a workflow for testing and TAF: Show Workflow Runs lists recent completed and failed runs gathered from the platform logs.
The platform does not keep a dedicated workflow run history. Studio assembles recent runs from the platform logs, so some trigger-started runs may be missing from that view.