Slash Commands in Slack are used to trigger an action or interaction directly from the message box. These commands act like shortcuts for specific actions. Leveraging on channel specific features, Luma supports Slash commands to trigger skills through Slack.
Navigate to the Slack API Settings and click Slash Commands.
Slash Commands Screen now appears on the screen. Click on Create New Command to create a new Slash command.
This opens the Create New command screen. Add Command Name and Short Description (Refer below screenshot).
Next step is to add Request URL. In Luma, navigate to Bot Configuration-->Channels and open Slack Channel configuration page.
Copy Slash Command Request URL and paste the same in Request URL box in Slack API-Create New Command screen.
Add Usage Hint. This represents the user phrase that will be used to invoke Luma skill through the new Slash command. The Usage hint is the special user phrase added to the skill in Luma (detailed in previous section). The utterance should be modified before it is added to the Slash command. Follow the below example:
Once a Slash Command is successfully created in Slack, Luma database should be updated with the skill and the slash command utterance. Contact Serviceaide support team with below details to add the slash command into the database:
Luma skill will be executed and the response will be displayed on the message box.
While executing a skill through Slash commands, attributes are validated by Slack. Below validations are performed before the skill is executed:
Attribute Name: Each value should be assigned to correct attribute. If attribute name is incorrect, Slack does not identify and assign the value to the attribute. In such a case, below pop up appears prompting the user to manually provide value for the missed attribute.
Missing Attribute: Correct number of attributes should be added to the utterance when executing a Slash command. If one or more attributes are missed, below pop up appears prompting the user to manually provide value for the missed attribute.