Skip to main content

ChannelActionRequest

Stentor API Reference


Stentor API Reference / stentor-models/src / ChannelActionRequest

Interface: ChannelActionRequest

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:13

Beta

A user initiated action performed on the channel. The most common is opening a URL.

This can be used to provide a follow up response to the user performing an action or simply for keeping track of if the URL opened.

This is new and subject to change

Extends​

Properties​

type​

type: "CHANNEL_ACTION_REQUEST"

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:14

Beta

Type of the request.

Overrides​

BaseRequest.type


sessionId?​

optional sessionId: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:18

Beta

The current session ID


action​

action: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:22

Beta

Action taken


referenceId?​

optional referenceId: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:26

Beta

Optional, reference ID passed back.


uri?​

optional uri: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:32

Beta

Optional, used differently depending on the action.

Use this for "OPEN_URL" action types.


feedback?​

optional feedback: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:37

Beta

Optional, used to provide feedback on a posed question such as "How would you rate this experience?" or "Was the response relevant?"


detail?​

optional detail: string

Defined in: packages/stentor-models/src/Request/ChannelActionRequest.ts:41

Beta

Optional, open ended detail, can be used for stringified JSON or notes from the end user.


overrideKey?​

optional overrideKey: string

Defined in: packages/stentor-models/src/Request/Request.ts:35

Beta

Used during forwarding and redirecting the request to another handler. When set it pulls content or paths for this key instead of for the request.

Inherited from​

BaseRequest.overrideKey


createdTime?​

optional createdTime: string

Defined in: packages/stentor-models/src/Request/Request.ts:39

Beta

When the message was created, an ISO-8601 compatible date time string

Inherited from​

BaseRequest.createdTime


userId​

userId: string

Defined in: packages/stentor-models/src/Request/Request.ts:43

Beta

ID for the user making the request.

Inherited from​

BaseRequest.userId


deviceId?​

optional deviceId: string

Defined in: packages/stentor-models/src/Request/Request.ts:47

Beta

Unique identifier provided by the channel for the user's current device.

Inherited from​

BaseRequest.deviceId


requestId?​

optional requestId: string

Defined in: packages/stentor-models/src/Request/Request.ts:51

Beta

Optional unique identifier for the request provided by the channel.

Inherited from​

BaseRequest.requestId


anonymous?​

optional anonymous: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:58

Beta

The user is anonymous, or a guest.

The user either does not yet have a verified identity or have chosen to not have any data saved about them.

Inherited from​

BaseRequest.anonymous


isNewSession?​

optional isNewSession: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:62

Beta

Is the request a new session.

Inherited from​

BaseRequest.isNewSession


accessToken?​

optional accessToken: string

Defined in: packages/stentor-models/src/Request/Request.ts:66

Beta

Access token from account linking

Inherited from​

BaseRequest.accessToken


apiAccess?​

optional apiAccess: ApiAccessData

Defined in: packages/stentor-models/src/Request/Request.ts:71

Beta

API access data from the platform In case there is an APIs that provides services like list management, messaging...

Inherited from​

BaseRequest.apiAccess


rawQuery?​

optional rawQuery: string

Defined in: packages/stentor-models/src/Request/Request.ts:75

Beta

Raw speech to text (STT) query, not available on all platforms.

Inherited from​

BaseRequest.rawQuery


platform?​

optional platform: string

Defined in: packages/stentor-models/src/Request/Request.ts:82

Beta

The platform the request came from.

Example platforms are Google's Dialogflow & Amazon's Lex.

Inherited from​

BaseRequest.platform


channel?​

optional channel: string

Defined in: packages/stentor-models/src/Request/Request.ts:86

Beta

The specific channel that the platform provides.

Inherited from​

BaseRequest.channel


device?​

optional device: Device

Defined in: packages/stentor-models/src/Request/Request.ts:93

Beta

Information about the device as far as capabilities such as screen or web browser available.

This information is available in two places, also on the context object, until it is removed from the context in the next major release.

Inherited from​

BaseRequest.device


locale?​

optional locale: Locale

Defined in: packages/stentor-models/src/Request/Request.ts:100

Beta

User's locale, such as us-EN and es-MX.

Possible values for Alexa are defined here: https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#request-locale Possible values for Dialogflow are defined here: https://dialogflow.com/docs/reference/language

Inherited from​

BaseRequest.locale


isBargeIn?​

optional isBargeIn: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:106

Beta

Is the request a barge in

Currently only set on Google and Dialogflow request

Inherited from​

BaseRequest.isBargeIn


isHealthCheck?​

optional isHealthCheck: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:112

Beta

Is the request a health check.

Currently only Google and Dialogflow perform health checks.

Inherited from​

BaseRequest.isHealthCheck


attributes?​

optional attributes: Record\<string, unknown>

Defined in: packages/stentor-models/src/Request/Request.ts:125

Beta

Optional request attributes to be passed through on the request.

If the channel supports it, it will be populated.

Some common keys that are use are, all optional:

  • currentUrl - For channels installed on websites, contains window.location.href information on where the user is
  • isLocal - Boolean for if the currentUrl is to localhost. If it is true then most likely currentUrl will be undefined.
  • environment - Used to override the environment

Inherited from​

BaseRequest.attributes