---
sourceDocument: Xanadu Create Integrations with Applications
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/integrate-applications

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Create Integrations with Applications

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Configure Slack modals in ServiceNow instance

# Configure Slack modals in ServiceNow
instance {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read

Create modal and specify fields that should be displayed in your Slack
modal. Modal UI can be generated in two ways; automatically using a ServiceNow table and
manually using a custom View Payload.

## Before you begin

Role required:
admin.

## About this task

For example, if you want to create incident using modal in Slack, the Create Incident modal requires Priority, Category, and Short Description fields.  
Note:  
Modals can be triggered from these interactive Slack components:

* Command,
* Block action,
* Global shortcut, and
* Message shortcut.
{#conf-slack-modals__ul_vmk_gn2_fpb}

## Procedure

1. To create a modal with UI that is automatically generated using a ServiceNow table:
   1. Navigate to SlackSlack Modal Configuration.
   2. Click New.
   3. On the Slack Modal Configuration form, fill these values.  
      {#conf-slack-modals__table_fng_zsd_fpb__entry__2}

      | Field | Description |
      |-|-|
      | Name | Name to identify the record. For example, <kbd class="ph userinput">Modal to create incident</kbd>. |
      | Modal Title | Modal title that is displayed on Slack. For example, <kbd class="ph userinput">Create Incident</kbd>. |
      | Table | ServiceNow table corresponding to the modal fields. For example, Incident \[incident\]. |
      | Custom Modal | Option to configure a custom modal. |
      | Input Fields | Inputs fields that should be displayed on Slack. For example, select Priority, Category, and Short Description. Ensure that these modal fields correspond to the selected ServiceNow table. For example, you can't display task related fields on a modal that creates an incident. Note: Only the string, date, and choice field types are supported. |
      | Active | Option to actively use the record. |
      | Script Validation | Script to validate inputs provided by the user in the modal. To validate the user-provided inputs, ensure that you are aware of the format in which values are retrieved from the modal and parse the response from Slack. The sample payload when user provides values for the Priority, Category, and Short Description fields in the Create Incident modal is: {"priority":{"4gk":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"1 - Critical","emoji":true},"value":"1"}}},"category":{"iV7":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"Software","emoji":true},"value":"software"}}},"short_description":{"XS/Q=":{"type":"plain_text_input","value":"hemanth"}}} To display validation errors in the modal, configure the script to return an object keys, status, and errorObject. errorObject should have a value of object that will be displayed on Slack. The object should have response_action and error. Also, configure the script to return an object with keys of status and statusMessage when there are no validation errors. statusMessage is optional and you can configure it as per your requirement. |
      [Table 1. Slack Modal Configuration form]

      {#conf-slack-modals__table_fng_zsd_fpb}
   4. Right-click the form header and click Save.  
      The Create Incident modal is created in Slack.
   {#conf-slack-modals__substeps_cc4_5x4_fpb}
2. To create a modal with UI that is manually generated using a custom View Payload:
   1. Navigate to SlackSlack Modal Configuration.
   2. Click New.
   3. On the Slack Modal Configuration form, fill these values.  
      {#conf-slack-modals__table_nwf_ng5_fpb__entry__2}

      | Field | Description |
      |-|-|
      | Name | Name to identify the record. For example, <kbd class="ph userinput">Modal to create incident</kbd>. |
      | Custom Modal | Option to configure a custom modal. Select this check box. |
      | View Payload | Payload generated by Slack Block Kit Builder that defines the modal UI. For more information, see [Block Kit](https://api.slack.com/block-kit) and [Building with Block Kit](https://api.slack.com/block-kit/building). |
      | Active | Option to actively use the record. |
      | Script Validation | Script to validate inputs provided by the user in the modal. To validate the user-provided inputs, ensure that you are aware of the format in which values are retrieved from the modal and parse the response from Slack. The sample payload when user provides values for the Priority, Category, and Short Description fields in the Create Incident modal is: {"priority":{"4gk":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"1 - Critical","emoji":true},"value":"1"}}},"category":{"iV7":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"Software","emoji":true},"value":"software"}}},"short_description":{"XS/Q=":{"type":"plain_text_input","value":"hemanth"}}} To display validation errors in the modal, configure the script to return an object keys, status, and errorObject. errorObject should have a value of object that will be displayed on Slack. The object should have response_action and error. Also, configure the script to return an object with keys of status and statusMessage when there are no validation errors. statusMessage is optional and you can configure it as per your requirement. |
      [Table 2. Slack Modal Configuration form]

      {#conf-slack-modals__table_nwf_ng5_fpb}
   4. Right-click the form header and click Save.  
      The Create Incident modal is created in Slack.
   {#conf-slack-modals__substeps_mwf_ng5_fpb}
3. Specify conditions to define when the modals should be displayed:
   1. Navigate to SlackInbound Decisions For Modals .
   2. On the Decision form, fill these values.  
      {#conf-slack-modals__table_xk3_sk2_fpb__entry__2}

      | Field | Description |
      |-|-|
      | Label | Name to identify the inbound modal decision. |
      | Answer | Modal that must be displayed when the specified conditions are met. Ensure that you select the required record from the Slack Modal Configuration \[sn_slack_ah_v2_slack_modal_configuration\] table. |
      | Default Answer | Option to specify if this is the default modal. The default modal is applicable when the conditions are not met. |
      | Condition | Conditions to be met in your Slack application to display the modal. |
      [Table 3. Decision form]

      {#conf-slack-modals__table_xk3_sk2_fpb}  
      Note:  
      * Copy and record the value of sys_id. You can use this sys_id as the unique value in Callback ID while configuring the shortcut or message shortcut in your Slack app.  
        Note:  
        Two system properties are added to handle the inbound communications:{#conf-slack-modals__table_nz4_4fr_qwb__entry__4}

        | Category | Property name | Description | Example |
        |-|-|-|-|
        | Slash commands | sn_slack_ah_v2.command.special_characters | The characters encoded using the encodeURIComponent method are handled internally. To replace any additional special characters used in Slash commands in the Slack application with their encoded URI characters, add the characters in a JSON format. | { "\~" : "%7E", "\\(" : "%28", } |
        | Interactivity \& Shortcuts: | sn_slack_ah_v2.interactivity.special_characters | The characters encoded using encodeURIComponent method and the following characters are handled internally: <kbd class="ph userinput">!, ', (, ), *, ~</kbd> Fill in the property to replace any additional special characters used in Slack Interactivity \& Shortcuts in the Slack application with their Encoded URI characters in a JSON format. | { "\~" : "%7E", "\\(" : "%28", } |
        [Table 4. System properties]

        {#conf-slack-modals__table_nz4_4fr_qwb} To display modals for the required shortcut, in Condition, provide the sys_id of the modal's inbound policy record.
      * To display modals for the required Slack commands, in Condition, provide the required command for which the modal should be displayed.
      * To display modals for the required Slack block action, in Condition, provide the required action ID of the required block action for which the modal should be displayed.
      {#conf-slack-modals__ul_mmt_dr4_fpb}
   3. Click Submit.  
      When events in Slack meet conditions specified in the policy, the associated modal is displayed.  
      Note:  
      These inbound decisions are saved in the Decision tables. Users are cautioned against directly updating or modifying data in these tables.
   {#conf-slack-modals__substeps_rdn_zj2_fpb}
4. Specify tasks to be performed when user provides values in the modals by creating an inbound policy:
   1. Navigate to SlackInbound Decisions.
   2. Click New.
   3. On the Decision form, fill these values.  
      {#conf-slack-modals__table_khv_ww4_3mb__entry__2}

      | Field | Description |
      |-|-|
      | Label | Name to identify the inbound decision. |
      | Answer | Subflow that must be triggered when the specified conditions are met. |
      | Default Answer | Option to specify if this is the default answer. The default answer is applicable when the conditions are not met. 1. Click the lookup icon (![Lookup icon]()). 2. Select the required subflow from the Document list. Note: Ensure that the Table name is <kbd class="ph userinput">Flow [sys_hub_flow]</kbd>. {#conf-slack-modals__ol_sdf_ftb_1jb}Ensure that you have configured the subflow to process the response payload from Slack to automate tasks. |
      | Condition | Conditions to be met to perform tasks in ServiceNow instance. Specify the modal record in the condition. Note: Condition must have condition specific to the modal record only. |
      [Table 5. Decision form]

      {#conf-slack-modals__table_khv_ww4_3mb}
   4. Click Submit.  
      When Slack user provides inputs in the modal, the associated subflow is triggered after validating the inputs. Depending on the automations configured in your subflow, tasks are performed.
   {#conf-slack-modals__substeps_akn_xz4_fpb}

*[\>]: and then


