new abstract ArchBaseActionDialogflow(coreDialogflowActionViewModel)
The Architect Scripting class for the base Dialogflow Action instance. Instances of this class will be created automatically by Architect Scripting as needed.
Parameters:
| Name | Type | Description |
|---|---|---|
coreDialogflowActionViewModel |
Object | ( Internal ) an Architect core Dialogflow action view model. |
Extends
Members
-
static, readonly draftEnvironmentName :string
-
Returns the string 'Draft', which is the name for the Draft environment on a Dialogflow agent
-
readonly dialogflowOutputsFailure :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.
-
environment :string
-
Returns the environment selected to be used when calling the selected Agent.
-
readonly eventName :ArchValueString
-
The initial event name to pass in to the Dialogflow agent.
-
readonly followupResponseTimeout :ArchValueDuration
-
Specifies the amount of time to wait for a user's response to a bot prompt. A negative or NOT_SET duration will be treated as immediate.
- Inherited From:
-
readonly inputText :ArchValueString
-
The input text for the bot. This is usually only set in flows when chaining bot actions together.
- Inherited From:
-
integrationName :string
-
Returns the integration name for the currently selected Dialogflow agent.
-
readonly intentNames :Array.<string>
-
Returns a unique array of names of intents that are configured for the selected bot. This array contains intent names for the bot that will be executed at flow runtime. As such, for some bots like Lex bots, this requires selecting the Lex bot alias since intents are defined on the alias prior to this array being populated.
- Inherited From:
-
readonly isArchBaseActionDialogflow :boolean
-
Returns true indicating that this is an ArchBaseActionDialogflow instance.
-
readonly sessionVariables :ArchBaseNameValuePairs
-
Returns the input Session Variables configured on the action.
- Inherited From:
Methods
-
addSessionParameterNameValuePair(nameLiteralopt, valueExpressionopt) → {ArchBaseNameValuePair}
-
This adds a session parameter name value pair to the Call Dialogflow CX Bot action that is used to specify the session parameter''s name and corresponding value that should be assigned to it. This function functions the same as
ArchBaseActionBot#addSessionVariableNameValuePairand exists because Session Variables are called Session Parameters in Dialogflow CX. On the returnedArchBaseNameValuePair:Parameters:
Name Type Attributes Description nameLiteralstring <optional>
a string that specifies the name of the session parameter to set.
valueExpressionstring <optional>
a string expression that specifies the value to set on the session parameter.
Returns:
ArchBaseNameValuePair- Inherited From:
-
addSessionVariableNameValuePair(nameLiteralopt, valueExpressionopt) → {ArchBaseNameValuePair}
-
This adds a session variable name value pair to the Base Bot action that can be used to specify the session variable's name and corresponding value that should be assigned to it. On the returned
ArchBaseNameValuePairpair:Parameters:
Name Type Attributes Description nameLiteralstring <optional>
a string that specifies the name of the session variable to set.
valueExpressionstring <optional>
a string expression that specifies the value to set on the session variable.
Returns:
ArchBaseNameValuePair -
getOutputByIntentName(intentName) → {ArchActionOutput}
-
This gets an action output for this action that matches an intent name. It will not return the built-in Failure output.
Parameters:
Name Type Description intentNamestring the name of the intent whose matching output to find
Returns:
ArchActionOutput- Inherited From:
-
setDialogflowAgentByIdAsync(dialogflowAgentId, callbackFunctionopt) → {Promise.<ArchBaseActionDialogflow>}
-
This sets the Dialogflow agent to call at runtime by its identifier. The Draft environment will be selected when calling this function.
Parameters:
Name Type Attributes Description dialogflowAgentIdstring the identifier of the Dialogflow agent
callbackFunctioncallbackArchBaseActionDialogflow <optional>
a callback function to call if the Dialogflow agent is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Dialogflow Bot action instance.
Returns:
Promise.<ArchBaseActionDialogflow> -
setDialogflowAgentByIdWithEnvironmentAsync(dialogflowAgentId, environmentName, callbackFunctionopt) → {Promise.<ArchBaseActionDialogflow>}
-
This sets the Dialogflow agent to call at runtime by its identifier and sets the environment to use by its name.
Parameters:
Name Type Attributes Description dialogflowAgentIdstring the identifier of the Dialogflow agent
environmentNamestring the name of the Dialogflow agent's environment to use. If no value is passed, 'Draft' will be used.
callbackFunctioncallbackArchBaseActionDialogflow <optional>
a callback function to call if the Dialogflow agent is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Dialogflow Bot action instance.
Returns:
Promise.<ArchBaseActionDialogflow> -
setDialogflowAgentByNameAsync(agentName, projectIdopt, callbackFunctionopt, integrationNameopt) → {Promise.<ArchBaseActionDialogflow>}
-
This sets the Dialogflow agent to call at runtime by its name. The Draft environment will be selected when calling this function.
Parameters:
Name Type Attributes Description agentNamestring the name of the Dialogflow agent to set.
projectIdstring <optional>
optional parameter for filtering by the agent's project ID.
callbackFunctioncallbackArchBaseActionDialogflow <optional>
a callback function to call if the Dialogflow agent is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Dialogflow Bot action instance.
integrationNamestring <optional>
optional parameter for filtering by the agent's integration name.
Returns:
Promise.<ArchBaseActionDialogflow> -
setDialogflowAgentByNameWithEnvironmentAsync(agentName, environmentName, projectIdopt, callbackFunctionopt, integrationNameopt) → {Promise.<ArchBaseActionDialogflow>}
-
This sets the Dialogflow agent to call at runtime by its name and sets the environment to use by its name.
Parameters:
Name Type Attributes Description agentNamestring the name of the Dialogflow agent to set.
environmentNamestring the name of the Dialogflow agent's environment to use. If no value is passed, 'Draft' will be used.
projectIdstring <optional>
optional parameter for filtering by the agent's project ID.
callbackFunctioncallbackArchBaseActionDialogflow <optional>
a callback function to call if the Dialogflow agent is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Call Dialogflow Bot action instance.
integrationNamestring <optional>
optional parameter for filtering by the agent's integration name.
Returns:
Promise.<ArchBaseActionDialogflow>