ArchActionAskForSlot(coreAskForSlotAction)

new ArchActionAskForSlot(coreAskForSlotAction)

The Architect Scripting class for Ask For Slot action Instances of this action should be created by calling ArchFactoryActions#addActionAskForSlot

Parameters:
Name Type Description
coreAskForSlotAction Object

( Internal ) an Architect core Ask For Slot action.

See:

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchActionAskForSlot'.

readonly _actionTypeId :string

Returns the action type identifier string from actionTypes.js

readonly askResult :ArchBaseValue

The slot variable that will hold the input the user provides for the slot.

readonly chooser :ArchValueChooser

Specify menu choices to offer the participant and how to present them here. Before making calls with this chooser, make sure to set the slot with the setSlot function. A slot must also be configured as a List type.

readonly confirmationMode :ArchValueString

This controls when the bot will confirm the slot value supplied by the participant is correct. If this setting evaluates to "always" at runtime and the participant supplied value is valid then the bot will use the ArchActionAskForSlot#confirmationQuestion communication to confirm the value with the participant. The default value for this setting when new instances of this action is the string literal "never".

readonly confirmationQuestion :ArchValueCommunication

Wording the bot will use to confirm the value supplied by the participant is correct. To access the value supplied by the participant in an expression, use the Slot. variable associated with the slot configured on this action. Remember that the ArchActionAskForSlot#confirmationMode value determines if this communication will be used for confirmation purposes or not. Additionally remember that if the ArchActionAskForSlot#confirmationMode is set to the string literal 'never' or the expression text "never" that this property cannot be set as it is not writable at that time.

readonly continuationPrompt :ArchValueCommunication

The continuation prompt will be used when an AI LLM Slot is selected with manually managed prompting.

readonly continuationReprompts :ArchValueCommunicationCollection

Continuation reprompts supplies wording the bot will use for an AI LLM Slot that is configured with manually managed prompting.

readonly customizeContinuation :ArchValueBoolean

If this property is set to true, the bot will use communication values in the continuationReprompts Communication collection for continuation prompting.

readonly customValidation :ArchValueBoolean

An optional expression that can be configured to specify custom slot data validation logic on this Ask for Slot action. What you'll do with this boolean setting is provide additional validation logic to apply when validating a value in the slot variable associated with the slot configured on this action. If the custom validation setting returns false or a NOT_SET boolean, this means the value is invalid from a validation perspective. If there is no custom validation logic set ( i.e. the ArchValueBoolean's ArchBaseValue#isNoValue property is true ), then there is nothing to process here and it will not fail the value validation at runtime. Remember that custom validation can return to the flow runtime if a value is invalid but there will be other restriction properties that will be involved with validation in addition to this in the future.

readonly grammar :ArchValueGrammar

Gets the grammar configured on this ask For slot action.

readonly isArchActionAskForSlot :boolean

Returns true indicating that this is an ArchActionAskForSlot instance.

readonly outputMaxNoInputs :ArchActionOutput

The Max No Inputs output for this action which will be taken at runtime if the Max No Inputs value is exceeded.

readonly outputMaxNoMatches :ArchActionOutput

The Max No Matches output for this action which will be taken at runtime if the Max No Matches value is exceeded.

question :ArchValueString

The question text for the action.

Inherited From:

readonly repromptHandling :ArchValueString

TODO: (Will be in use in the future, not included in initial release) The reprompt handling will be used when AI LLM Slot is selected (AI/Manually Managed).

readonly speechToTextEngineCompleteTimeout :ArchValueDuration

Sets the value for the duration of silence after a valid recognition has occurred that determines the caller has finished speaking. If this setting is set to 0, the timer will be disabled. If this setting is set to no value, that tells the bot to use the Genesys default settings.

readonly speechToTextEngineConfidenceLevel :ArchValueDecimal

When the score of the first n-best entry is less than the value of confidence level, the recognition will return a no-match. If this setting is set to 0, all utterances are accepted. If this setting is set to no value, that tells the bot to use the Genesys default settings.

readonly speechToTextEngineId :string

Gets the id of the selected grammar-based speech to text engine.

readonly speechToTextEngineName :string

Gets the name of the selected grammar-based speech to text engine.

Methods

setLiteralConfirmationMode(newConfirmationMode)

Helper method to set the confirmation mode to a literal string value. This method will check that the string value passed in the newConfirmationMode parameter is a valid confirmation mode.

Parameters:
Name Type Description
newConfirmationMode string

the confirmation mode to set. The string values in ArchEnums#BOT_CONFIRMATION_MODES lists valid confirmation mode values.

setSlot(slotName, doNotCreateChoicesopt)

Sets the selected slot on the Ask for Slot action. This will also update the ArchActionAskForSlot#askResult property to reference the slot variable that matches the slot provided to this function.

Parameters:
Name Type Attributes Default Description
slotName string

the slot name to set. This will be handled in a case-sensitive manner.

doNotCreateChoices boolean <optional>
false

whether to create the choices for the chooser when setting the slot value. Setting this to true will not create the choices, false will create them, and if nothing is passed in the choices will also be created. A typical use case for not creating the choices is if these are going to be manually created to match the values found on the slot's slot type.

setSpeechToTextEngineByIdAsync(engineId, callbackFunctionopt) → {Promise.<ArchActionAskForSlot>}

Sets the speech to text engine with the specified id for this ask for slot action.

Parameters:
Name Type Attributes Description
engineId string

the identifier of the speech to text engine to set. Only grammar based speech to text engines are allowed.

callbackFunction callbackArchActionAskForSlot <optional>

a function to call if the speech to text engine is successfully looked up and configured on this ask for slot action instance. The first parameter passed to the callback function will be this ask for slot action instance.

Returns:
Promise.<ArchActionAskForSlot>

setSpeechToTextEngineByNameAsync(engineName, callbackFunctionopt) → {Promise.<ArchActionAskForSlot>}

Sets the speech to text engine with the specified name for this supported language setting.

Parameters:
Name Type Attributes Description
engineName string

the name of the speech to text engine to set. Only grammar based speech to text engines are allowed. Speech to text engine name lookups are performed case insensitively.

callbackFunction callbackArchActionAskForSlot <optional>

a function to call if the speech to text engine is successfully looked up and configured on this ask for slot action instance. The first parameter passed to the callback function will be this ask for slot action instance.

Returns:
Promise.<ArchActionAskForSlot>