ArchActionDigitalMenu(coreDigitalMenuActionViewModel)

new ArchActionDigitalMenu(coreDigitalMenuActionViewModel)

The Architect Scripting class that represents the Digital Menu action. Instances of this action should be created by calling ArchFactoryActions#addActionDigitalMenu

Parameters:
Name Type Description
coreDigitalMenuActionViewModel Object

( Internal ) an Architect core Digital Menu action view model.

See:

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchActionDigitalMenu'.

choices :Array.<ArchValueChoice>

Returns an array of ArchValueChoice[choices] from the ArchValueChooser on the Digital Menu action. These choices are literals only.

readonly chooser :ArchValueChooser

Specify menu choices to offer the participant and how to present them here.

customizeNoMatch :ArchValueBoolean

If this property is set to true, the ArchActionDigitalMenu#noMatchReprompts communication collection will be used for No Match prompts. Otherwise, the ArchActionDigitalMenu#noMatch communication will be used.

hasFakeDisconnectOutput :boolean

True when this action models a "Disconnect" output in the UI that is not a real, scriptable branch. See ArchBaseActionWithOutputsFakeDisconnect.

Inherited From:

hasFakeSuccessOutput :boolean

True when this action models a "Success" output in the UI that is not a real, scriptable branch (e.g. some transfer actions). See ArchBaseActionWithOutputsFakeSuccessFailure.

Inherited From:

readonly isArchActionDigitalMenu :boolean

Returns true indicating that this is an ArchActionDigitalMenu instance.

readonly knowledgeSearchResult :ArchValueKnowledgeBaseDocumentCollection

The variable that holds the collection of KnowledgeBaseDocument objects matched in the search that occurs at this action. If 'Standard' knowledge handling is selected then the search results collection will only ever contain the article shown to the user. If 'Custom' knowledge handling is selected then the results collection may contain multiple articles that strongly match the search.

readonly noMatch :ArchValueCommunication

The communication to use when no matching input is received

noMatchReprompts :ArchValueCommunicationCollection

The No Match Reprompts collection of communications for the action. In order to use this property, ArchActionDigitalMenu#customizeNoMatch must be set to true. To have no, No Match re-prompting, set this to an empty collection.

readonly outputCount :number

Returns the number of outputs on this action. For actions that have a fake success output like what you see on the various transfer actions, that will be included in the count to be consistent with the Architect UI. Attempting to get the output count on a menu choice's action such as such as the ArchMenuTransferToAcd#actionTransferToAcd action on an ArchMenuTransferToAcd menu will return 0.

Inherited From:

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.

readonly outputs :Array.<ArchActionOutput>

Returns an array of action outputs for this action. Remember that it is possible to have an undefined item in the returned ArchActionOutput array. This is true when the output is "fake". Accessing the outputs on a menu choice's action such as ArchMenuTransferToAcd#actionTransferToAcd will return an empty array.

Inherited From:

readonly question :ArchValueCommunication

The question to ask the user when this action is executed

readonly selection :ArchValueString

The variable that holds the value of the menu choice chosen by the participant. If no choice is selected by the participant, no updates are made to the variable bound to this setting.

Methods

addChoice(name) → {ArchValueChoice}

Adds a choice to the Digital Menu action. This function returns the choice value that was added.

Parameters:
Name Type Description
name string

the name of the choice. Any leading / trailing whitespace on the name will automatically be removed. Choice names must be at least one character in length.

Returns:
ArchValueChoice

deleteChoiceByIndex(index) → {void}

Deletes a case from the Digital Menu action at the specified index.

Parameters:
Name Type Description
index number

the zero based index of the choice to delete. This value should be a non-negative integer. For example: for the first choice, pass in 0.

Returns:
void

getChoiceByIndex(index) → {ArchValueChoice}

Returns a choice from the ArchValueChooser from the Digital Menu action at the specified index. This function will only return a choice that is in literal mode.

Parameters:
Name Type Description
index number

the zero based index of the choice to delete. This value should be a non-negative integer. For example: for the first choice, pass in 0.

Returns:
ArchValueChoice

getOutputById(output) → {ArchActionOutput}

Gets an output by its identifier. If it cannot be found, this method will throw. Normally you won't need to use this method and will use the helper methods available on inheriting classes when accessing pre-defined outputs like success, failure, timeout, etc. etc. Attempting to get an output by id on a menu choice's action such as the ArchMenuTransferToAcd#actionTransferToAcd action on an ArchMenuTransferToAcd menu will return nothing.

Parameters:
Name Type Description
output string | ArchBranch

identifies output you want to obtain. If output is an ArchBranch instance, the ArchBranch#outputId value will be used. Otherwise valid string identifier values can be found in ArchEnums#OUTPUT_IDS or can be a guid. Remember that requesting the 'success' output on an action with a fake success output will return nothing.

Returns:
ArchActionOutput
Inherited From:

getOutputByIndex(index) → {ArchActionOutput}

Returns the output at the given index. It's important to note that on actions that have a fake success output if you request the output at the index for the fake success, you will get nothing returned because the fake success output isn't something that you should do anything with. Attempting to access an output by index on a menu choice's action such as ArchMenuTransferToAcd#actionTransferToAcd will return nothing.

Parameters:
Name Type Description
index number

the index of the output to retrieve. This value should be a non-negative integer.

Returns:
ArchActionOutput
Inherited From:

getOutputByName(output, wantDynamicOutputopt) → {ArchActionOutput}

Gets an output by its identifier. If it cannot be found, this method will throw. Normally you won't need to use this method and will use the helper methods available on inheriting classes when accessing pre-defined outputs like success, failure, timeout, etc. etc. Attempting to get an output by id on a menu choice's action such as the ArchMenuTransferToAcd#actionTransferToAcd action on an ArchMenuTransferToAcd menu will return nothing.

Parameters:
Name Type Attributes Default Description
output string | ArchBranch

identifies output you want to obtain by name. If output is an ArchBranch instance, the ArchBranch#name value will be used. Remember that requesting the 'Success' output on an action with a fake success output will return nothing. For non-dynamic outputs, the name should be specified in English.

wantDynamicOutput boolean <optional>
false

because it is possible for some actions to have both a non-dynamic output and a dynamic output with the same name, this boolean will let you specify which output you want. An example of this would be the built in Failure output on a call bot action but that bot also has an intent named Failure so the action has two outputs with the same name of 'Failure'. Only one of those would be a dynamic output and that's the output for the Failure intent, not the built-in Failure action output.

Returns:
ArchActionOutput
Inherited From: