Introduction
Very often, we’ll find ourselves writing a custom application (whether scoped or global) that requires some “setup” by the admin who installs it. Maybe we’re writing the app to be distributed to multiple ServiceNow customers, each with their own environments and needs; or maybe the app just requires a unique setup process in each instance we promote it to. Whatever the case, I’ve often had cause to want to build my own “guided setup”.
Unfortunately, for some reason, ServiceNow has made it difficult to create a guided setup in our own development instances.
In this article, we’re going to learn how to get around those limitations; then, we’re going to learn how to build a guided setup ourselves!
Setup
There are three important tables relating to Guided Setup:
Guided Setup Contents [gsw_content]
Guided Setup Information[gsw_content_information]
Guided Setup Group [gsw_content_group]
Before we can create our own Guided Setup, we first have to get “write” and “create” access to each of these tables. You could go in and, after elevating to the security_admin role, create all of the necessary ACLs to grant admins access to both operations on each of these tables, but c’mon chum, don’t worry about it. I got you. 😉
Simply download and install the Update Set linked below, and you’ll be all set to move on to the next step and begin building your guided setup.
Update Set to Access Guided Setup Records
Click here to download the Update Set that’ll grant admins in your environment access to the tables related to Guided Setup.
From the Application Navigator in your dev environment, navigate to Retrieved Update Sets.
Scroll to the bottom of the Retrieved Update Sets list, until you see a link below the list that says Import Update Set from XML. Click that link.
Click Choose File and select the XML file you just downloaded, then click the blue Upload button.
Return to the Retrieved Update Sets list, and find the update set you just imported. It’ll have a name beginning with “SNG-Allow Guided Setup Access”. Open that Update Set.
If there is a “Preview” button on the retrieved Update Set, click it and allow the preview to finish.
Click on Commit Update Set.
Create the Guided Setup
Create Root Guided Setup Group
Now that you’ve got access to the Guided Setup tables, let’s start creating our Guided Setup. The first step in doing so, is to create a “root” Guided Setup Group. Guided Setup Groups, you may recall, live in the gsw_content_group table, so let’s begin there.
Navigate to the gsw_content_group table, and click the New button (which should now be visible to you if you’ve installed the above Update Set).
Note: You can also get here by going to the gsw_content table, and clicking New, then clicking on “Content that groups other content” from the interceptor page. Either way works, this way just saves you one click.
Populate the “New record” form for your Guided Setup Group, like so:
Title: Since we’re creating the “root content” right now, this will be the title of your overall Guided Setup. It will show up at the top of the Guided Setup form whenever a user views it. I’m calling my root Guided Setup Group “Example Application Setup”.
Is root content: Set this to true.
You’ll notice some of the fields on the form change. For example, the “Parent Content” field disappears. This is normal.Order: Since this is our root content group, set the Order field to 0.
Maximum children to display: This doesn’t really matter all that much, but I set it to 10 for my Guided Setup.
Roles: I recommend setting this to either admin or to your application’s administrative role.
Description: Set this field to something… you know… descriptive. This will be shown below the title on your Guided Setup page.
Save the new Guided Setup Group.
When you’re finished, your Guided Setup Group should look something like this:
Add a Child Group
Once the root content is created, you can follow one of two paths: either add a few steps directly to the root group (works best if you only have a few steps total), or add one or more child groups to which you’ll add the steps. For our example, we’re going to use the more common approach: creating child groups. If you’re just adding content directly to your root content group, you can simply skip this step.
Note: You cannot have a mix of groups and steps in a single Content Group (including your root Content Group).
Scroll to the bottom of of the form for your root Content Group. There, you should see a Guided Setup Contents related list, which - if you installed the Update Set above - should also have a blue New button. Click that button.
We’ll be redirected to an “interceptor” page that asks what kind of content we want to create. Since we’re creating a new child group to live under our root Content Group, click on Content that groups other content.
From here, the process is very similar to when we created the root Content Group, except we don’t check the Is root content checkbox.
On this form, simply populate the Title and Description fields with whatever you like, and set the Order field to whatever’s appropriate.For my first Content Group, I usually use an order of 100. For the second, I use 200, and so on. That way, I have plenty of room to slot other Content Groups in-between two existing ones if I realize I need to do that later on, but without having to modify the order value of every other Content Group.
If you want your users to be able to skip this entire content group, leave the Skippable field set to true. If the steps in this Content Group are mandatory, however, then un-check that box. For my application, the steps in this Content Group will be mandatory, so I’m un-checking it.
Save your child Content Group by right-clicking on the gray header, and clicking Save.
Once finished, your child Content Group should look something like this.
Note that the Parent Content and Parents fields are pre-populated, and we’ve left them alone.
Create Guided Setup Content
Whether you’re adding actionable content directly to your root Content Group, or to a child Content Group, navigate to whatever Content Group you’d like to add actionable steps to, and follow the below steps.
Just as in the above section, scroll to the bottom of of the form for the Content Group into which you’d like to add actionable content. There, you should see a Guided Setup Contents related list. Click the blue New button in that related list.
On the Interceptor page, since we’re now adding actionable content, click on Content that navigates users to configuration pages. That should take you to the “New record” form for the gsw_content_information table.
As should be old hat by now, set a meaningful Title, Order, and Article (basically just a “description”).
If this specific step isn’t mandatory, leave Skippable checked; otherwise, un-check it.Select an End Point Type. If you just want to give the user some “instructions” and expect them to follow them and then mark the task as complete, you can leave this field set to “— None —”. However, whenever possible, it’s best to guide them straight to the content they’ll need to interact with or update.
The options in this field are relatively self-explanatory, but feel free to experiment. When in doubt, use Custom and just specify the relative content URL. For my case, I’m having the user set a system property, so I’m setting the End Point Type field to Property.For most End Point Types, you’ll have to set the End point open mode field. I recommend setting this to Open inline, but feel free to experiment with the different behaviors!
Since I selected an End Point Type of “Property”, I need to specify the Property name.
Note: Sometimes, the first time you select an End Point Type of Property, the Property value field is mandatory. It should not be.
You can work around this annoying behavior by putting anything in that field, saving the form, and then you should be able to clear the field without it being mandatory.
If that doesn’t work, press CTRL+SHIFT+J to open the client-side script executor, and copy/paste the following code. Then, click Run my code to make the field non-mandatory, and you should be able to save the form without specifying a Property value.g_form.setMandatory('property_value', false);
Once finished, my Guided Setup step form looked like this:
Linking/Navigating to your Guided Setup
To link to your Guided Setup, you’ll need the root Content Group’s sys_id. You can easily navigate there by clicking through the Parent Content field on any of your Guided Setup Content/Group(s) until you get to the “top”. Once on the root Content Group, right-click the header, and click Copy sys_id.
Assuming the sys_id of your root Content Group is 2319d59d0733201032f0f16c7c1ed0a6, the URL to your Guided Setup’s front-end, is:
https://YOUR_INSTANCE.service-now.com/$guided_setup.do#/content/2319d59d0733201032f0f16c7c1ed0a6
To add a link to your Guided Setup to your Application Menu in the ServiceNow Application Navigator, simply create a new Module (in the sys_app_module table) under your application’s Application Menu, set the Link type to URL (from Arguments:), and set the Arguments field to $guided_setup.do#/content/<Root Content Group sys_id>.
-
March 2024
- Mar 28, 2024 How to Identify Duplicate Records by Multiple Fields in ServiceNow Mar 28, 2024
- Mar 7, 2024 How to Merge Personal & Company ServiceNow Accounts Mar 7, 2024
-
February 2024
- Feb 12, 2024 5 Lessons About Programming From Richard Feynman Feb 12, 2024
-
July 2023
- Jul 5, 2023 Managing Instance-Specific System Properties for Dev/Test/Prod in ServiceNow Jul 5, 2023
-
May 2023
- May 11, 2023 5 Ways to Check your ServiceNow Instance for DANGEROUS CODE in Less Than 5 minutes May 11, 2023
-
April 2023
- Apr 28, 2023 Your ACLs and Business Rules are Broken (Here's How to Fix Them) Apr 28, 2023
-
December 2022
- Dec 13, 2022 ServiceNow Developers: BE THE GUIDE! Dec 13, 2022
-
October 2022
- Oct 19, 2022 A Faster, More Efficient Client-side GlideRecord (Free tool!) Oct 19, 2022
- Oct 9, 2022 Animated Loading Message & Collapsible Details on ServiceNow Form or Field (Client-side) Oct 9, 2022
-
August 2022
- Aug 23, 2022 Using .addJoinQuery() & How to Query Records with Attachments in ServiceNow Aug 23, 2022
- Aug 18, 2022 Free, Simple URL Shortener for ServiceNow Nerds (snc.guru) Aug 18, 2022
- Aug 16, 2022 How to Get and Parse ServiceNow Journal Entries as Strings/HTML Aug 16, 2022
- Aug 14, 2022 New tool: Get Latest Version of ServiceNow Docs Page Aug 14, 2022
-
March 2022
- Mar 4, 2022 How to Set or Change ServiceNow Application's Repository URL, Credentials, or SSH Key Mar 4, 2022
-
February 2022
- Feb 7, 2022 How to return a CSV file from a Scripted REST API (SRAPI) in ServiceNow Feb 7, 2022
-
May 2021
- May 3, 2021 Adding a Guided Setup to Your ServiceNow Application May 3, 2021
-
April 2021
- Apr 27, 2021 Use Automated Tests to Validate "Guided Setup" Completion & Functionality. Apr 27, 2021
-
February 2021
- Feb 11, 2021 "Processors", SRAPIs, and How to Run a Script and Redirect a User From a URL in ServiceNow Feb 11, 2021
-
November 2020
- Nov 17, 2020 SN Guys is now part of Jahnel Group! Nov 17, 2020
-
September 2020
- Sep 14, 2020 Better ServiceNow Notifications (& Another FREE Tool!) Sep 14, 2020
-
July 2020
- Jul 31, 2020 Debugging Client & Catalog Client Scripts in ServiceNow Jul 31, 2020
-
January 2020
- Jan 20, 2020 Getting Help from the ServiceNow Community Jan 20, 2020
-
December 2019
- Dec 18, 2019 Can ServiceNow Script Includes Use the "current" Variable? Dec 18, 2019
-
November 2019
- Nov 18, 2019 Handling 'text/plain' and Other Unsupported Content Types in ServiceNow Scripted REST APIs Nov 18, 2019
-
April 2019
- Apr 21, 2019 Understanding Attachments in ServiceNow Apr 21, 2019
- Apr 10, 2019 Using Custom Search Engines in Chrome to Quickly Navigate ServiceNow Apr 10, 2019
- Apr 4, 2019 Set Catalog Variables from URL Params (Free tool) Apr 4, 2019
- Apr 1, 2019 Outlook for Android Breaks Email Approvals (+Solution) Apr 1, 2019
-
March 2019
- Mar 11, 2019 GlideFilter is Broken - Free Tool: “BetterGlideFilter” Mar 11, 2019
-
February 2019
- Feb 27, 2019 Making Update Sets Smarter - Free Tool Feb 27, 2019
-
November 2018
- Nov 29, 2018 How to Learn ServiceNow Nov 29, 2018
- Nov 6, 2018 ServiceNow & ITSM as a Career? Nov 6, 2018
-
October 2018
- Oct 19, 2018 Asynchronous onSubmit Catalog/Client Scripts in ServiceNow Oct 19, 2018
- Oct 11, 2018 How to do Massive, Slow Database Operations Efficiently With Event-Driven Recursion Oct 11, 2018
-
September 2018
- Sep 18, 2018 Broken Queries & Query Business Rules in ServiceNow Sep 18, 2018
- Sep 7, 2018 JournalRedactor - Easily Redact or Delete Journal Entries in ServiceNow! Sep 7, 2018
-
July 2018
- Jul 23, 2018 Admin Duty Separation with a Single Account Jul 23, 2018
-
June 2018
- Jun 19, 2018 Improving Performance on Older Instances with Table Rotation Jun 19, 2018
- Jun 4, 2018 New Free Tool: Login Link Generator Jun 4, 2018
-
May 2018
- May 29, 2018 Learning ServiceNow: Second Edition! May 29, 2018
-
April 2018
- Apr 17, 2018 Upgrading From Express to Enterprise: What's Missing Apr 17, 2018
- Apr 12, 2018 If a Genie Gave Me Three Wishes, I'd Use Them All to "Fix" Scope Apr 12, 2018
-
March 2018
- Mar 19, 2018 Service Catalog "Try in Portal" button Mar 19, 2018
- Mar 15, 2018 Video: Custom Output Transition Conditions From a Single Workflow (Script) Activity Mar 15, 2018
-
February 2018
- Feb 11, 2018 We have a new book! Feb 11, 2018
-
November 2017
- Nov 6, 2017 Requiring Attachments (& Other Miracles) in Service Portal Nov 6, 2017
-
September 2017
- Sep 12, 2017 Handling TimeZones in ServiceNow (TimeZoneUtil) Sep 12, 2017
-
July 2017
- Jul 27, 2017 How to Enable DOM Manipulation in ServiceNow Service Portal Catalog Client Scripts Jul 27, 2017
-
June 2017
- Jun 25, 2017 What's New in ServiceNow: Jakarta (Pt. 1) Jun 25, 2017
- Jun 4, 2017 Powerful Scripted Text Search in ServiceNow Jun 4, 2017
-
May 2017
- May 9, 2017 Work at Lightspeed: ServiceNow's Plan for World Domination May 9, 2017
-
April 2017
- Apr 9, 2017 Avoiding Pass-By-Reference Using getValue() & setValue() Apr 9, 2017
- Apr 4, 2017 "Learning ServiceNow" is Now Available for Purchase! Apr 4, 2017
-
March 2017
- Mar 12, 2017 reCAPTCHA in ServiceNow CMS/Service Portal Mar 12, 2017
-
December 2016
- Dec 20, 2016 Pro Tip: Use updateMultiple() for Maximum Efficiency! Dec 20, 2016
- Dec 2, 2016 We're Writing a Book! Dec 2, 2016
-
November 2016
- Nov 10, 2016 Chrome Extension: Load in ServiceNow Frame Nov 10, 2016
-
September 2016
- Sep 7, 2016 Force-Include Any Record Into an Update Set Sep 7, 2016
- Sep 1, 2016 GlideRecord Pagination - Page through your GlideRecord query Sep 1, 2016
-
July 2016
- Jul 17, 2016 Granting Temporary Roles/Groups in ServiceNow Jul 17, 2016
- Jul 15, 2016 Scripted REST APIs & Retrieving RITM Variables via SRAPI Jul 15, 2016
-
May 2016
- May 17, 2016 What's New in Helsinki? May 17, 2016
-
April 2016
- Apr 27, 2016 Customizing UI16 Through CSS and System Properties Apr 27, 2016
- Apr 5, 2016 ServiceNow Versions: Express Vs. Enterprise Apr 5, 2016
-
March 2016
- Mar 28, 2016 Update Set Collision Avoidance Tool: V2 Mar 28, 2016
- Mar 18, 2016 ServiceNow: What's New in Geneva & UI16 (Pt. 2) Mar 18, 2016
-
February 2016
- Feb 22, 2016 Reference Field Auto-Complete Attributes Feb 22, 2016
- Feb 6, 2016 GlideRecord & GlideAjax: Client-Side Vs. Server-Side Feb 6, 2016
- Feb 1, 2016 Make Your Log Entries Easier to Find Feb 1, 2016
-
January 2016
- Jan 29, 2016 A Better, One-Click Approval Jan 29, 2016
- Jan 25, 2016 Quickly Move Changes Between Update Sets Jan 25, 2016
- Jan 20, 2016 Customize the Reference Icon Pop-up Jan 20, 2016
- Jan 7, 2016 ServiceNow: Geneva & UI16 - What's new Jan 7, 2016
- Jan 4, 2016 Detect/Prevent Update Set Conflicts Before They Happen Jan 4, 2016
-
December 2015
- Dec 28, 2015 SN101: Boolean logic and ServiceNow's Condition Builder Dec 28, 2015
- Dec 17, 2015 Locate any record in any table, by sys_id in ServiceNow Dec 17, 2015
- Dec 16, 2015 Detecting Duplicate Records with GlideAggregate Dec 16, 2015
- Dec 11, 2015 Array.indexOf() not working in ServiceNow - Solution! Dec 11, 2015
- Dec 2, 2015 Understanding Dynamic Filters & Checking a Record Against a Filter Using GlideFilter Dec 2, 2015
-
October 2015
- Oct 20, 2015 Bookmarklet: Load the current page in the ServiceNow frame Oct 20, 2015
-
August 2015
- Aug 27, 2015 Easily Clone One User's Access to Another User Aug 27, 2015