---
title: ChannelPreviewResult
slug: data-platform/connect-platform/app-sdk-api-reference-classes-channelpreviewresult
docTags: 
createdAt: 2026-08-05T20:06:37.104Z
---

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT)

***

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT) / ChannelPreviewResult

# Class: ChannelPreviewResult

Defined in: [src/app/lib/ChannelPreviewResult.ts:26](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L26)

Result of [Channel.preview](docId:9MPJ0gwsoXoAubpkwFgyD). All previews must be a full HTML page. There must be exactly one preview per
recipient, and they must be added to this result in the same order as the recipients were given to
[Channel.preview](docId:9MPJ0gwsoXoAubpkwFgyD).

## Extends

- [`` `FormResult` ``](docId:-r0C81fTwTqoXjXByTdja)

## Constructors

### Constructor

:::BlockQuote
**new ChannelPreviewResult**(`previews?`): `ChannelPreviewResult`
:::

Defined in: [src/app/lib/ChannelPreviewResult.ts:33](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L33)

### Parameters

### previews?

`string`\[]

the complete set of HTML previews, if already known

### Returns

`ChannelPreviewResult`

### Overrides

[`` `FormResult` ``](docId:-r0C81fTwTqoXjXByTdja).[`` `constructor` ``](<./#function Object() \{ \[native code] }>)

## Properties

### errors

:::BlockQuote
`protected` **errors**: `object` = `{}`
:::

Defined in: [src/app/lib/FormResult.ts:4](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/FormResult.ts#L4)

### Index Signature

\[`field`: `string`]: `string`\[]

### Inherited from

[`` `FormResult` ``](docId:-r0C81fTwTqoXjXByTdja).[`` `errors` ``](docId\:GWRZD0rP4MVXA78SMqQul)

***

### toasts

:::BlockQuote
`protected` **toasts**: `object`\[] = `[]`
:::

Defined in: [src/app/lib/FormResult.ts:5](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/FormResult.ts#L5)

### intent

:::BlockQuote
**intent**: [`` `Intent` ``](docId:_9hudfE1-ZW7RrTE5XYot)
:::

### message

:::BlockQuote
**message**: `string`
:::

### Inherited from

[`` `FormResult` ``](docId:-r0C81fTwTqoXjXByTdja).[`` `toasts` ``](docId\:GWRZD0rP4MVXA78SMqQul)

## Methods

### addError()

:::BlockQuote
**addError**(`form`, `section`, `field`, `error`): `this`
:::

Defined in: [src/app/lib/ChannelPreviewResult.ts:72](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L72)

Add an error to display to the user for a particular form field

### Parameters

### form

the type of content form that the error applies to (settings or template)

`"settings"` | `"template"`

### section

`string`

the section within the form that the error applies to

### field

`string`

the field within the section that the error applies to

### error

`string`

message to display to the user

### Returns

`this`

***

### addPreview()

:::BlockQuote
**addPreview**(`preview`): `this`
:::

Defined in: [src/app/lib/ChannelPreviewResult.ts:42](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L42)

Add a single HTML preview

### Parameters

### preview

`string`

to add

### Returns

`this`

***

### addToast()

:::BlockQuote
**addToast**(`intent`, `message`): `this`
:::

Defined in: [src/app/lib/FormResult.ts:13](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/FormResult.ts#L13)

Display a toast to user, such as, "Successfully authenticated with `<Integration>`" or
"Authentication failed, please check your credentials and try again."

### Parameters

### intent

[`` `Intent` ``](docId:_9hudfE1-ZW7RrTE5XYot)

one of the supported intents that will affect how the toast is displayed

### message

`string`

to display in the toast

### Returns

`this`

### Inherited from

[`` `FormResult` ``](docId:-r0C81fTwTqoXjXByTdja).[`` `addToast` ``](docId\:GWRZD0rP4MVXA78SMqQul)

***

### setDisplayOptions()

:::BlockQuote
**setDisplayOptions**(`displayOptions`): `this`
:::

Defined in: [src/app/lib/ChannelPreviewResult.ts:60](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L60)

Set options to control how the preview is displayed

### Parameters

### displayOptions

[`` `PreviewDisplayOptions` ``](docId:11dnthc-w6Yq2ZJqRs1b2)

to control the preview

### Returns

`this`

***

### setPreviews()

:::BlockQuote
**setPreviews**(`previews`): `this`
:::

Defined in: [src/app/lib/ChannelPreviewResult.ts:51](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/app/lib/ChannelPreviewResult.ts#L51)

Provide the complete set of HTML previews

### Parameters

### previews

`string`\[]

to provide

### Returns

`this`
