Legacy JSON Editing
Edit grandfathered pre-v10 slash commands and switches as JSON from Manage > Advanced, with automatic local snapshots before every save.
Last updated: April 17, 2026
Last updated: April 17, 2026
If you installed SN Utils before v10, any slash commands and switches you had back then are preserved under the legacy keys slashcommand_legacy and switch_legacy (older installs may also have slashsswitches). SN Utils keeps Monaco JSON editors for these grandfathered entries under Manage > Advanced > Legacy JSON Editing, so your existing work keeps working and you can edit it in place for as long as you want.
The editors are always mounted — even on a browser profile that has no legacy data — so you can paste a grandfathered JSON backup and Save to restore it (for example after reinstalling, switching machines, or accidentally clearing storage). A local snapshot is captured before every save.
From anywhere in ServiceNow, type /manage or click the gear icon in the popup header. On the Manage page, open the Advanced tab. You will see two sections:
Writes to slashcommand_legacy. Root shape is an object keyed by command name:
{
"myinc": {
"url": "/now/nav/ui/classic/params/target/incident_list.do%3Fsysparm_query%3Dshort_descriptionCONTAINS$0",
"hint": "Search my incidents",
"fields": "number,short_description"
}
}
url is required. $0, $1, ... are substituted with arguments, and $sysid with the selected row's sys_id. Other recognized fields:
hint — short description shown in the command palettefields — comma-separated list of columns to show in list resultsoverwriteurl / overwrite_url — replaces the instance URL entirely (useful for absolute URLs)description, category — optional metadataUnknown fields are preserved; the schema allows additional properties.
Writes to switch_legacy (falling back to slashsswitches on very old installs). Root shape is an object keyed by switch name — not an array. This is the legacy shape; the modern Switches tab uses an array of objects internally, but you do not edit that shape here.
{
"mine": {
"filter": "^assigned_to=javascript:gs.getUserID()",
"description": "Limit list to records assigned to me"
},
"pinned": {
"filter": "^sysparm_filter_pinned=true",
"description": "Only pinned records"
}
}
Recognized per-entry fields: filter, description, urlparam. The key name is the switch token users type after a dash (for example -mine).
When legacy data is present, the notice at the top of Legacy JSON Editing shows a Convert to Custom button (Pro). Clicking it opens a preview modal with:
slashcommand_customswitch_customConversion behavior:
pre-convert snapshot is captured in IndexedDB automatically.slashcommand_custom and switch_custom. Existing custom entries take priority on key conflicts.After a successful convert, the modern entries are what the Commands and Switches tabs show, and they participate in Pro cloud sync.
Each editor has an explicit Save button (no silent auto-save). Save runs in this order:
JSON.parse — if the JSON has a syntax error, the editor shows a red banner and does not write.url on a command), you are asked whether to save anyway.pre-raw-save snapshot is captured in IndexedDB.chrome.storage.local.Each editor also has a Reload button that re-reads the current storage value (with confirmation if there are unsaved edits). If another part of the extension writes the same legacy key while you have unsaved edits, a banner appears above the editor with a Reload link — your in-flight edits are not overwritten until you explicitly Save or Reload.
Every destructive action captures a local snapshot in IndexedDB (database name snuDataSnapshots). Snapshots are purely local — they do not sync to the cloud, and they do not count against the chrome.storage.local 10 MB quota.
Snapshots are created automatically in these situations:
pre-convertpre-login-wipepre-legacy-deletepre-raw-saveYou can also create a manual snapshot any time via the Data Snapshots panel.
For each snapshot the panel lists the timestamp, the trigger, the captured key counts, and four actions:
Pruning keeps the 20 most recent snapshots and anything under 90 days old, whichever set is larger.
If you have a grandfathered JSON backup (an export you saved yourself, a copy from another browser, a teammate's snippet, or content recovered from a Data Snapshot elsewhere), paste it into the relevant editor and click Save. Behavior:
slashcommand_legacy.switch_legacy.pre-raw-save snapshot is captured first, so the prior storage value (even if empty) is recoverable from the Data Snapshots panel.This is the intended rescue path when the legacy keys are empty on a browser but you have the JSON elsewhere. It does not grant a raw-edit path for modern custom data — the editors only ever touch the legacy keys.
I broke my legacy JSON after a paste. Open the Data Snapshots panel, find the pre-raw-save snapshot from just before the paste, and click Restore (replace). The pre-paste value was captured automatically.
My commands disappeared after signing in. A pre-login-wipe snapshot is captured before the extension clears sync state for a fresh pull. If the pull did not bring back something you had locally, restore it from that snapshot.
Schema warnings appear as red underlines. The JSON schema is intentionally conservative: url is required on legacy commands. Unknown properties are allowed, so custom fields from very old installs won't be flagged. You can choose to Save anyway when there are structural warnings — the snapshot still captures the previous value first.