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

# IAutomationDialogCallbacks

- 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/shared/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).
> 

Lifecycle callbacks shared by the alerting and scheduled email create/edit dialogs.

**Signature:**

```typescript
export interface IAutomationDialogCallbacks 
```

## Remarks

There is no pre-backend observer callback: the observation seam is the dialog context accessors and the caller-owned submit hook.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [onCancel?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksoncancel) |  | () =&gt; void | **_(BETA)_** _(Optional)_ Called when the user dismisses the dialog without saving. |
| [onCreateError?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksoncreateerror) |  | (error: [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called when creating a new automation on the backend fails, with the error. |
| [onCreateSuccess?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksoncreatesuccess) |  | (automation: [IAutomationMetadataObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationmetadataobject/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called after a new automation has been created on the backend, with the created automation. |
| [onDeleteError?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksondeleteerror) |  | (error: [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called when deleting the automation from the backend (or unsubscribing from it) fails, with the error. |
| [onDeleteSuccess?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksondeletesuccess) |  | (automation: [IAutomationMetadataObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationmetadataobject/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called after the automation has been deleted from the backend, or unsubscribed from when the current user may not delete it, with that automation. |
| [onUpdateError?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksonupdateerror) |  | (error: [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called when updating an existing automation on the backend fails, with the error. |
| [onUpdateSuccess?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iautomationdialogcallbacks/index.md#iautomationdialogcallbacksonupdatesuccess) |  | (automation: [IAutomationMetadataObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationmetadataobject/index.md)) =&gt; void | **_(BETA)_** _(Optional)_ Called after an existing automation has been updated on the backend, with the updated automation. |

## Property details

### IAutomationDialogCallbacks.onCancel

> **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).
> 

Called when the user dismisses the dialog without saving.

**Signature:**

```typescript
onCancel?: () => void;
```

### IAutomationDialogCallbacks.onCreateError

> **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).
> 

Called when creating a new automation on the backend fails, with the error.

**Signature:**

```typescript
onCreateError?: (error: GoodDataSdkError) => void;
```

### IAutomationDialogCallbacks.onCreateSuccess

> **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).
> 

Called after a new automation has been created on the backend, with the created automation.

**Signature:**

```typescript
onCreateSuccess?: (automation: IAutomationMetadataObject) => void;
```

### IAutomationDialogCallbacks.onDeleteError

> **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).
> 

Called when deleting the automation from the backend (or unsubscribing from it) fails, with the error.

**Signature:**

```typescript
onDeleteError?: (error: GoodDataSdkError) => void;
```

### IAutomationDialogCallbacks.onDeleteSuccess

> **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).
> 

Called after the automation has been deleted from the backend, or unsubscribed from when the current user may not delete it, with that automation.

**Signature:**

```typescript
onDeleteSuccess?: (automation: IAutomationMetadataObject) => void;
```

### IAutomationDialogCallbacks.onUpdateError

> **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).
> 

Called when updating an existing automation on the backend fails, with the error.

**Signature:**

```typescript
onUpdateError?: (error: GoodDataSdkError) => void;
```

### IAutomationDialogCallbacks.onUpdateSuccess

> **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).
> 

Called after an existing automation has been updated on the backend, with the updated automation.

**Signature:**

```typescript
onUpdateSuccess?: (automation: IAutomationMetadataObject) => void;
```
