> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IAlertActionsContextValue

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: interface
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/presentation/automations/alerting/state/types.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The alerting dialog's mutators: the draft setter and every form change-handler.

Changes rarely: `onGranularityChange` is re-created when `triggerIntervalDirty` toggles or the supported measures load.

**Signature:**

```typescript
export interface IAlertActionsContextValue 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [onAnomalyDetectionChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonanomalydetectionchange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md)) =&gt; void | **_(BETA)_** Switches the condition to anomaly detection on the measure. |
| [onAttributeChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonattributechange) |  | (attribute: [AlertAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertattribute/index.md) \| undefined, value: [AttributeValue](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.attributevalue/index.md) \| undefined) =&gt; void | **_(BETA)_** Slices the condition by an attribute value; `undefined` clears the slice. |
| [onComparisonOperatorChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueoncomparisonoperatorchange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md), comparisonOperator: [IAlertComparisonOperator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertcomparisonoperator/index.md)) =&gt; void | **_(BETA)_** Switches the condition to a comparison against a fixed threshold. |
| [onComparisonTypeChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueoncomparisontypechange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md) \| undefined, relativeOperator: [[IAlertRelativeOperator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertrelativeoperator/index.md), [IAlertRelativeArithmeticOperator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertrelativearithmeticoperator/index.md)] \| undefined, comparisonType: [AlertMetricComparatorType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetriccomparatortype/index.md), granularity?: [DateAttributeGranularity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.dateattributegranularity/index.md)) =&gt; void | **_(BETA)_** Sets the period a relative condition compares against (and its granularity when given). |
| [onDestinationChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueondestinationchange) |  | (destinationId: string) =&gt; void | **_(BETA)_** Selects the notification channel; recipients incompatible with it are dropped. |
| [onGranularityChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueongranularitychange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md) \| undefined, granularity: [IAlertAnomalyDetectionGranularity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertanomalydetectiongranularity/index.md)) =&gt; void | **_(BETA)_** Sets the anomaly-detection granularity; derives the trigger interval unless the user edited it. |
| [onMeasureChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonmeasurechange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md)) =&gt; void | **_(BETA)_** Selects the measure the condition targets; resets the comparison to the measure's defaults. |
| [onRecipientsChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonrecipientschange) |  | (recipients: [IAutomationRecipient](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationrecipient/index.md)[]) =&gt; void | **_(BETA)_** Replaces the recipients with the complete updated array. |
| [onRelativeOperatorChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonrelativeoperatorchange) |  | (measure: [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md), relativeOperator: [IAlertRelativeOperator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertrelativeoperator/index.md), arithmeticOperator: [IAlertRelativeArithmeticOperator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertrelativearithmeticoperator/index.md)) =&gt; void | **_(BETA)_** Switches the condition to a relative (change / difference) comparison with the given operators. |
| [onSensitivityChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueonsensitivitychange) |  | (sensitivity: [IAlertAnomalyDetectionSensitivity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialertanomalydetectionsensitivity/index.md)) =&gt; void | **_(BETA)_** Sets the anomaly-detection sensitivity. |
| [onTitleChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueontitlechange) |  | (value: string) =&gt; void | **_(BETA)_** Sets the alert title and re-validates its length. |
| [onTriggerIntervalChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueontriggerintervalchange) |  | (triggerInterval: [IAlertTriggerInterval](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialerttriggerinterval/index.md), dirty?: boolean) =&gt; void | **_(BETA)_** Sets the trigger interval. `dirty` defaults to true; the granularity handler passes false when it derives the interval. |
| [onTriggerModeChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueontriggermodechange) |  | (triggerMode: [IAlertTriggerMode](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ialerttriggermode/index.md)) =&gt; void | **_(BETA)_** Sets when the alert fires: every evaluation or once per interval. |
| [setEditedAutomation](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertactionscontextvalue/index.md#ialertactionscontextvalueseteditedautomation) |  | Dispatch&lt;SetStateAction&lt;[IAutomationMetadataObjectDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationmetadataobjectdefinition/index.md) \| undefined&gt;&gt; | **_(BETA)_** Replaces the draft; the change-handlers below are the preferred, field-scoped writes. |

## Property details

### IAlertActionsContextValue.onAnomalyDetectionChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Switches the condition to anomaly detection on the measure.

**Signature:**

```typescript
onAnomalyDetectionChange: (measure: AlertMetric) => void;
```

### IAlertActionsContextValue.onAttributeChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Slices the condition by an attribute value; `undefined` clears the slice.

**Signature:**

```typescript
onAttributeChange: (attribute: AlertAttribute | undefined, value: AttributeValue | undefined) => void;
```

### IAlertActionsContextValue.onComparisonOperatorChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Switches the condition to a comparison against a fixed threshold.

**Signature:**

```typescript
onComparisonOperatorChange: (measure: AlertMetric, comparisonOperator: IAlertComparisonOperator) => void;
```

### IAlertActionsContextValue.onComparisonTypeChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets the period a relative condition compares against (and its granularity when given).

**Signature:**

```typescript
onComparisonTypeChange: (measure: AlertMetric | undefined, relativeOperator: [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined, comparisonType: AlertMetricComparatorType, granularity?: DateAttributeGranularity) => void;
```

### IAlertActionsContextValue.onDestinationChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Selects the notification channel; recipients incompatible with it are dropped.

**Signature:**

```typescript
onDestinationChange: (destinationId: string) => void;
```

### IAlertActionsContextValue.onGranularityChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets the anomaly-detection granularity; derives the trigger interval unless the user edited it.

**Signature:**

```typescript
onGranularityChange: (measure: AlertMetric | undefined, granularity: IAlertAnomalyDetectionGranularity) => void;
```

### IAlertActionsContextValue.onMeasureChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Selects the measure the condition targets; resets the comparison to the measure's defaults.

**Signature:**

```typescript
onMeasureChange: (measure: AlertMetric) => void;
```

### IAlertActionsContextValue.onRecipientsChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Replaces the recipients with the complete updated array.

**Signature:**

```typescript
onRecipientsChange: (recipients: IAutomationRecipient[]) => void;
```

### IAlertActionsContextValue.onRelativeOperatorChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Switches the condition to a relative (change / difference) comparison with the given operators.

**Signature:**

```typescript
onRelativeOperatorChange: (measure: AlertMetric, relativeOperator: IAlertRelativeOperator, arithmeticOperator: IAlertRelativeArithmeticOperator) => void;
```

### IAlertActionsContextValue.onSensitivityChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets the anomaly-detection sensitivity.

**Signature:**

```typescript
onSensitivityChange: (sensitivity: IAlertAnomalyDetectionSensitivity) => void;
```

### IAlertActionsContextValue.onTitleChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets the alert title and re-validates its length.

**Signature:**

```typescript
onTitleChange: (value: string) => void;
```

### IAlertActionsContextValue.onTriggerIntervalChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets the trigger interval. `dirty` defaults to true; the granularity handler passes false when it derives the interval.

**Signature:**

```typescript
onTriggerIntervalChange: (triggerInterval: IAlertTriggerInterval, dirty?: boolean) => void;
```

### IAlertActionsContextValue.onTriggerModeChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets when the alert fires: every evaluation or once per interval.

**Signature:**

```typescript
onTriggerModeChange: (triggerMode: IAlertTriggerMode) => void;
```

### IAlertActionsContextValue.setEditedAutomation

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Replaces the draft; the change-handlers below are the preferred, field-scoped writes.

**Signature:**

```typescript
setEditedAutomation: Dispatch<SetStateAction<IAutomationMetadataObjectDefinition | undefined>>;
```
