Integrating your Software Asset Management application with the Slack application enables you to track your software subscriptions and reclaim unused licenses.

The ServiceNow Slack integration supports the Slack Enterprise Grid plan. This plan enables you to connect multiple workspaces across your organization.

Important: Minimize security risks and protect information by granting access only to the necessary user or API permissions.
Process Required user role in the Slack application Authentication scopes
Download subscriptions Org Owner admin
Pull user activity Org Owner admin
Reclaim subscription Org Owner admin

Create a Slack Enterprise Grid application

Create a Slack Enterprise Grid application to manage and connect multiple workspaces across your organization.

Before you begin

Role required: Refer to the Minimal user permissions table.

Procedure

  1. From a web browser, open Slack.
  2. Sign in using your Slack credentials.
  3. Go to the Slack platform.
  4. On the page header of the Slack platform, select Your Apps.
  5. On the Your Apps page, select Create New App.
  6. Select From Scratch.
    The Name app and choose workspace dialog box opens.
  7. In the dialog box, enter an application name in the App Name field.
  8. From the Development Slack Workspace list, select the workspace that you want the application to belong to.
  9. Select Create App.
    The Slack platform creates the application and then redirects you to the Basic Information page. Use this page to view and configure application settings.
  10. On the Basic Information page, expand the App Credentials section and then copy the values in the Client ID and Client Secret fields.
    Save them in a secure location for later use.
  11. Expand the Add features and functionality section and then select Permissions.
  12. On the OAuth & Permissions page, configure the permissions that enable the interactions between the application and the Slack API.
    1. In the Redirect URLs section, add the URL of the OAuth provider that you want to redirect users to after authentication.
      1. Select Add New Redirect URL.
      2. When prompted, enter https://<instance-name>/oauth_redirect.do, where <instance-name> is the name of your ServiceNow instance.
      3. Select Add.
      4. Select Save URLs.
    2. In the User Token Scopes section, add the admin OAuth scope to the application.

      The OAuth scopes limit the level of access that the application has to your users, channels, and workspaces. For more information on Slack OAuth scopes, see OAuth Permission scopes.

      1. Select Add an OAuth Scope.
      2. When prompted, select admin from the OAuth Scope list.

        This OAuth scope enables the application to administer your workspace.

        Note: The Description field for the OAuth scope populates automatically.
  13. Activate your application.
    1. From the left navigation pane, navigate to Settings > Manage Distribution.
    2. Under Share Your App with Other Workspaces, expand the Remove Hard Coded Information section.
    3. Verify that your application doesn’t contain any hard-coded information, such as OAuth tokens.
    4. After verification, select the I've reviewed and removed any hard-coded information check box.
    5. Verify that you have completed all other sections.
    6. Select Activate Public Distribution.

Create a Slack workspace application

Create a Slack application on each workspace that you want to track user activity on.

Before you begin

Role required: Refer to the Minimal user permissions table.

Procedure

  1. From a web browser, open Slack.
  2. Sign in using your Slack credentials.
  3. Go to the Slack platform.
  4. On the page header of the Slack platform, select Your Apps.
  5. On the Your Apps page, select Create New App.
  6. Select From Scratch.
    The Name app and choose workspace dialog box opens.
  7. In the dialog box, enter an application name in the App Name field.
  8. From the Development Slack Workspace list, select the workspace that you want the application to belong to.
  9. Select Create App.
    The Slack platform creates the application and then redirects you to the Basic Information page. Use this page to view and configure application settings.
  10. On the Basic Information page, expand the App Credentials section and then copy the values in the Client ID and Client Secret fields.
    Save them in a secure location for later use.
  11. Expand the Add features and functionality section and then select Permissions.
  12. On the OAuth & Permissions page, configure the permissions that enable interactions between the application and the Slack API.
    1. In the Redirect URLs section, add the URL of the OAuth provider that you want to redirect users to after authentication.
      1. Select Add New Redirect URL.
      2. When prompted, enter https://<instance-name>/oauth_redirect.do, where <instance-name> is the name of your ServiceNow instance.
      3. Select Add.
      4. Select Save URLs.
    2. In the User Token Scopes section, add the admin OAuth scope to the application.

      The OAuth scopes limit the level of access that the application has to your users, channels, and workspaces. For more information on Slack OAuth scopes, see OAuth Permission scopes.

      1. Select Add an OAuth Scope.
      2. When prompted, select admin from the OAuth Scope list.

        This OAuth scope enables the application to administer your workspace.

        Note: The Description field for the OAuth scope populates automatically.
  13. In the OAuth Tokens & Redirect URLs section of the OAuth & Permissions page, select Install App to Workspace.
  14. Select Allow.
    Slack creates the application for the specified workspace.
  15. Repeat steps 4 through 13 for each workspace on which you want to create an application.

Create a Slack Enterprise connection

Create a connection between the Slack Enterprise Grid application and your ServiceNow instance. This connection enables your instance to retrieve user data from your application.

Before you begin

Role required: sam_integrator or admin

