IT CanvassTalk to an advisor
Development · LessonBy , ServiceNow Trainer, 9 yrs · Published · current release · intermediate

Application scoping

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

Quick answer

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.

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.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
A scoped app provides...

Frequently asked questions

What does the term Application scoping refer to in ServiceNow?
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.
What scripting is involved in Application scoping?
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.
What is another point to note about Application scoping?
Scoped apps travel between instances via update sets or, better, source control, which is where DevOps and CI/CD pipelines take over.
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