Saurabh Gupta
Kilo Patron

Introduction:

ServiceNow Decision Tables are an invaluable feature that streamlines complex decision-making processes based on multiple factors. Whether you're automating incident categorization, change management approvals, or asset assignments, Decision Tables provide a structured and efficient way to determine outcomes. In this comprehensive guide, I will explore the components of Decision Tables, real-world use cases, best practices, and practical steps to create Decision Tables in ServiceNow.

For any sort of mapping no more custom tables are needed.

Understanding ServiceNow Decision Tables

  • Overview:

    • Decision Tables are a powerful tool for resolving complex decisions that depend on multiple factors.
    • Each factor is treated as a decision input, creating a structured and organized format for decision-making.
  • Components of Decision Tables:

    • Decision Table records represent a single decision, specifying the table used for answers.
    • Decision input records represent the inputs used to obtain answers, supporting various types like strings, references, true/false, and dates.
    • Decision records represent individual decisions based on inputs, with conditions created using the condition builder.
    • Answer records represent outcomes reached using different decision input values, chosen from the specified table.

Creating a Decision Table in ServiceNow

  • Before You Begin:

    • Role required: decision_table_admin.
    • Selection or creation of a table for decision answer records.
    • Ensuring a display value field is set on the table used for decision records.
  • Procedure:

    • Create or select a table for decision answer records.
    • Create records on this table for each answer in your decision.
    • Create a decision table record, specifying the answer table and other relevant details.
    • Create decision input records, defining the inputs used for the decision.
    • Create decision records, associating decisions with conditions, answers, and default options.

 I have created an example of Location and Location Size Based Routing.

SaurabhGupta_1-1702547166814.png

 

 Sub flow to get the decision answer

SaurabhGupta_0-1702549059595.png

 

 

DecisionTableAPI - Scoped, Global

Use the DecisionTableAPI class to access Decision Tables data in scoped and global server-side scripts.
To access DecisionTableAPI methods, use the sn_dt namespace. You must have the decision_table_crud_api role to use this API.


ServiceNow Docs: Create a decision table to resolve complex decisions (servicenow.com)



C

If you found value in this blog/article, I'd be grateful if you could either bookmark it or mark it as helpful.

2 Comments
Mosh Jah_n
Tera Explorer

Many of my complex needs require the use of regular expressions. It would be great if we could use regular expressions too in decision tables.

SruthiS
Tera Contributor

Would be beneficial if we could use decision tables for assessment metrics when one metric output is result of multiple dependent metrics of the same assessment record.