Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 your skills through Slack.

In order to use Slash command, you one should have Slack Channel Configured for your Tenant.

...

<Skill identifier>{<Attribute Identifier 1>:@<Attribute Identifier 1>} {<Attribute Identifier 2> :@<Attribute Identifier 2>} {<Attribute Identifier 3> :@<Attribute Identifier 3>}

For Example, let us consider a Luma skill, ‘Create_Ticket_Slash_Command’ to create a ticket. The skill requires three attributes: Username, Comments and Language. Below utterance should be added as user phrase:

...

  • Log in to https://api.slack.com/ and open your Workspace/App.

  • 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 open 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.

...

Executing a Slash Command

  • Log in to Slack using your account login credentials (https://slack.com/signin).

  • On your Apps Message box, type usage hint added for the slash command created in above step and update with attribute values to execute the Skill.

...

While executing a skill through Slash commands, attributes are validated by Slack. Below validations are performed before the luma 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.

...