IT CanvassTalk to an advisor
Development · LessonReviewed by Praveen T, ServiceNow Trainer, 9 yrs · Updated · Published · current release · intermediate

ServiceNow Application scoping

Package your work into scoped apps with clear boundaries, namespaces and APIs.

Quick answer

A scoped application in ServiceNow is custom development packaged under its own namespace, such as x_acme_travel, with its own tables, script includes and files. Nothing outside the scope can touch it unless a cross-scope access record allows it, which is what makes it isolated and portable, publishable to the Store, and safer than building in Global.

Key takeaways
  • Why scope matters
  • Scope and the API surface
  • Tie-in with delivery
  • Try it Yourself

Scoped applications are how you package custom development so it is isolated, portable and safe. Every scoped app has its own namespace (like x_acme_travel), its own tables and files, and explicit rules about what it may touch outside itself. This is the modern default, the opposite of dumping everything in the Global scope.

Why scope matters

  • Isolation, your app can't accidentally break another; cross-scope access is opt-in.
  • Namespacing, tables and script includes are prefixed, avoiding collisions.
  • Distribution, scoped apps publish to the ServiceNow Store or an internal repo.
  • Governance, runtime access to other scopes is controlled by cross-scope access records.
Global is not the safe default. It feels easier to build in Global, but Global code can reach anything and is hard to move and govern. Build in a scope from the start; Global should be reserved for genuinely instance-wide platform tweaks.

Scope and the API surface

// A scoped Script Include exposed to other scopes var TravelAPI = Class.create(); TravelAPI.prototype = { initialize: function() {}, bookedTrips: function(userId) { /* ... */ }, type: 'TravelAPI' }; // Set Accessible-from: All application scopes to share it

Tie-in with delivery

Scoped apps travel between instances via update sets or, better, source control, which is where DevOps and CI/CD pipelines take over.

Try it YourselfJavaScript
▸ Press Run to execute.

Runs in a sandbox in your browser. Mock gs and GlideRecord and sample data are provided.

Practise this on your own free instance.
Set up your free instance →
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support