> For the complete documentation index, see [llms.txt](https://docs.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pharos.ai/configuration-guide/notifications/notification-actions.md).

# Notification Actions

Configure notification actions for Slack, Teams, Email, PagerDuty, and Webhooks—including message templates and channel-specific settings.

When a notification rule fires, it executes one or more **notification actions**. Each action sends a message to a specific channel. You can attach multiple actions to a single rule—for example, post to Slack and send an Email simultaneously, or send a detailed message to a dev channel and a shorter summary to a support channel.

Pharos supports five notification action types:

![Notification action types available in Pharos](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-aede9e7b28cd40e1be62b140473388f98c046148%2Fnotification-types-dropdown.png?alt=media)

| Action Type   | Best For                                 | Requires                                                                                      |
| ------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------- |
| **Slack**     | Real-time team awareness                 | [Slack integration](https://docs.pharos.ai/configuration-guide/integrations/slack.md)         |
| **Teams**     | Real-time team awareness                 | [Teams integration](https://docs.pharos.ai/configuration-guide/integrations/teams.md)         |
| **Email**     | Reaching users without messenger access  | Email deliverability enabled                                                                  |
| **PagerDuty** | Critical on-call escalation              | [PagerDuty integration](https://docs.pharos.ai/configuration-guide/integrations/pagerduty.md) |
| **Webhook**   | Custom integrations and external systems | Webhook endpoint URL                                                                          |

***

## Adding a Notification Action

From any notification rule (Issues, Logs, or Trace Results):

1. Scroll to the **Notifications** section at the bottom of the rule
2. Click **Add New** to create a new action, or **Add Existing** to reuse a previously created template
3. Select the action type from the **Send notification to** dropdown
4. Configure the channel-specific fields (described below)
5. Click **Add** to attach the action to the rule

{% hint style="info" %}
**Multiple actions per rule:** You can add as many notification actions as you need. Each action can be a different type—for example, a Slack message and a PagerDuty incident from the same rule. Multiple actions of the same type are also supported (e.g., two Slack notifications to different channels).
{% endhint %}

***

## Message Templates and Merge Fields

All notification types support **merge fields** to insert dynamic data from the record that triggered the rule. The available fields depend on which tab the rule belongs to:

* **Issues tab** → Fields from the Issue object (e.g., `{!pharos__Issue__c.pharos__Summary__c}`)
* **Logs tab** → Fields from the Log object (e.g., `{!pharos__Log__c.pharos__Summary__c}`)
* **Trace Results tab** → Fields from the Trace Result object

Use the **Insert Field** button at the bottom of the notification form to browse and insert fields instead of typing the merge syntax manually.

![Insert Merge Field picker — search and select fields from the relevant object](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-f73b6ed796467ec83c4d2b72c6db962a3041498f%2Finsert-merge-field-picker.png?alt=media)

### Default Templates

Defaults depend on the tab the rule belongs to, and — on the Trace Results tab — on the channel. They prefill only when you **add a new** action; editing a saved action never overwrites its text.

#### Issues tab

* **Subject:** `New {!pharos__Issue__c.pharos__Category__c} Issue in {!pharos__Issue__c.pharos__Organization_Name__c}: {!pharos__Issue__c.pharos__Summary__c}`
* **Body:**

```
{!pharos__Issue__c.Link}
Functional Area: {!pharos__Issue__c.pharos__Functional_Area__c}
{!pharos__Issue__c.pharos__Description__c}
```

#### Logs tab

* **Subject:** `New {!pharos__Log__c.pharos__Category__c} Log in {!pharos__Log__c.pharos__Organization_Name__c}: {!pharos__Log__c.pharos__Summary__c}`
* **Body:**

```
{!pharos__Log__c.Link}
Functional Area: {!pharos__Log__c.pharos__Area__c}
Type: {!pharos__Log__c.pharos__Type__c}
{!pharos__Log__c.pharos__Details__c}
```

#### Trace Results tab

Email uses a dedicated template; Slack and Teams share a shorter one. Both are reproduced in [Trace Result Notifications → Message Template](https://docs.pharos.ai/configuration-guide/notifications/trace-results.md#message-template).

### Template Tips

* **Single-org setups:** Remove `{!pharos__Issue__c.pharos__Organization_Name__c}` from the subject—it adds no value when you only have one org.
* **Update rules:** Include evolving fields: Log Count, Frequency, Impacted Users, First Occurred Date, Last Occurred Date.
* **Slack:** Avoid including the full description or stack trace—Slack displays everything without truncation, which creates long, cluttered messages. A link to the issue is more effective.
* **Teams:** Including the description is acceptable—Teams collapses long content with an expand option.

***

## Slack

Slack notifications post a message to a Slack channel or direct message. This is the recommended channel for most teams.

![Slack notification action configuration](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-c6eebc3d1ce5bed023832be347a6fd6b71595fcd%2Fslack-notification-details.png?alt=media)

### Fields

| Field          | Required | Description                                                               |
| -------------- | -------- | ------------------------------------------------------------------------- |
| **Subject**    | Yes      | Appears as the notification header. Supports merge fields.                |
| **Channel(s)** | Yes      | The Slack channel to post to. Select from dropdown or paste a channel ID. |
| **Body**       | Yes      | The message body. Supports merge fields.                                  |

### Channel Selection

* **Public channels:** Usually appear in the dropdown automatically
* **Private channels:** May not appear in the dropdown. Use the **channel ID** instead (see below)
* **Large workspaces (5,000+ channels):** The dropdown may be empty or incomplete due to Slack API rate limits. Use the channel ID.

**Finding the channel ID:**

1. Open the channel in Slack
2. Click the channel name → **View channel details**
3. Scroll to the bottom — the **Channel ID** is displayed (e.g., `C01234567AB`)
4. Copy and paste it into the Channel(s) field in Pharos

{% hint style="info" %}
For private channels, you must first invite the Pharos app using `/invite @Pharos` in the channel. Without this step, Pharos cannot post messages to the channel.
{% endhint %}

### Slack Formatting Tips

* Keep messages concise—Slack does **not** truncate long messages
* Include the issue link so readers can click through for full details
* Avoid including the full `{!pharos__Issue__c.pharos__Description__c}` field—stack traces and flow descriptions can make messages very long and hard to read
* Slack supports basic markdown: `*bold*`, `_italic_`, and `` `code` ``

→ [Learn more: Slack channel capabilities](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/notification-channels/slack.md)

***

## Teams

Teams notifications post a message to a Microsoft Teams channel. Configuration is similar to Slack but with Teams-specific channel selection.

![Teams notification action configuration](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-53095e8b5f89ed79ff1fc322d1aa7af75353ed07%2Fteams-notification-details.png?alt=media)

### Fields

| Field       | Required | Description                                                |
| ----------- | -------- | ---------------------------------------------------------- |
| **Subject** | Yes      | Appears as the notification header. Supports merge fields. |
| **Team**    | Yes      | Select the Microsoft Teams team from the dropdown.         |
| **Channel** | Yes      | Select the channel within the selected team.               |
| **Body**    | Yes      | The message body. Supports merge fields.                   |

### Teams vs. Slack Differences

* **Long messages:** Teams collapses long messages with an expand option, so including the full description is acceptable (unlike Slack, where it creates clutter)
* **Channel selection:** Teams channels typically populate in the dropdown without the ID workaround
* **Integration:** Requires Microsoft Entra ID (formerly Azure AD) / Microsoft admin coordination for initial setup; see [Teams Integration](https://docs.pharos.ai/configuration-guide/integrations/teams.md)

{% hint style="info" %}
After a sandbox refresh, Teams notifications may continue to work because the authentication tokens are retained. However, review and update channel targets to ensure sandbox notifications don't post to production channels.
{% endhint %}

→ [Learn more: Teams channel capabilities](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/notification-channels/teams.md)

***

## Email

Email notifications send messages to specified email addresses. Available without any external integration—Email uses Salesforce's built-in email delivery.

![Email notification action configuration](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-a9131e890a594ac5cc59e003e02b948e91a73308%2Femail-notification-details.png?alt=media)

### Fields

| Field                 | Required | Description                                                  |
| --------------------- | -------- | ------------------------------------------------------------ |
| **Subject**           | Yes      | Email subject line. Supports merge fields.                   |
| **To**                | Yes      | Recipient email address (e.g., `admin@mysalesforceorg.com`)  |
| **CC**                | No       | CC recipients                                                |
| **Email Template Id** | No       | Salesforce email template ID for branded formatting          |
| **Contact Id**        | No       | Salesforce Contact ID for recipient context                  |
| **Message**           | Yes      | Email body with rich text formatting. Supports merge fields. |

On a **Trace Results** rule, Subject and Message prefill with a template built for trace results — Issue name and summary in the subject; trace result link, issue link, category, functional area, and the trace window in the body. See [Trace Result Notifications → Email default](https://docs.pharos.ai/configuration-guide/notifications/trace-results.md#email-default).

### When to Use Email

* Recipients who don't have access to Slack or Teams
* Compliance or audit requirements that need email records
* Fallback notifications alongside a primary Slack/Teams action

{% hint style="warning" %}
**Email is not recommended as the primary notification channel.** Messenger-based notifications (Slack, Teams) are more effective for real-time awareness—they keep alerts where teams already work and support direct links. Email notifications can be noisy and are easy to overlook in busy inboxes.
{% endhint %}

### Email Template Tips

* The message body supports rich text formatting (bold, italic, alignment, lists)
* Use the **Email Template Id** field to apply a branded Salesforce email template for consistent formatting
* Keep the message short—include the summary, link, and key context fields

→ [Learn more: Email channel capabilities](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/notification-channels/email.md)

***

## PagerDuty

PagerDuty notifications create incidents or trigger events in PagerDuty for on-call escalation. Use PagerDuty for critical issues that require immediate human response.

![PagerDuty notification action configuration](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-4139ea3f82c15254138484623509e115c5dca651%2Fpagerduty-notification-details.png?alt=media)

### Fields

| Field       | Required | Description                                                |
| ----------- | -------- | ---------------------------------------------------------- |
| **Subject** | Yes      | Incident summary. Supports merge fields.                   |
| **Type**    | Yes      | PagerDuty event type—select **Incident** from the dropdown |
| **Message** | Yes      | Incident body with details. Supports merge fields.         |

### When to Use PagerDuty

* **Critical production issues** that require immediate investigation (e.g., payment processing failures, authentication outages)
* **On-call escalation** where someone needs to be paged outside business hours
* **Severity-based routing** as part of a tiered notification strategy

### Configuration Tips

* **Use PagerDuty sparingly.** Reserve it for truly critical issues to avoid on-call fatigue. Pair with specific filter criteria (e.g., Functional Area = "Payments" or Priority = "Highest").
* **Combine with Slack.** A common pattern is to send both a PagerDuty incident and a Slack message from the same rule—PagerDuty pages the on-call, Slack gives the team awareness.
* **Subject field matters.** Make the subject actionable and specific so the on-call engineer understands the urgency immediately. Include the issue name and context (e.g., `{!pharos__Issue__c.Name} occurrence has passed critical levels - investigate immediately`).

→ [Learn more: PagerDuty channel capabilities](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/notification-channels/pagerduty.md)

***

## Webhook

Webhook notifications send an HTTP request to an external URL when the rule fires. This is the most flexible action type—use it to integrate Pharos with any external system that accepts HTTP requests.

![Webhook notification action configuration](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-edad0629f557410c382128b8d598d1043832991a%2Fwebhook-notification-details.png?alt=media)

### Fields

| Field                    | Required | Description                                                                                                                                                      |
| ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Webhook URL**          | Yes      | The endpoint URL to send the request to                                                                                                                          |
| **HTTP Method**          | Yes      | HTTP method (e.g., **POST**)                                                                                                                                     |
| **Body Template (JSON)** | Yes      | JSON payload with merge fields for dynamic data                                                                                                                  |
| **Authentication Type**  | No       | Authentication method—**None**, **Basic**, **Bearer**, **API Key**, or **Custom**                                                                                |
| **Authentication Value** | No       | Credential value for the selected authentication type (e.g., Base64-encoded `username:password` for Basic, a token for Bearer/API Key, or a custom header value) |
| **Headers**              | No       | Custom HTTP headers (e.g., `Content-Type: application/json`)                                                                                                     |

### Body Template

The body template is a JSON structure that supports merge fields. Use the **Insert Field** button to add dynamic values.

**Example JSON body:**

```json
{
  "event": "issue_updated",
  "category": "{!pharos__Issue__c.pharos__Category__c}",
  "status": "{!pharos__Issue__c.pharos__Status__c}",
  "summary": "{!pharos__Issue__c.pharos__Summary__c}",
  "description": "{!pharos__Issue__c.pharos__Description__c}",
  "link": "{!pharos__Issue__c.Link}"
}
```

### Authentication

* **Basic:** Provide a Base64-encoded `username:password` value. The request will include an `Authorization: Basic <value>` header.
* **Bearer:** Provide a token value. The request will include an `Authorization: Bearer <value>` header.
* **API Key:** Provide the key value; it is sent as a header for endpoints that authenticate via a static API key.
* **Custom:** Provide a custom header value for endpoints with non-standard authentication schemes.
* **None:** Leave the authentication fields empty for public or internally secured endpoints.

### Headers

Click **Add Header** to include custom HTTP headers. Common headers:

| Header           | Value              | Purpose                      |
| ---------------- | ------------------ | ---------------------------- |
| `Content-Type`   | `application/json` | Standard for JSON payloads   |
| `X-Custom-Token` | Your token value   | Custom authentication tokens |

### Use Cases

* **Custom ticketing systems** not natively supported by Pharos
* **Internal dashboards** that aggregate alerts from multiple sources
* **Automation platforms** (Zapier, Make, n8n) for downstream workflows
* **Monitoring aggregators** that centralize alerts across tools
* **Custom Slack/Teams bots** that need structured data rather than pre-formatted messages

→ [Learn more: Webhook channel capabilities](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/notification-channels/webhooks.md)

***

## Reusing Notification Actions

When adding an action to a rule, you can click **Add Existing** to reuse a notification action that was previously created. This is useful when multiple rules need to send to the same channel with the same template—you define the action once and attach it to multiple rules.

If you later update the shared action's template, all rules that reference it will use the updated template.

***

## Choosing the Right Channel

| Scenario                                    | Recommended Channel                    |
| ------------------------------------------- | -------------------------------------- |
| Day-to-day production monitoring            | Slack or Teams                         |
| On-call escalation for critical issues      | PagerDuty + Slack                      |
| Reaching non-technical stakeholders         | Email                                  |
| Integration with external systems           | Webhook                                |
| Sending to multiple audiences from one rule | Multiple actions (e.g., Slack + Email) |

{% hint style="success" %}
**Start with Slack or Teams.** Most teams find that a single Slack or Teams channel covers 90% of their notification needs. Add PagerDuty for critical escalation and Email for non-technical stakeholders as you refine your setup.
{% endhint %}

***

{% hint style="info" %}
**Related:** [Notifications Overview](https://docs.pharos.ai/configuration-guide/notifications.md) — Rule framework and common principles · [Integrations](https://docs.pharos.ai/configuration-guide/integrations.md) — Channel setup and authentication · [Notification Charts](https://docs.pharos.ai/configuration-guide/advanced/notification-charts.md) — Embed charts in notification messages
{% endhint %}
