new ArchSettingsEventErrorFlowBot(coreBotErrorHandlingSettingsViewModel)
Creates an instance of an ArchSettingsEventErrorFlowBot. This is the Scripting class that handles bot flow error event handling settings.
Parameters:
Name | Type | Description |
---|---|---|
coreBotErrorHandlingSettingsViewModel |
Object | ( Internal ) an Architect core bot error handling settings view model. |
Extends
Members
-
static, readonly displayTypeName :string
-
Returns the display type name string 'ArchSettingsEventErrorFlow'.
-
readonly agentEscalationConfirmation :ArchValueCommunication
-
Wording the bot will use when the participant has requested to speak to a human and has said yes to the Agent Escalation Confirmation prompt. Once this wording has been communicated, the Bot will Exit back to the calling flow which invoked this Bot flow.
-
readonly agentEscalationHandling :string
-
The agent escalation event handling configured for the flow. The string values in
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
lists valid values.Specifies the bot's behavior when the participant has requested to speak to a human. setting 'Exit the Flow' will return control to the flow which invoked this Bot Flow. setting 'Jump to Reusable Task' will transfer the flow to a previously configured reusable task.
-
readonly agentEscalationHandover :ArchValueCommunication
-
Wording the bot will use when the participant has requested to speak to a human and has said yes to the Agent Escalation Confirmation prompt. Once this wording has been communicated, the Bot will Exit back to the calling flow which invoked this Bot flow.
-
readonly agentEscalationTargetTask :ArchTask
-
The configured reusable task that the flow will jump to when the agent escalation handling is set to 'Jump to Reusable Task'.
-
readonly enableAgentEscalation :ArchValueBoolean
-
A boolean value which lets you configure whether or not the bot listening to requests to speak to a human. When creating a new bot flow this will be set to true by default.
-
readonly errorEventHandover :ArchValueCommunication
-
Wording the bot will use Bot when there is an error encountered during the execution of the flow. Examples of such an error include a divide-by-zero error or submitting a NOT_SET value to a function that does not allow it.
-
handling :string
-
The error handling configured for the flow. The string values in
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
lists valid values. Based on the handling setting, there are other properties in this class that will provide the target menu, queue, state or task that should be used in the event of a flow runtime error.- Inherited From:
- See:
-
- ArchSettingsEventErrorFlow.targetMenu
- ArchSettingsEventErrorFlow.targetQueue
- ArchSettingsEventErrorFlow.targetState
- ArchSettingsEventErrorFlow.targetTask
-
readonly id :string
-
The identifier string for this object.
- Inherited From:
-
readonly idMayBeBlank :string
-
Returns whether or not the id property may be blank or undefined for this object. For example, the returned settings from
ArchMenu#settingsMenu
will have a blank identifier along with the settings returned fromArchMenu#settingsSpeechRec
. Note that this is an extremely rare case.- Inherited From:
- See:
-
readonly isArchBaseCoreObject :boolean
-
Returns true indicating that this is an ArchBaseCoreObject instance.
- Inherited From:
-
readonly isArchSettingsEventErrorFlow :boolean
-
Returns true indicating that this is an ArchSettingsEventErrorFlow instance.
- Inherited From:
-
readonly isArchSettingsEventErrorFlowBot :boolean
-
Returns true indicating that this is an ArchSettingsEventErrorFlowBot instance.
-
readonly logStr :string
-
Returns a string suitable for logging that describes this menu settings instance.
- Inherited From:
-
readonly logStrTypeOnly :string
-
This is a string suitable for logging information about this object where it's just the object's type. This is normally used when logging errors that occur in constructor parameter checking because the scripting object isn't set up and the normal logging str contents wouldn't be set up.
- Inherited From:
-
readonly parentFlow :ArchBaseFlow
-
Returns the parent flow for this error handling settings instance.
- Inherited From:
-
readonly preHandlingAudio :ArchAudio
-
The audio that will be played to the call prior to the actual error handling being invoked.
- Inherited From:
-
readonly recognitionFailureEventHandling :string
-
The recognition failure event handling configured for the flow. The string values in
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
lists valid values.Specifies the bot's behavior when it asks a question and the participants takes too many attempts to provide a valid answer. This could include too many of any of the following: No Matches, No Inputs, or Confirmation Rejections. Recognition Failures can occur in any 'Ask For ...' action or in an '"Anything Else?" Loop' action. Setting 'Disconnect' will end the participant's Genesys Cloud conversation and setting 'Exit the Flow' will return control to the flow which invoked this Bot Flow.
-
readonly recognitionFailureEventHandover :ArchValueCommunication
-
Wording the bot will use when the bot asks a question and the participants takes too many attempts to provide a valid answer. This could include too many of any of the following: No Matches, No Inputs, or Confirmation Rejections. Recognition Failures can occur in any 'Ask For ...' or '"Anything Else?" Loop' action.
-
readonly recognitionFailureEventTargetTask :ArchTask
-
The configured reusable task that the flow will jump to when the recognition event handling is set to 'Jump to Reusable Task'.
-
targetMenu :ArchMenu
-
The menu to jump to when the
handling
property is set to ArchEnums.EVENTS_FLOW_ERROR_HANDLING.jumpToMenu ( seeArchEnums#EVENTS_FLOW_ERROR_HANDLING
).- Inherited From:
-
readonly targetQueue :ArchValueQueue
-
The queue to transfer to when the
handling
property is set to ArchEnums.EVENTS_FLOW_ERROR_HANDLING.transferToQueue ( seeArchEnums#EVENTS_FLOW_ERROR_HANDLING
).- Inherited From:
-
targetState :ArchState
-
The state to change to when the
handling
property is set to ArchEnums.EVENTS_FLOW_ERROR_HANDLING.changeState ( seeArchEnums#EVENTS_FLOW_ERROR_HANDLING
).- Inherited From:
-
targetTask :ArchTask
-
The task to run when the
handling
property is set to ArchEnums.EVENTS_FLOW_ERROR_HANDLING.jumpToTask ( seeArchEnums#EVENTS_FLOW_ERROR_HANDLING
).- Inherited From:
Methods
-
isAgentEscalationHandlingTypeAvailable(errorHandlingEnumValue) → {boolean}
-
Returns whether or not the specified agent escalation handling type is available for this flow based on the error handling enum string value that is passed in. This function returns true if the error handling type is available, otherwise false.
Parameters:
Name Type Description errorHandlingEnumValue
string the error handling to check. This must be a string value from the
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
enum.Returns:
boolean -
isErrorHandlingTypeAvailable(errorHandlingEnumValue) → {boolean}
-
Returns whether or not the specified error handling type is available for this flow based on the error handling enum string value that is passed in. This function returns true if the error handling type is available, otherwise false.
Parameters:
Name Type Description errorHandlingEnumValue
string the error handling to check. This must be a string value from the
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
enum.Returns:
boolean- Inherited From:
-
isFilterMatch(archFilterObject) → {boolean}
-
Returns whether or not this Architect Scripting object is a match for the supplied ArchFilterObject instance.
Parameters:
Name Type Description archFilterObject
ArchFilterObject the object filter to use to determine if it's a match.
Returns:
boolean- Inherited From:
-
isRecognitionErrorHandlingTypeAvailable(errorHandlingEnumValue) → {boolean}
-
Returns whether or not the specified recognition handling type is available for this flow based on the error handling enum string value that is passed in. This function returns true if the error handling type is available, otherwise false.
Parameters:
Name Type Description errorHandlingEnumValue
string the error handling to check. This must be a string value from the
ArchEnums#EVENTS_FLOW_ERROR_HANDLING
enum.Returns:
boolean -
logError(errorStr)
-
Logs an error to the logging service with a log header from this object's
logStr
property value whenArchLogging#logErrors
is true.Parameters:
Name Type Description errorStr
string the error string to log.
- Inherited From:
-
logErrorAndThrow(errorStr)
-
Logs an error to the logging service with a log header from this object's
logStr
property value whenArchLogging#logErrors
is true and then throws the string in the errorStr parameter.Parameters:
Name Type Description errorStr
string the error string to log. This should be a non-blank string.
Throws:
- Throws the submitted error string.
- Inherited From:
-
logNote(noteStr)
-
Logs a note to the logging service with a log header from this object's
logStr
property value whenArchLogging#logNotes
is true.Parameters:
Name Type Description noteStr
string the note string to log. This should be a non-blank string.
- Inherited From:
-
logNoteVerbose(noteStr)
-
Logs a note to the logging service with a log header from this object's
logStr
property value whenArchLogging#logNotesVerbose
is true.Parameters:
Name Type Description noteStr
string the note string to log. This should be a non-blank string.
- Inherited From:
-
logWarning(warningStr)
-
Logs a warning to the logging service with a log header from this object's
logStr
property value whenArchLogging#logWarnings
is true.Parameters:
Name Type Description warningStr
string the warning string to log. This should be a non-blank string.
- Inherited From:
-
traverse(callbackFunction, traverseFilteropt) → {number}
-
This method iterates over this object and ArchBaseCoreObject instances within it. For each object it will call the
ArchBaseObject#isFilterMatch
method with a filter and call the supplied callback function if isMatch returns true. The callback will be passed anArchTraverseInfo
with details about the match such as the match object itself along with current contextual information such as the object hierarchy for the match object relative to the object on which this traverse call is being made.The traverse
filter
is one which you can create by callingArchFactoryFilters#createFilterObject
and then add desired clauses or clause containers to it. If not specified, this function will use adefault filter
.Here is an example that does a simple flow traversal using the default filter and logs information about objects in the callback from the traverse object that's passed back:
archInboundCallFlow.traverse(function(traverseInfo) { archLogging.logNote(' Object : ' + traverseInfo.matchObject.logStr); archLogging.logNote(' Hierarchy: ' + traverseInfo.context.hierarchyStr); });
This might be enough for most uses and you can check various aspects about the object in the callback such as "is this an Architect action?" by seeing if traverseInfo.matchObject.isArchBaseAction is true. You can specify a filter for the traversal code to use as well and only have it call your callback when the object's
ArchBaseCoreObject#isFilterMatch
method returns true for the filter. Here's an example that creates a filter for callbacks onany type of transfer action
, anydecision action
or objects whose name property case insensitively matches the word 'foo'. While this could all be done with one property callback clause the example will use multiple clauses for the sake of simplicity:const myTraverseFilter = filterFactory.createFilterObject(archEnums.FILTER_CONTAINER_OPERATORS.or); myTraverseFilter.addClausePropertyValueEquals('isArchBaseActionTransfer', true); myTraverseFilter.addClausePropertyValueEquals('isArchActionDecision', true); myTraverseFilter.addClausePropertyCallback('name', function(propValue, archContainingObject, propName) { // We fully spelled out the function signature above but archContainingObject and propName are // not needed in this case. The archContainingObject is the object that contains the // property and propName is the property name itself. We pass in propName because the same // function could be used for multiple property callback clauses. // Remember to return a boolean true, false or undefined from ths callback. :) return propValue && propValue.toLowerCase() === 'foo'; }); archTask.traverse(function(traverseContext) { // You will only be called back here for ArchBaseCoreObject instances that // have the isArchBaseActionTransfer or isArchActionDecision property values equal to true. }, myTraverseFilter);
If you supply a filter with no clauses, this tells the traverse method to call the supplied callback function for every
ArchBaseCoreObject
it traverses.If you want traversal itself to stop after a callback, simply return boolean false from the callback function you supply to the traverse call.
The traverse method does not process deprecated property names such as
orgId
,orgName
orlanguageSettings
. Additionally it does not traverse in to properties that would "jump out" of the current traversal. An example of this would be if the code was traversing anArchActionJumpToMenu
action that it would not start traversing in to the menu that it jumps to. Another example would be aArchActionChangeState
action where it would not traverse in to the target state of the action. This also means traversal does not traverse in to theArchBaseValue#flowLevelDefault
property.And lastly, as Scripting evolves over time with new versions, you can expect to get callbacks for new object types such as new actions or new properties on objects. As such, it's important not to assume any particular order in callbacks to keep code most compatible with traversal callbacks. Or if you use inequality checks in filter clauses remember that new "stuff" may satisfy an inequality check which may or may not be anticipated in your logic.
Note: This traverse method is a helper method and is very handy for iterating over Architect Scripting objects and their properties in a generic fashion with filtering capabilities. Obviously you can write your own custom traversal code if this implementation doesn't cut it for some reason. :)
This function returns the number of times it called the callback function.
Parameters:
Name Type Attributes Default Description callbackFunction
callbackTraverseInfo the callback function to call for objects that match the traverse filter.
traverseFilter
ArchFilterObject <optional>
ArchFactoryFilters#createFilterTraverseDefault
the filter to use when performing the traversal to determine which
ArchBaseCoreObject
instances you wish to be called back for. If no filter is specified, this function will callArchFactoryFilters#createFilterTraverseDefault
and use that traversal default filter. The wantArchBaseValues parameter on that call is set to true.Returns:
number- Inherited From: