# Workflow Logic

Workflow logic controls how records move through a workflow.

Use it to define stages, transitions, permissions, and automation.

Configure workflow logic from the **Workflow** tab in the workflow settings.

{% hint style="info" %}
Set up your attributes, linked entities, and views first.

Workflow logic depends on those parts of the workflow design.
{% endhint %}

### What workflow logic controls

Workflow logic defines:

* the states and stages records move through
* the transitions between stages
* the triggers that allow a transition to happen
* the actions that run during workflow automation
* the permissions applied at each stage

This lets you build workflows for tasks like review, approval, escalation, and remediation.

### What is in this section

Use these pages to configure each part of the workflow:

* [States and Stages](/surecloud-docs/documentation/designer-hub/workflow-logic/states-and-stages.md) to define the workflow structure
* [Transitions, Triggers and Actions](/surecloud-docs/documentation/designer-hub/workflow-logic/transitions-triggers-and-actions.md) to move records and run automation
* [Stage Logic](/surecloud-docs/documentation/designer-hub/workflow-logic/stage-logic.md) to run automation without moving stage
* [Auto-Transitions](/surecloud-docs/documentation/designer-hub/workflow-logic/auto-transitions.md) to move records automatically from date conditions
* [Workflow Permissions](/surecloud-docs/documentation/designer-hub/workflow-logic/workflow-permissions.md) to control stage-based access

### Action types you can use

Actions are the automation that runs during transitions, stage logic, or record creation.

Common action types include:

* **Send Notification** to email users from a notification template
* **Create Task** to assign work to a user or role
* **Set Attribute** to update a field automatically
* **Create Record** to create a linked record
* **Execute Integration** to trigger an external integration
* **Invite Guest User** to send access to an external user

### Good practice

* Build the workflow structure before adding automation.
* Keep transitions clear and task-focused.
* Use stage logic for automation within a stage.
* Use transitions when a user or condition should move the record forward.
* Test notifications, tasks, and record creation before publishing changes.

### Related tasks

You may also need:

* [Views](/surecloud-docs/documentation/designer-hub/workflow-design/views.md)
* [Notifications](/surecloud-docs/documentation/designer-hub/workflow-design/notifications.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://surecloud.gitbook.io/surecloud-docs/documentation/designer-hub/workflow-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
