Override Bot Subroutine
Overrides the default subroutine if the user's response timeout expires.
Starting from IBM RPA 23.0.3, support for Interactive Voice Response (IVR) is removed from this command due to the removal of IVR. For more information, see Removed.
Command availability: IBM RPA SaaS and IBM RPA on premises
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
botTimeoutSub --mode(SubOverriderMode) [--subroutine(String)]
Input parameters
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
Mode | mode |
Required |
SubOverriderMode |
Modes to override subroutines: |
Subroutine | subroutine |
Optional |
Text |
Subroutine that runs if the Set option is enabled in the Mode parameter. |
Example
When the user's response time on the first asked question runs out, the user receives the message "Chat forwarded!" defined by the default subroutine "TimeOut".
Before asking a new question, the "overrideTimeOut" subroutine is defined by the Override Bot Subroutine command, which sends the message "Overriding the subroutine "TimeOut": Your chat is forwarded!" if the user's response time runs out again.
defVar --name language --type Language
defVar --name nameOptions --type List --innertype String --value "[Yes,No]"
createLanguage --culture "en-US" language=value
botConnect --type "Chat" --language ${language} --timedout TimeOut --timeout "00:00:05"
botAsk --beep --text "Welcome to IBM! How can I help?" --textformat "0" --timeout "00:00:05"
// Definition of a new subroutine, replacing the default one defined in "botConnect".
botTimeoutSub --mode "Set" --subroutine overrideTimeOut
botAskList --names ${nameOptions} --beep --text "Has your question been answered?" --textformat "0"
botDisconnect
// Subroutines that will be executed during the bot execution.
beginSub --name TimeOut
botSay --language ${language} --text "Chat forwarded!" --textformat "Markdown"
endSub
beginSub --name overrideTimeOut
botSay --language ${language} --text "Overriding the subroutine \"TimeOut\": Your chat is forwarded!" --textformat "Markdown"
endSub