> For the complete documentation index, see [llms.txt](https://docs.sre.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sre.ai/using-sre.ai/automations/triggers/triggers-customization.md).

# Triggers customization

Learn about the customizable parameters in each Trigger

## Overview

SRE.ai offers two Triggers:

* [Manual](#manual-trigger-customization)
* [Deployment](#deployment-trigger-customization)

Read below to learn about the parameters that can be customized within each Trigger.

## Manual trigger customization

A click activates a manual trigger.

The manual trigger features one customizable parameter, a **Description.**

## Deployment trigger customization

The deployment trigger fires automatically when a deployment in your pipeline reaches a terminal state (success or failed).

**Parameters**

| Field             | Description                                                                          |
| ----------------- | ------------------------------------------------------------------------------------ |
| **Description**   | Optional label describing when this trigger fires                                    |
| **Org filter**    | Limit to specific Salesforce orgs. If empty, the trigger fires for all orgs          |
| **Status filter** | Limit to `success`, `failed`, or both. If empty, the trigger fires on either outcome |

**Available trigger data**

When a deployment trigger fires, the following variables are available to all steps in the Automation via `{{trigger_data.*}}` syntax:

| Variable                                | Description                                  |
| --------------------------------------- | -------------------------------------------- |
| `{{trigger_data.deployment_id}}`        | ID of the deployment that fired the trigger  |
| `{{trigger_data.deployment_status}}`    | Outcome: `success` or `failed`               |
| `{{trigger_data.org_id}}`               | ID of the target Salesforce org              |
| `{{trigger_data.org_name}}`             | Display name of the target org               |
| `{{trigger_data.components_total}}`     | Total number of components in the deployment |
| `{{trigger_data.components_succeeded}}` | Number of components deployed successfully   |
| `{{trigger_data.components_failed}}`    | Number of components that failed             |
| `{{trigger_data.tests_total}}`          | Total test count (Apex deployments only)     |
| `{{trigger_data.tests_succeeded}}`      | Tests that passed (Apex deployments only)    |
| `{{trigger_data.tests_failed}}`         | Tests that failed (Apex deployments only)    |
| `{{trigger_data.failure_count}}`        | Number of failures (if any)                  |
| `{{trigger_data.failure_summary}}`      | Summary of up to 3 failure messages (if any) |

**Example: notify on failure**

Use trigger data in a Send Teams Message step to build a context-aware alert:

```
Deployment to {{trigger_data.org_name}} {{trigger_data.deployment_status}}.
Components: {{trigger_data.components_succeeded}}/{{trigger_data.components_total}} succeeded.
{{trigger_data.failure_summary}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sre.ai/using-sre.ai/automations/triggers/triggers-customization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
