How to combine slash commands, buttons and dialogs for a menu?
up vote
0
down vote
favorite
My Slack app is started with a slash command, which then posts an ephemeral menu message to the user. That menu has some information and three message buttons.
Example:
- First button allows the user to close the menu
- Second button allows the user to start an action
- Third button allows the user to open a dialog for changing
options.
After the user submits the dialog I want to update the menu message to reflect the changes made in the dialog.
However, after the user submits the dialog I can no longer to update the message menu by responding to a Slack response as before.
How can I update the menu message with the changes?
slack slack-api slack-dialog
add a comment |
up vote
0
down vote
favorite
My Slack app is started with a slash command, which then posts an ephemeral menu message to the user. That menu has some information and three message buttons.
Example:
- First button allows the user to close the menu
- Second button allows the user to start an action
- Third button allows the user to open a dialog for changing
options.
After the user submits the dialog I want to update the menu message to reflect the changes made in the dialog.
However, after the user submits the dialog I can no longer to update the message menu by responding to a Slack response as before.
How can I update the menu message with the changes?
slack slack-api slack-dialog
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My Slack app is started with a slash command, which then posts an ephemeral menu message to the user. That menu has some information and three message buttons.
Example:
- First button allows the user to close the menu
- Second button allows the user to start an action
- Third button allows the user to open a dialog for changing
options.
After the user submits the dialog I want to update the menu message to reflect the changes made in the dialog.
However, after the user submits the dialog I can no longer to update the message menu by responding to a Slack response as before.
How can I update the menu message with the changes?
slack slack-api slack-dialog
My Slack app is started with a slash command, which then posts an ephemeral menu message to the user. That menu has some information and three message buttons.
Example:
- First button allows the user to close the menu
- Second button allows the user to start an action
- Third button allows the user to open a dialog for changing
options.
After the user submits the dialog I want to update the menu message to reflect the changes made in the dialog.
However, after the user submits the dialog I can no longer to update the message menu by responding to a Slack response as before.
How can I update the menu message with the changes?
slack slack-api slack-dialog
slack slack-api slack-dialog
edited Nov 10 at 19:10
asked Nov 10 at 19:03
Erik Kalkoken
11.5k32145
11.5k32145
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
In order to keep the connection with the initial slash command one needs to store the response_url
of the last interactive action before opening the dialog.
In this example it will be in the interactive action request initiated after pressing the "Options" button. That response_url
allows one to seamlessly continue the conversation that was started with the initial slash command.
The easiest approach for storing the response_url
is to put it into the state
property of the dialog, which will automatically be echoed back to the app with the dialog submission request.
One needs to be careful not to confuse the response_url
from the interactive action with the response_url
from the dialog.
Also, the dialog cancel case is automatically handled, since in that case the user can continue working with the initial menu message.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
In order to keep the connection with the initial slash command one needs to store the response_url
of the last interactive action before opening the dialog.
In this example it will be in the interactive action request initiated after pressing the "Options" button. That response_url
allows one to seamlessly continue the conversation that was started with the initial slash command.
The easiest approach for storing the response_url
is to put it into the state
property of the dialog, which will automatically be echoed back to the app with the dialog submission request.
One needs to be careful not to confuse the response_url
from the interactive action with the response_url
from the dialog.
Also, the dialog cancel case is automatically handled, since in that case the user can continue working with the initial menu message.
add a comment |
up vote
0
down vote
accepted
In order to keep the connection with the initial slash command one needs to store the response_url
of the last interactive action before opening the dialog.
In this example it will be in the interactive action request initiated after pressing the "Options" button. That response_url
allows one to seamlessly continue the conversation that was started with the initial slash command.
The easiest approach for storing the response_url
is to put it into the state
property of the dialog, which will automatically be echoed back to the app with the dialog submission request.
One needs to be careful not to confuse the response_url
from the interactive action with the response_url
from the dialog.
Also, the dialog cancel case is automatically handled, since in that case the user can continue working with the initial menu message.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
In order to keep the connection with the initial slash command one needs to store the response_url
of the last interactive action before opening the dialog.
In this example it will be in the interactive action request initiated after pressing the "Options" button. That response_url
allows one to seamlessly continue the conversation that was started with the initial slash command.
The easiest approach for storing the response_url
is to put it into the state
property of the dialog, which will automatically be echoed back to the app with the dialog submission request.
One needs to be careful not to confuse the response_url
from the interactive action with the response_url
from the dialog.
Also, the dialog cancel case is automatically handled, since in that case the user can continue working with the initial menu message.
In order to keep the connection with the initial slash command one needs to store the response_url
of the last interactive action before opening the dialog.
In this example it will be in the interactive action request initiated after pressing the "Options" button. That response_url
allows one to seamlessly continue the conversation that was started with the initial slash command.
The easiest approach for storing the response_url
is to put it into the state
property of the dialog, which will automatically be echoed back to the app with the dialog submission request.
One needs to be careful not to confuse the response_url
from the interactive action with the response_url
from the dialog.
Also, the dialog cancel case is automatically handled, since in that case the user can continue working with the initial menu message.
answered Nov 10 at 19:03
Erik Kalkoken
11.5k32145
11.5k32145
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242419%2fhow-to-combine-slash-commands-buttons-and-dialogs-for-a-menu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown