> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertick.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Usertick runs surveys on websites, by link, by QR code and by email, and collects every response in one inbox with reports, dashboards and workflows. The REST API lives at https://app.usertick.com/api/public/v1 and uses Bearer API keys or OAuth access tokens; the JavaScript SDK is the @usertick/snippet package on npm.

# Triggers and conditions

> Choose what starts a workflow, the survey it runs on and the conditions a response has to meet, from answers and AI analysis to who responded.

Every workflow begins with its trigger, the first card on the canvas, which sets the survey, the event that starts the workflow and the responses that start it. In edit mode, select the trigger card to open its panel.

## Choose what starts the workflow

**Survey** sets the survey the workflow runs on, and **Starts** sets the event that starts it:

* **When a response is submitted** runs the workflow as soon as a response arrives, before the AI analysis.
* **After AI analysis** waits until Usertick AI has read the response, so its type, urgency, theme, category and sentiment are known.
* **When a response becomes urgent** runs once per response, when the AI rates its urgency High or a teammate sets it to High.
* **When a number crosses a line** runs when a number of the survey, such as NPS, crosses a line you set. See [Threshold alerts](https://docs.usertick.com/workflows/threshold-alerts.md).

A response the AI doesn't read, such as one with a single score, still starts an **After AI analysis** workflow, with empty AI fields.

When a workflow reads the AI analysis in a condition, a message or a setting such as **Match the AI urgency**, it must start **After AI analysis** or **When a response becomes urgent**. Otherwise, the step that reads the analysis shows "This step reads the AI analysis, so the workflow has to start after AI analysis."

## Limit the responses

**Only if** limits the workflow to responses that meet its conditions. To add one, select **Add condition**, then a field, a comparison and a value. When you have two or more conditions, select **All conditions** or **Any condition**.

| Field group | Fields |
| - | - |
| Answers | Any question of the survey, and the **NPS group** of an NPS question: Promoter, Passive or Detractor |
| AI analysis | **AI category**, **AI theme**, **AI type**, **AI sentiment**, **AI urgency**, **AI customer risk**, **AI satisfaction**, **AI effort**, **AI churn risk**, **AI spam likelihood**, and the category, theme, type and sentiment of each written answer |
| Respondent | **Identified**, **Verified identity**, **Linked to a contact**, **User ID**, **Respondent email**, **Respondent name**, **Company**, **Trait** and the **Contact question** fields |
| Response | **Country**, **Language**, **Variant**, **Source** and **Page URL** |

A condition on a **Trait** requires the Starter plan or above. On Free, **Trait** is grayed out in the field list, and you can't test or publish a workflow that still has a trait condition until you remove the condition or upgrade.

To branch later in the flow instead of filtering at the start, use an [If / else](https://docs.usertick.com/workflows/if-else-and-wait.md) step.

## How conditions compare values

* **Text** ignores letter case, extra spaces and spaces at either end. Accents count, so "ürün" doesn't match "urun".
* **User ID** must match exactly as written, including letter case.
* **Language** compares the base language, so `en-US` matches `en` and `en-GB`.
* **Page URL** compares a pattern that starts with `/` to the page's path, without the domain or the query string. A pattern that ends in `/*` matches that page and every page under it, so `/blog/*` matches `/blog` and `/blog/launch` but not `/blogs`. Usertick compares any other pattern to the full address.
* **matches pattern** takes a regular expression and ignores letter case, and you can't publish a workflow with an invalid expression.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.