Decision Builder, how it can be an alternative of dl_matcher table extension for some use cases
Why we extend dl_matcher table?
Developers often follow a common practice in ServiceNow: when they need a custom table, they extend the dl_matcher table. The reason behind this approach is to save on licensing costs.
ServiceNow allows up to 10,000 extensions of the dl_matcher table without additional charges.
In contrast, if developers were to create an entirely new table from scratch, ServiceNow might impose licensing fees for that custom table.
Therefore, extending the existing dl_matcher table is a cost-effective choice. After extending it, developers can then add the necessary custom fields.
What is Decision Builder?
Decision Builder in ServiceNow: Simplifying Flow Logic
It’s like having a smart table where you feed it input attributes (think of these as columns), and it magically churns out an output result.
Here’s how it works:
No More If-Condition Overload: We all know that drowning in a sea of If conditions isn’t fun. Decision Builder rescues you from that fate! Instead of cluttering your flow with endless If statements, you outsource the decision-making to this handy table.
Input Attributes: You provide specific input parameters to Decision Builder. These could be anything variables, conditions, or data points relevant to your process.
Flow Designer Integration: Decision Builder plays well with Flow Designer. When designing a flow, you can call upon Decision Builder to make decisions for you. It’s like having an “If condition” on steroids!
Matching Conditions: Decision Builder evaluates your input against predefined conditions. If certain conditions match (like a secret code unlocking a treasure chest), it produces the expected output.
No More If-Condition Overload: We all know that drowning in a sea of If conditions isn’t fun. Decision Builder rescues you from that fate! Instead of cluttering your flow with endless If statements, you outsource the decision-making to this handy table.
Use cases of Decision Builder
Decision Builder vs. Custom Tables: A Battle of Logic
While Decision Builder can’t single-handedly replace custom tables entirely, it does swoop in as a superhero alternative for specific use cases. Here’s the scoop:
- Auto-Populating Fields: Imagine you’re in the Service Catalog realm, and your mission is to request an Azure Virtual Machine. Now, based on the chosen RAM, Storage, and Location, you need to auto-populate the License Plan variable.
- The Old Way (Custom Tables): Traditionally, you’d create and maintain a custom table to handle this logic. Extend the dl_matcher table, add new columns, and voilà! But wait—this path can lead to a tangled web of extended tables.
- Enter Decision Builder: Ta-da! Decision Builder steps onto the scene. It’s like having a wizard who knows exactly which spell to cast. You create a Decision table within Decision Builder, with input columns for RAM, Storage, and Location. Then, like magic, you define your result column: the License Plan.
- No Custom Table Hassle: Decision Builder saves you from custom table chaos. No more wrestling with extensions or juggling columns. It’s streamlined, efficient, and keeps your flow logic tidy.
- Decision Rows: Picture this: Decision Builder’s table is like a well-organized library. You add decision rows—each row containing selection criteria logic. For instance, if RAM is 8 GB, Storage is 128 GB, and Location is India, the result Plan would be “Spot VMs.”
- Flow Integration: Now, in your flow, call upon Decision Builder. Pass it input variables (RAM, Storage, Location), and watch it work its magic. Decision Builder evaluates, finds the right match, and hands you the perfect Plan as the output.
- User-Friendly Logic: Creating and maintaining a Decision Builder table is like sipping a cup of chamomile tea—calming and user-friendly. Plus, you can have multiple Decision Builder tables for different use cases, reducing your reliance on custom tables.
So, next time you’re faced with the decision dilemma, remember: Decision Builder—your trusty sidekick for targeted logic!