new ArchActionCallLexV2Bot(coreLexActionViewModel)
The Architect Scripting class that represents the Call Lex V2 Bot action.
Instances of this action should be created by calling ArchFactoryActions#addActionCallLexV2Bot
Parameters:
Name | Type | Description |
---|---|---|
coreLexActionViewModel |
Object | ( Internal ) an Architect core Call Lex V2 Bot action view model. |
Extends
Members
-
static, readonly displayTypeName :string
-
Returns the display type name string 'ArchActionCallLexV2Bot'.
-
readonly aliasInitialIntentName :ArchValueString
-
The initial intent to use when invoking the Lex Bot Alias. Set an alias before setting a value on this. This property must be set, and its value must match the name of one of the intents on the action's selected alias.
-
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 isArchActionCallLexV2Bot :boolean
-
Returns true indicating that this is an ArchActionCallLexV2Bot 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 sessionVariableOutputs :ArchBaseNameValuePairs
-
Returns the output Session Variables configured on the action. If you are looking for the input Session Variables, see
ArchBaseActionBot#sessionVariables
.
Methods
-
addSessionVariableOutputNameValuePair(nameLiteralopt, outputVariableopt) → {ArchBaseNameValuePair}
-
This adds an output session name value pair to the Call Lex V2 Bot action that is used to specify the output session property name to retrieve and the corresponding output variable where the value should be stored at runtime. On the returned
ArchBaseNameValuePair
:Parameters:
Name Type Attributes Description nameLiteral
string <optional>
a string that specifies the name of the output session property to retrieve.
outputVariable
string | ArchBaseVariable <optional>
the variable that should hold the value of the session output variable at runtime. For example -> "Flow.MyStringVar"
Returns:
ArchBaseNameValuePair -
setLexBotAliasByIdAsync(lexBotAliasId, botName, botRegion, callbackFunctionopt) → {Promise.<ArchActionCallLexV2Bot>}
-
This sets the Lex V2 bot alias to call at runtime by its identifier.
Parameters:
Name Type Attributes Description lexBotAliasId
string the identifier of the Lex bot alias.
botName
string the name of the Lex bot.
botRegion
string the AWS region in which the bot lives. For example, 'us-east-1'
callbackFunction
callbackArchActionCallLexV2Bot <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.<ArchActionCallLexV2Bot> -
setLexBotAliasByNameAsync(aliasName, botNameOrId, botRegion, aliasLanguageTag, searchByBotNameopt, callbackFunctionopt) → {Promise.<ArchActionCallLexV2Bot>}
-
This sets the Lex V2 bot alias to call at runtime by its name. Note that a region and locale for the alias must be supplied, as multiple bots and aliases with the same name could exist across different regions and with different locales.
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.
botRegion
string the AWS region in which the bot lives. For example, 'us-east-1'
aliasLanguageTag
string the locale string for the language the alias supports. For example, 'en-US'. This will match Architect's locale strings, like
archLanguages.englishUnitedStates.tag
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
callbackArchActionCallLexV2Bot <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.<ArchActionCallLexV2Bot>