Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Workflow Automation CoE > Decision Tables > Best Practices

 

Guidance and practical tips

 

Application Scope

  • Create Decision Tables in a scoped application.
  • Use ServiceNow source control integration with Git for versioning, forking and branching of your decisions.
  • Application names should not include version as part of the name.

When to use Decisions

  • Use Decision Tables when your flow has a condition with nested else-ifs.
  • Decision Tables are a way to create if, else-if, else-if, ... else statements in a highly performant way.
    • They also decouple the conditional logic from the code (the Flow, Script Include, Business Rule, UI Action, etc), where the decision is an argument, and the value/output of the decision is determined via the decision table.
    • With this approach, decisions can change, without re-developing and changing your code (Flow, Script, etc..).
    • You may choose to offer business users the ability to change the decision table values and outcomes, without requiring a developer to release modifications to the code.
  • Use Decision Tables when your logic (decisions) change over time, allowing for your code (Flow, Script, Business Rule, etc) to remain consistent.

Branches

  • If the steps following your decision are (mostly) the same, you can uncheck the “Use branches” option and use decision outputs (result columns) as variable input for the subsequent steps. This allows your decisions to be easily extensible.
  • If the steps following the decision are decidedly different, use branches.
  • Branching is restricted to 10 max.

Decision Inputs

  • Consider who is building & maintaining the decision. If the responsible person doesn’t know SN architecture, it’ll be easier to work with simple inputs.
  • If you’re using fields from a table in your conditions, add a reference input instead of individual String, Integer, True/False, etc. fields. This way you don’t risk asking for inputs that you can’t supply to the decision.
  • You can dot-walk to related records from your reference input, e.g., build a condition on a field from the parent task.
  • Alternatively, create separate reference inputs if you want to benefit from the color coding if you have many conditions in the same decision.
  • Currency and FX Currency field types are currently (as of Tokyo) not supported for decision conditions.

 

Center of Excellence Navigation

  1. Workflow Automation - Center of Excellence
  2. Workflow Automation Migration Considerations
  3. What's new for Workflow Automation?
  4. Resource Hubs
    1. Flows
    2. Decision Tables
    3. Playbooks
  5. FAQ
  6. Checklist
  7. Training
  8. Workflow Academy
Comments
Kevin
Tera Expert

Can anyone tell me if Decision tables are included in Updates Sets?

I've created one in DEV - incorporated into to Flow * it works as expected in DEV

Then created an Update Set, when I promoted the Update set to STAGE the Decision table isn't there

How to you Copy a decision table, to force it in to an Update set?

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Hi @Kevin,

Decision Tables are captured in your current Update Set when you save them. So in your case, if you created the Update Set later, it wouldn't be in there. You can make a small change (maybe the decision table name or an input description), save it, then optionally change back, save it again, and you should be good to go.

 

KR,

Lisa

Adam43
Tera Contributor

Is there a consolidated place for awesome examples of people's implementation of decision builder?  We've got a complex flow tasking process that we just converted to a decision table, and now we're wondering what other process flows we might consider for converting- thought we'd like to review what other's have done and thought "Why didn't we do that sooner? decision tables are amazing!"

kemmy1
Tera Guru

Can you call a decision table and get the answers from a Business rule?

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

@kemmy1 absolutely! Check out this article about the DecisionTableAPI, also linked from the Decision Builder Overview article 🙂

Stacey Sikawa
Tera Contributor

I am receiving an error after updating app engine studio and decision builder.  I am not able to open a decision table.  See screen shots.  There are other people reporting also. 

Screenshot 2024-05-14 122303.png

 

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Hi @Stacey Sikawa,
please check the Application Manager for updates to the Workflow Studio store app. Decision Builder will be released through that starting from the Washington May Store release.
AES is not one of the products I cover, but I'd think making sure to install the latest App Engine Studio app would be a good idea as well.
If updating the apps doesn't solve the issue, kindly submit a Case to https://support.servicenow.com/ 

DeepakP
Tera Contributor

Can decision table data internally crate any custom table in service now?

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

@DeepakP Not sure what you're asking. Decision Tables do not run logic or create anything on their own, they will return result values for the first or all condition rows that equate to true. What you do with those result values is up to you and depends on where you use the decision table from.

DeepakP
Tera Contributor

@Lisa thanks for your inputs.

We have requirement on decision table but data in decision table should not create any kind of custom table and Yes entries of decision table are stored in sys_decision_question table  which OOB not custom one.

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

@DeepakP  When you create Decision tables in Workflow Studio, all inputs, condition columns, decision rows, and result columns are part of the Decision table metadata. It will not create custom tables for you. If you have custom tables that you created as part of a custom app or in the global scope, these will be available as references for inputs and result columns.

DeepakP
Tera Contributor

@Lisa Holenstein I'm working on Servicenow and Jira Integration but I need pass dynamic values from Decision table to Jira, So I go for subFlow for dynamic inputs.

When we go for "Create Issue" then parameters(Project ID, Issuetype) are autopopulate from Jira(Snap-1) but My requitement is that that value present in Jira also we need to pass from Decision Table...Is it Possible ?

As I went through it(Snap-2) but its not working so shall I add Backend values of Jira in Decision Table instead of field name  ?Create Issue Page Snap.pngCreate Issue Page Snap 2.png  

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

@DeepakP The Jira Spoke is outside of my realm of knowledge, so I'll have to ask you to either post your question over on the Automation Engine forum, or, if you suspect that something is broken and not working as intended, please submit a support case.

Version history
Last update:
‎02-14-2025 05:39 AM
Updated by:
Contributors