ServiceNow provides various methods for logging users into an instance. Local login, LDAP, SAML, and Digested Token are all used pretty regularly by customers. One thing that is often requested, but usually not successfully addressed, is the need to have the logged-in user accept some terms or conditions of use before they are allowed to use the system. The solutions attempted before usually suffered from a variety of issues ranging from overly-complex modification of one or more installation exits to being able to easily bypass the terms page entirely. In the end, these solutions seemed to be broken on some level. As we’ve seen requests for this type of functionality increase over the past few months, Jacob Andersen (who developed almost all of the integration and SSO information at SNCGuru) and I decided to collaborate to create a solution that actually works!
- Use the same way no matter what authentication method you’re using!
- No messy, complex modifications of installation exits
- Dialog-based acceptance page ensures no interference with user login or deep-linking
- Complete logging of each user interaction with the dialog
- Use of properties and message to disable or enable the terms page at whatever interval you want, set logging level, and customize the dialog text
- Multi-language, multi-company support built-in
Components and Usage:
This SNCGuru solution is packaged as an update set for easy installation in your instance. Included in the update set are the following elements…
- TermsAcceptance UI script – This global UI script is what initiates the entire process. When a user attempts to view any page in the system, the UI script runs and makes a call to the ‘TermsAcceptanceAjax’ script include to see if terms have been accepted for the user session. If not, the UI script triggers a dialog with the terms.
- TermsAcceptanceAjax Script include – Does most of the heavy-lifting in the background to check user terms acceptance for a session and set and record acceptance and cancellation by each user as it happens.
- terms_acceptance_dialog UI page – Contains the dialog contents that are displayed to the user and calls back to the ‘TermsAcceptanceAjax’ Script include to record and log terms acceptance details. Dialog logo image is dynamically pulled in based on the user’s company.
- terms_acceptance.message Message record – Accessed by navigating to ‘System UI -> Messages, this message contains the actual text of the terms dialog. Simply add whatever HTML you want to this message record to modify the text of the dialog. Use of a message record for the text allows for multi-language support as well.
- ‘Frequency (in days) that users must accept terms’ (terms_acceptance.interval) and ‘Log level of Terms/Acceptance page’ (terms_acceptance.log) system properties – These can be found under the ‘System Properties -> Terms Acceptance’ module. ‘terms_acceptance.interval’ allows you to disable the terms page completely or enable it to trigger at any daily interval. Use ‘-1’ to disable the terms page, ‘0’ to enable for every session, or any other daily interval as necessary. ‘terms_acceptance.log’ controls whether you log user acceptance, cancellation, both, or none of the above in the ‘Terms Acceptance’ table
- Terms Acceptance table – Logging table for all user interactions with the terms dialog. If the ‘terms_acceptance.log’ property is set to log user interactions, they will be stored in this table. The ‘Terms Acceptance’ table can be accessed by navigating to ‘System Logs -> Terms Acceptance’
- Flashcanvas UI script
You can view the update set and installation instructions here…