End Wait
Ends the wait state started by the Bot Start On Hold command in an chatbot interaction.
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.
botStopOnHold
Example
In this example, the End Wait command ends a wait started by the Bot Start On Hold command.
defVar --name language --type Language
defVar --name userResponse --type Numeric
defVar --name consultationSuccess --type Boolean
defVar --name convertedZipCode --type String
createLanguage --culture "en-US" language=value
botConnect --type "Chat" --language ${language} --timeout "00:03:00"
botAskNumber --text "Hello, to consult your zip code, please type it without punctuation." --textformat "Markdown" --timeout "00:03:00" userResponse=first
// Start of waiting by sending a message in the chat.
botStartOnHold --message "Wait a moment, we are searching for your zip code!" --textformat "0"
goSub --label consultZipCode
// Closing of the wait after consultation with the ZIP code.
botStopOnHold
if --left "${consultationSuccess}" --operator "Is_True"
botSay --text "ZIP Code ${convertedZipCode} successfully found!" --textformat "0"
else
botSay --text "ZIP Code ${convertedZipCode} not found!" --textformat "0"
endIf
botDisconnect
beginSub --name consultZipCode
convertNumberToText --culture "en-US" --number ${userResponse} --conversiontype "SimpleNumber" --decimals 0 convertedZipCode=value
webStart --name web01 --type "Chrome"
webNavigate --url "https://www.unitedstateszipcodes.org/"
webClick --selector "Id" --id q
webSet --value "${convertedZipCode}" --selector "Id" --id q
webClick --selector "CssSelector" --css "#search-forms > div.col-xs-12.col-lg-7 > div > span.input-group-btn > button"
webWaitElement --selector "CssSelector" --css "#map-info > table" consultationSuccess=value
webClose --name web01 --leavebrowseropen
endSub