Skip to main content

Confirmation

The Confirmation action allows your bot to ask the user to confirm some operation.

Parameters

ParameterTypeDescriptionRequired
promptStringThe message prompting the user for confirmation.Yes
agreeStateStringThe state the dialog will switch to if the user confirms the action.No
disagreeStateStringThe state the dialog will switch to if the user rejects the action.No
useButtonsBooleanIf the parameter is set to true, the bot will additionally display confirmation and rejection buttons.
This parameter should be used together with agreeButton and disagreeButton. Buttons are not supported in all channels.
No
agreeButtonStringConfirmation button title.No
disagreeButtonStringRejection button title.No

How to use

state: EnterPassword
a: Enter the password for the {{$client.email}} account.
buttons:
"I forgot my password" -> /Confirmation/ForgottenPassword

state: ForgottenPassword
Confirmation:
prompt = I can reset your password and email the new one at {{$client.email}}. Continue?
agreeState = /ForgottenPassword/ResetPassword
disagreeState = /EnterPassword
useButtons = true
agreeButton = Yes, reset password
disagreeButton = No, try again

state: ResetPassword
script:
# Access an internal system for resetting the password…