42 Artifact Classes via the ServiceNow Fluent SDK: A Complete Reference
The Fluent SDK turns ServiceNow artifacts into source code. SnowCoder Yeti Build Agent covers 42 of those artifact classes - here is the practical reference.
Why the Fluent SDK Matters
The ServiceNow Fluent SDK (the @servicenow/sdk npm package) lets developers express ServiceNow artifacts as TypeScript code. Instead of hand-crafting records through the platform UI and shipping them as Update Sets, the SDK turns each artifact into a declarative function call that can be committed to git, diffed, reviewed, and replayed against any Zurich-onwards instance.
SnowCoder Yeti Build Agent uses 42 of the Fluent SDK artifact classes as its primary output format. The same coverage that powers the 291-story build benchmark is what every customer pipeline gets when it runs.
This reference groups the 42 artifact classes into eight categories and gives a short example for each category.
Category 1: Data Model
These classes define the shape of data on the instance: tables, columns, choice lists, and dictionary overrides.
- Table: custom tables, extensions, and table options.
- Column: field definitions with type, length, and reference targets.
- Choice: choice list entries tied to a column.
- DictionaryOverride: per-table overrides of inherited fields.
- Index: database indexes on table columns.
import { Table, Column, Choice } from '@servicenow/sdk/global';
Table({
name: 'x_acme_review',
label: 'Review',
extends: 'task',
columns: {
outcome: Column({ type: 'choice' }),
rating: Column({ type: 'integer', min: 1, max: 5 })
}
});
Choice({ column: 'outcome', value: 'approved', label: 'Approved' });
Choice({ column: 'outcome', value: 'rejected', label: 'Rejected' });Category 2: Server-Side Behavior
These classes generate the server-side scripts that fire as records move through their lifecycle.
- BusinessRule: before, after, async, and display rules.
- ScriptInclude: reusable server-side classes.
- ScheduledJob: jobs that run on a cron schedule.
- FixScript: one-time scripts that ship with an Update Set.
- EventRegistration: declared events for gs.eventQueue.
- NotificationScript: the script body of a notification.
import { BusinessRule, ScriptInclude } from '@servicenow/sdk/global';
ScriptInclude({
name: 'ReviewScorer',
script: `var ReviewScorer = Class.create();
ReviewScorer.prototype = {
initialize: function() {},
score: function(rating, outcome) {
if (outcome == 'rejected') return 0;
return parseInt(rating) * 20;
},
type: 'ReviewScorer'
};`
});
BusinessRule({
name: 'Calculate review score',
table: 'x_acme_review',
when: 'before',
operations: ['insert', 'update'],
script: ({ current }) => {
current.score = new ReviewScorer().score(current.rating, current.outcome);
}
});Category 3: Client-Side and UI
These classes drive the form and list behavior end users see.
- ClientScript: onLoad, onChange, onSubmit, and onCellEdit scripts.
- UIPolicy: declarative form behavior driven by conditions.
- UIAction: form buttons, list buttons, and related links.
- FormLayout: the field order and sections on a form.
- ListLayout: the columns and ordering of a list view.
- RelatedList: related lists attached to a form.
import { UIPolicy } from '@servicenow/sdk/global';
UIPolicy({
name: 'Require rating when approved',
table: 'x_acme_review',
conditions: 'outcome=approved',
actions: [
{ field: 'rating', mandatory: true }
]
});Category 4: Security
Security artifacts are first-class in the Fluent SDK. SnowCoder generates them with explicit conditions and scripts rather than inheriting wide-open defaults.
- ACL: read, write, create, delete on table, field, or record.
- Role: custom roles that can be assigned to users or groups.
- ContextualSecurityRule: contextual security rules attached to a context.
- DataPolicy: server-side data policies that mirror UI Policies.
import { ACL } from '@servicenow/sdk/global';
ACL({
name: 'x_acme_review.write',
operation: 'write',
table: 'x_acme_review',
roles: ['x_acme_reviewer'],
script: `answer = (current.assigned_to == gs.getUserID());`
});Category 5: Flow Designer
The Fluent SDK exposes Flow Designer constructs so that flows can be source-controlled alongside server-side code.
- Flow: top-level flow with triggers and steps.
- Subflow: reusable sequences of actions.
- FlowAction: custom actions that can be reused across flows.
- FlowTrigger: record, schedule, inbound, and REST triggers.
Category 6: Integration
External integration artifacts are covered so the SDK output captures the full surface of a working integration.
- RESTMessage: outbound REST messages with HTTP methods.
- SOAPMessage: outbound SOAP messages.
- ScriptedRESTAPI: inbound REST APIs with versioned resources.
- ImportSet: import set tables.
- TransformMap: transform maps with field mappings.
- OAuthProfile: OAuth configuration for outbound integrations.
import { ScriptedRESTAPI } from '@servicenow/sdk/global';
ScriptedRESTAPI({
name: 'Reviews API',
base_uri: '/api/x_acme/reviews',
resources: [
{
name: 'list',
http_method: 'GET',
relative_path: '/',
script: `var gr = new GlideRecord('x_acme_review');
gr.query();
var out = [];
while (gr.next()) {
out.push({ id: gr.getUniqueValue(), outcome: gr.outcome.toString() });
}
return out;`
}
]
});Category 7: Service Portal and Workspaces
The end-user surface is covered for both Service Portal and Now Experience workspaces.
- PortalWidget: Service Portal widget template, client script, and server script.
- PortalPage: portal pages with containers and rows.
- PortalTheme: theme definitions for portal branding.
- WorkspacePage: Now Experience pages.
- WorkspaceTab: tabs within a workspace.
Category 8: Quality and Tooling
The final category covers the artifacts that exist to make the others maintainable.
- ATFTest: Automated Test Framework tests with steps and assertions.
- ATFTestSuite: grouped ATF tests that run together.
- SystemProperty: sys_properties entries that drive runtime behavior.
- Notification: email notifications tied to records or events.
- UpdateSet: Update Set definitions for grouping artifacts.
- ApplicationMenu: application navigator menus and modules.
import { ATFTest } from '@servicenow/sdk/global';
ATFTest({
name: 'Approved review requires rating',
steps: [
{ type: 'open_form', table: 'x_acme_review' },
{ type: 'set_field_value', field: 'outcome', value: 'approved' },
{ type: 'submit_form', expect_success: false },
{ type: 'assert_field_mandatory', field: 'rating' }
]
});How SnowCoder Selects the Right Artifact Class
A story rarely names the artifact class. It says what the behavior should be. SnowCoder maps the intent onto the right class during the Technical Spec stage.
For example, a story asking to "require approval when the change risk is high" is implemented as a Flow rather than a chain of Business Rules. A story asking to "prevent overlapping reservations" is implemented as a before Business Rule because it needs to abort the transaction. The mapping is driven by the same decision logic an experienced ServiceNow developer would apply.
The full list of 42 classes is what gives Yeti Build Agent enough vocabulary to express almost any normal ServiceNow story as Fluent SDK output without falling back to hand-crafted records.
Related Reading
Generate Fluent SDK output for your next story
Bring a real backlog item. SnowCoder emits the Fluent SDK project ready to install on a Zurich instance.