ArchActionCallLexBot(coreLexActionViewModel)

new ArchActionCallLexBot(coreLexActionViewModel)

The Architect Scripting class that represents the Call Lex Bot action. Instances of this action should be created by calling ArchFactoryActions#addActionCallLexBot

Parameters:
Name Type Description
coreLexActionViewModel Object

( Internal ) an Architect core Call Lex Bot action view model.

See:

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchActionCallLexBot'.

readonly intentSlots :ArchNamedValueList

The collection of intents and their slots into which variables can be assigned. To access an intent, you can use the getNamedValueByName function on this property and pass in the name of the intent you want to access. That intent will contain its slots, which you can access also via getNamedValueByName.

Inherited From:

readonly isArchActionCallLexBot :boolean

Returns true indicating that this is an ArchActionCallLexBot instance.

readonly isArchBaseActionLex :boolean

Returns true indicating that this is an ArchBaseActionLex instance.

Inherited From:

readonly lexBotOutputsFailure :ArchNamedValueList

The contents of this named value list come from the Failure Outputs schema. It will contain two values: errorType and errorMessage. These values will be returned by the server if the action takes the Failure path.

Inherited From:

readonly startAudio :ArchAudio

The audio that plays before invoking the bot

Methods

setLexBotAliasByIdAsync(lexBotAliasId, callbackFunctionopt) → {Promise.<ArchActionCallLexBot>}

This sets the Lex bot alias to call at runtime by its identifier.

Parameters:
Name Type Attributes Description
lexBotAliasId string

the identifier of the Lex bot alias.

callbackFunction callbackArchActionCallLexBot <optional>

a callback function to call if the Lex bot alias is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Lex Bot action instance.

Returns:
Promise.<ArchActionCallLexBot>

setLexBotAliasByNameAsync(aliasName, botNameOrId, searchByBotNameopt, callbackFunctionopt) → {Promise.<ArchActionCallLexBot>}

This sets the Lex Bot Alias to call at runtime by its name.

Parameters:
Name Type Attributes Default Description
aliasName string

the name of the Lex Alias to set. The name is not case sensitive on the lookup.

botNameOrId string

the name or identifier of the Lex Bot associated with the Lex Bot alias. If a name, the name lookup is not case sensitive.

searchByBotName boolean <optional>
false

boolean that indicates whether to treat the botNameOrId parameter as a bot name or bot identifier. True indicates that the botNameOrId value should be treated as a bot name so a name lookup is performed to find the Lex Bot. False indicates that botNameOrId should be treated as an identifier so the Lex Bot is looked up by the identifier value specified in the botNameOrId parameter.

callbackFunction callbackArchActionCallLexBot <optional>

a callback function to call if the Lex Bot and Lex Alias are successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Lex Bot action instance.

Returns:
Promise.<ArchActionCallLexBot>