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 SDK (the @servicenow/sdk npm package) lets developers express ServiceNow metadata as ServiceNow Fluent TypeScript code. Instead of hand-crafting records through the platform UI and shipping them only as Update Sets, Fluent metadata can be committed to git, diffed, reviewed, and deployed to supported instances. SnowCoder's product floor is Zurich; ServiceNow SDK 4.4 supports instances from Washington DC onward.
SnowCoder Yeti Build Agent targets 42 ServiceNow artifact types through Fluent source and generated platform metadata. The same coverage that powers the 291-story build benchmark is what every customer pipeline gets when it runs.
This reference groups those 42 artifact types into eight categories and gives a short example for each category.
Category 1: Data Model
These artifacts define the shape of data on the instance: tables, typed columns, choice lists, and dictionary overrides.
- Table: custom tables, extensions, and table options.
- Typed columns: field definitions such as StringColumn, ChoiceColumn, IntegerColumn, and ReferenceColumn.
- Choices: choice list entries configured inside supported choice columns.
- DictionaryOverride: per-table overrides of inherited fields.
- Index: database indexes on table columns.
import { Table, ChoiceColumn, IntegerColumn } from '@servicenow/sdk/core';
export const x_acme_review = Table({
name: 'x_acme_review',
label: 'Review',
extends: 'task',
schema: {
outcome: ChoiceColumn({
label: 'Outcome',
choices: {
approved: { label: 'Approved', sequence: 100 },
rejected: { label: 'Rejected', sequence: 200 }
}
}),
rating: IntegerColumn({ label: 'Rating' })
}
});Category 2: Server-Side Behavior
These artifacts 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 '@servicenow/sdk/global';
import { BusinessRule, ScriptInclude } from '@servicenow/sdk/core';
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({
$id: Now.ID['calculate_review_score'],
name: 'Calculate review score',
table: 'x_acme_review',
when: 'before',
action: ['insert', 'update'],
script: `current.score = new ReviewScorer().score(
current.getValue('rating'),
current.getValue('outcome')
);`
});Category 3: Client-Side and UI
These artifacts 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 '@servicenow/sdk/global';
import { ClientScript } from '@servicenow/sdk/core';
ClientScript({
$id: Now.ID['show_rating_help'],
name: 'Show rating help',
table: 'x_acme_review',
type: 'onChange',
field: 'outcome',
uiType: 'all',
script: `function onChange(control, oldValue, newValue) {
if (newValue == 'approved') {
g_form.showFieldMsg('rating', 'Rating is required for approved reviews', 'info');
}
}`
});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 '@servicenow/sdk/global';
import { ACL } from '@servicenow/sdk/core';
ACL({
$id: Now.ID['x_acme_review_write_acl'],
name: 'x_acme_review.write',
type: 'record',
operation: 'write',
table: 'x_acme_review',
roles: ['x_acme_reviewer'],
script: `answer = (current.getValue('assigned_to') == gs.getUserID());`
});Category 5: Flow Designer
ServiceNow Fluent includes Flow APIs, and Australia SDK 4.4 adds Service Catalog trigger and action support. That lets supported flow metadata 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
Integration artifacts are part of the build vocabulary so source-controlled output can capture the integration surface that belongs to the application.
- 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/core';
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 '@servicenow/sdk/global';
import { Test } from '@servicenow/sdk/core';
Test({
$id: Now.ID['approved_review_requires_rating'],
active: true,
failOnServerError: true,
name: 'Approved review requires rating',
description: 'Confirms approved reviews require a rating'
}, (atf) => {
atf.form.openNewForm({
table: 'x_acme_review',
formUI: 'standard_ui',
view: ''
});
});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 catalog of 42 target artifact types is what gives Yeti Build Agent enough vocabulary to express most normal ServiceNow stories as source-controlled output, using first-class Fluent APIs where available and generated platform metadata where the current SDK requires it.
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.