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.

To In order to use Slash command to trigger Luma skills via Slack, you should have Slack Channel Configured for your Tenant.

Once Slack channel is configured, follow the below steps to Create and Configure a Slash CommandCommands:

...

Add User Phrases in Luma Skills

Before creating a Slash command, we create a Skill in Luma, to be executed through Slash Commands in Slack. This skill is same as any other skill created in Luma but with an additional utterance or user phrase to identify a call using Slash commands. Refer article to Slash Commands are linked to Luma skills through special utterances or user phrases. These additional user phrases are used by Slash Commands to identify the skill.

For more info on skill creation, refer article Create a Skill .

Follow the below steps to add the utterance for Slash commandto your skill .

  • On Luma Dashboard, Navigate to Skills and search for the skill you would like to execute using slash command. Type the skill Skill name in Search box and hit enter.

...

  • Click on the record. Skill opens in Edit mode.

  • On Skill details screen-->under Phrases, add a new utterance for the skill under Phrases. Below is the format should be followed for the utterance:

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

For Example, let us add the below utterance to consider a sample Luma skill (Create, ‘Create_Ticket_Slash_Command) built Command’ to create a ticket. The skill requires three attributes: Username, Comments and Language. Below utterance should be added as user phrase:

Create_Ticket_Slash_Command {username:@username} {comment:@comment} {language:@language}

...

Add the utterance in Phrases and click on Add (+) button or hit Enter. The new utterance will start appearing in the list of Phrases. Click Saveto save changes.

This phrase should be added to Usage hint on Create ‘Create New Command Command’ screen in slack as described in next section.

...

Create a Slash Command

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

  • Navigate to the Slack API Settings and click Slash Commands.

...

Copy Slash Command Request URL and paste the same in Request URL box in Slack API-Create New Command screen.

...

  • Next step is to add 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:

...