Procedure

  1. From your ServiceNow instance, navigate to Process Automation > Flow Designer.
    The Flow Designer launches in a new tab.
  2. Select the Connections tab.
  3. Select View Details for your Slack Enterprise connection.
  4. From the list of available connections, locate Slack Enterprise and then select Configure.
  5. In the Configure Connection dialog box, fill in or verify the following fields.
  6. Select Configure and Get OAuth Token.
    Note: For the role required to perform this step, refer to the Minimal user permissions table.
  7. On the Authorize App dialog box, verify if the Enterprise Grid workspace is available on the top-right list.
  8. If the Enterprise Grid workspace is available, select the Enterprise Grid workspace.
  9. If the Enterprise Grid workspace isn’t available,
    1. Select Add another workspace.
    2. Enter the Enterprise Grid workspace URL.
    3. Select Continue.
      You get redirected to the Authorize App dialog box.
    4. Select Allow.
      The OAuth access token becomes available for authorizing your Enterprise connection.

Create a Slack workspace connection

Create a connection between your Slack workspaces and your ServiceNow instance. This connection enables your instance to retrieve user data from your workspaces.

Before you begin

Role required: sam_integrator or admin

About this task

Create a separate connection for each of your Slack workspaces.

Procedure

  1. From your ServiceNow instance, navigate to Process Automation > Flow Designer.
    The Flow Designer launches in a new tab.
  2. Select the Connections tab.
  3. Select Add Connection for your Slack Enterprise connection.
  4. In the Create Connection dialog box, fill in or verify the following fields.
  5. Select Create and Get OAuth Token.
    Note: For the role required to perform this step, refer to the Minimal user permissions table.
  6. In the Authorize App dialog box, select Allow.
    The OAuth access token becomes available for authorizing your Slack workspace connection.
  7. Repeat steps 3 through 6 for each workspace that which you want to connect.
  8. Return to your ServiceNow instance to associate your Slack workspace connections with the instance.
    1. Navigate to Slack > Slack Workspace Tokens.
    2. Select New.
    3. On the Slack Workspace Tokens form, fill in the following fields.
      Table 3. Slack Workspace Tokens form
      Field Value
      Connection Alias Name of your Slack workspace connection. Enter the same connection name that you entered in step 4.
      Workspace Name The name of the workspace to which your Slack application belongs.
      Slack App Name of your Slack workspace application. Enter the same application name that you entered in Create a Slack workspace application.
    4. Select Submit.
    5. Repeat steps a through d for each workspace connection that you want to associate with your instance.

Create a Slack integration profile

Create a Slack integration profile to track software subscriptions and optimize licensing for your Slack applications.

Before you begin

To create a Slack integration profile, request the Software Asset Management - SaaS License Management plugin (sn_sam_saas_int) from the ServiceNow Store.

ServiceNow Role required: sam_integrator or admin

About this task

If you’re using Software Asset Workspace, the option to create the Slack integration profile in Core UI is inactive.

Procedure

  1. Navigate to the integration profile.
    InterfaceAction
    Core UI
    1. Navigate to All > Software Asset > SaaS License > Direct Integration Profiles.
    2. Select New.
    3. Select Slack Enterprise Integration Profile.
    Software Asset Workspace
    1. Navigate to License operations > User Subscriptions > Direct integration profiles.
    2. Select New.
    3. Select Slack Enterprise from the drop-down list.
    4. Select Continue.
  2. On the form, fill in the fields.
  3. On the Download Subscription Subflow tab, verify that the Subflow field is set to Slack Download Subscriptions Subflow.
  4. On the Calculate Activity Subflow tab, verify that the Subflow field is set to Slack Update User Activity Subflow.
    You can also select the date and time that you want to analyze user activity from in the Analyze user activity from field. By default, you can analyze user activity up to 60 days prior to the current date and view events performed by individual users from the time you create this profile.
    Note: Software Asset Management pulls the events from the time that you start analyzing user activity irrespective of the profile creation date.
    You can modify this value in the Last activity threshold field of your software reclamation rules. For more information, see Review a software reclamation rule.
  5. On the Reclaim Subscription Subflow tab, verify that the Subflow field is set to Slack Reclaim Subscription Subflow.
  6. Select Save.
    Your ServiceNow instance creates a draft integration profile. The integration profile uses the Slack Download Subscriptions, Slack Update User Activity, and Slack Reclaim Subscription subflows to retrieve user data from the Slack application.
  7. After the form reloads, select Publish.
    The Publish Confirmation dialog box opens.
  8. In the dialog box, select OK.
    Note: To optimize memory and avoid performance issues in your Slack flow, you can turn off the flow engine reporting level by navigating to System Properties > All Properties and selecting the com.snc.process_flow.reporting.level system property. On the System Property page, set the Value to OFF and then select Update.

What to do next

After the integration connects, your ServiceNow instance automatically creates software models, reclamation rules, and software subscriptions that are refreshed daily.

If you want to set up multiple integration profiles with unique connections, create child aliases to manage different configurations and settings for each integration profile. For more information, see Create a child alias to set up multiple integration profiles.

Review all automatically generated reclamation rules to reclaim user subscriptions. For more information, see Review a software reclamation rule.

Create software entitlements for the automatically generated software models to track used software against owned software.
Reconciliation also runs on your subscriptions as a scheduled job or on-demand. You can view your reconciliation results in the License Workbench (Software Asset Management classic application) or the License usage view (Software Asset Workspace). Use these results to determine your license compliance position and to remediate any non-compliance.