Confirmation
The Confirmation
action allows your bot to ask the user to confirm some operation.
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
prompt | String | The message prompting the user for confirmation. | Yes |
agreeState | String | The state the dialog will switch to if the user confirms the action. | No |
disagreeState | String | The state the dialog will switch to if the user rejects the action. | No |
useButtons | Boolean | If 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 |
agreeButton | String | Confirmation button title. | No |
disagreeButton | String | Rejection 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…