Built-In Action Steps: Navigate, Confirm, Delete
Action chains are built from steps. The quality of the built-in step library determines how much you can accomplish without writing custom code. A narrow library forces workarounds. A well-considered library covers the patterns that matter and composes them into complex workflows.
Swifty ships with a practical set of built-in action steps covering the operations that appear in nearly every workflow.
Navigate
The Navigate step sends the user to a specified destination after other steps in the chain complete. Destinations can be:
- A specific page by URL or route name
- A record detail page (specify the object type; the record ID comes from chain context)
- The previous page (browser back equivalent)
- An external URL (opens in a new tab)
- A page that requires no record context (like a list page)
Navigation is always the final step in a chain, or a step in one branch of a conditional. It makes no sense to navigate mid-chain and then continue executing steps — navigation ends the user's interaction with the current context.
Confirm
The Confirm step pauses chain execution and shows a dialog to the user. The dialog has a configurable message and confirm/cancel buttons. If the user confirms, execution continues to the next step. If the user cancels, the chain stops.
This step is used to gate consequential operations — showing exactly what will happen before it happens. A "Submit for Approval" chain might include a confirm step: "This will submit the record for review. Approvers will be notified. Continue?" Only on confirmation does the chain proceed to status update and notification steps.
Delete
The Delete step removes a specified record. By default, it deletes the record the chain is operating on (the context record). It can also be configured to delete a related record specified in a field.
Delete steps in chains almost always precede a Navigate step — after deleting a record, there's nothing to display, so navigation to the list is the appropriate follow-up.
Combining Built-In Steps
These three steps compose naturally with other chain steps. A typical destructive workflow uses all three: first a Confirm step to gate the action, then any field updates or audit logging steps, then a Delete step, then a Navigate step to the list.
The built-in steps cover the majority of common workflow needs. The extension point exists for operations that go beyond the built-in set — but most workflows are fully expressible with the library provided.