TN 7669: ServiceNow Integration

Sassafras AllSight can be used as a data discovery source for ServiceNow


The ServiceNow ITSM Platform can utilize a number of data sources for asset discovery. Sassafras AllSight offers one such option by way of our free Application Plugin available in the ServiceNow Store. While the use of this module is plug and play, this document details how the data is mapped in the complex tables of the ServiceNow Platform.

Use Case

The most common question is why use our plugin for a data discovery source. ServiceNow has their own discovery module as well as leveraging SCCM, so this is a valid question. The answer is detail. For example, our computer records have 24 additional data points that we import to our extended computer table compared to the built in fields. In addition, we import the usage information with relations between user, computer, and software. While the amount of data and robustness of reporting that results from this are not as complete as when used in AllSight itself, it is data that can not be gathered with the built in discovery methods. Integration of this data into your ITSM platform can also be preferable to using a separate dashboard for AllSight. Note however that AllSight provides for rich embed options that could be used in a ServiceNow Dashboard.

Main Menu Items       Sub Menu Items

Because one of the data points imported is the SCCM ID our agent discovers, a customer can leverage the AllSight data to make decisions on software management and then take actions using the SCCM integration with ServiceNow. Sassafras Software has a vast Product catalogue so the software data imported to ServiceNow is pre-normalized. This is an added benefit for customers using CMDB. Those using SAM Pro still benefit from our normalization, and simply need to link the effective product from the ServiceNow normalization catalogue.


The server side support for this integration was formally introduced with AllSight 7.7, but for full compatibility AllSight or later should be used. Sassafras Software always recommends using the latest release of the platform to provide the latest functionality. It also requires the following ServiceNow modules:

Support for SAM Pro is also included with no additional configuration needed. The plugin will import data to the proper table based on detected table structures.

How it Works

The plugin contains Import Sets for each of the data types we bring in: Computers, Printers, Products, Audits, Software Usage, and Computer Sessions. Note that several of these are optional, see Configuration below for details. Each Import runs on a Schedule. By default this schedule is initiated at 5am local time which follows the 4am default Product Audit run in AllSight. These schedules can be adjusted as needed. The other 5 imports trigger in succession after the primary. The Audit data in particular is dependent on the Computer and Product data being imported first so references exist properly and records are not dropped.

Because the data is pulled by ServiceNow from Allsight (by means of dynamically generated CSV files in AllSight over HTTPS), you must ensure that any firewalls in the environment allow this communication. Keep in mind that ServiceNow is a cloud hosted solution and AllSight is most likely hosted on-prem. Any edge firewall therefore must allow HTTPS from your ServiceNow instance to your AllSight server.

This integration is one way only. No data is written back to AllSight, and any imported data will replace manual changes. For example, if you change the lifecycle stage of a Computer in ServiceNow, it will revert to the actual setting in place in that record in AllSight. To assist with this management, each computer record has a link to the corresponding record in AllSight. This allows edits to be made in the source record easily which will then synchronize on the next import. Remember this is a Discovery source, so the source is taken as the record of truth.

From the plugin About page:

Computer data is stored in KS Computers which extends Computers. We add many custom fields to the defaults in ServiceNow. Duplicates by computer name are noted for reference/resolution a report in the dashboard.
For CMDB, we extend the Software and Instances tables for our Product and Audit data respectively.
For SAM Pro we bring our Audits directly into Software Installations which populates the Discovery information for reconciliation.
Usage for software and Session data is also imported.

Click here to see data details from the Plugin About pages

Integration Details
Herein we detail more of the behind the scenes information about this integration including tables, menus, permissions, etc.

The intention is to use your Sassafras Server as a primary source of inventory data for computer and installed software asset records.  Because the default tables are extended or directly written to, all the imported data is available in the normal default forms (e.g. Incidents).  In the event of duplicates to the internal CI tables, you will note the table source in selection menus in forms to assist with which record you wish to reference.  It is recommended that you remediate duplicates as you see fit.  We provide a report for this in the Dashboard to assist that process.

SAM Pro users should note they may need to perform more manual remediation of references (i.e. Normalized Product) than with some data sources.  This is because Sassafras Software already normalizes Programs (executables) into Products (suites).  This is integral to the operation of our software, so some additional manual correlation may be needed to equate our Products with those in the ServiceNow catalogue, should that be part of your desired workflow.

Note at this time no data is exported to KeyServer.  Changes made to records in Servicenow can and will be overwritten by the next import from KeyServer.  Care should be taken to either enter data updates in KeyServer which then sync to Servicenow, or ensure you are not editing imported fields that contain values on the KeyServer side.


As per normal, an Admin will have full access to the application.  There is an admin role in the application (search keyserver) that will grant full access to all components.  Additionally there is an itil role that will grant only read access to the KS Computers table and Dashboard.  Note that due to limitations of the platform, the reports in the Dashboard will not be visible until each one is shared with a Group that your "itil" users are members of.

Because the data is imported, write access is not granted to the itil role and it is discouraged to do so in most cases.  You can however create a role as desired to grant this access, being aware that only fields that are not replaced by the data import will not be overwritten by the next import. 

File Structure

All Tables, Data Sources, and Reports, as well as most other modules start with KS in the name.

Data Sources:
KS Audit Products - pulls /ext/servicenow/audprod.csv
KS Computers Source - pulls /ext/servicenow/computers.csv
KS Products Source - pulls /ext/servicenow/products.csv
KS Sessions Source - pulls /ext/servicenow/sessions.csv
KS Usage Source - pulls /ext/servicenow/usage.csv
KS Printers Source - pulls /ext/servicenow/printers.csv

Transform Maps: (puts data from import tables into destination tables) and Scripts
KS Audits Transform - ks_installs
   OnStart - set install date to bogus date so corrected on import if still valid
   OnBefore - only run if sam table does not exist
   OnComplete - find bogus date records and delete them (clean up uninstalls)
KS Audits SAM Transform - cmdb_sam_sw_install
   OnStart - sets all records inactive so import marks active if still valid
   OnBefore - only run if sam table exists
KS Comp Transform - ks_computers
KS Prod Transform - ks_products
KS Prod SAM Transform - not active, should delete. Products in SAM are made by way of the data imported to the sw_install table by Audits.
KS Sessions Transform - ks_sessions
KS Usage Transform- ks_usage
KS Printers Transform - ks_printers

Modules: (menu items)
About - points to about content page sassafras/
Dashboard - sassafras/
Contact - link out to Sassafras Software website
Tables - links to the named tables
Import tables - not shown

KS Computers - Extends cmdb_computers to add fields
   Custom Default View to show our fields
KS Installs - extends "Software Instance"
KS Sessions - custom table
KS Software - ks_products extends "Software".
KS Usage - extends "Software Usage"
KS Printers - extends "Printers"
KS Settings - Custom table. Used for one record for the settings page

Site: Sassafras and related blocks to create the About and Dashboard pages.

keyserver.itil - Read access to the Application menu and KS Computers table

Business Rules:
Update KS Data Sources: Takes input from the about page form (KS Settings) and updates data sources and other settings.
Data Import
To see full details of the fields imported and how they are imported you can review our transform maps.
Where possible data is brought in straight from the KeyServer values.  In many cases a script is needed to convert values into readable data or perform a simple units conversion.  Some notable items include:
Computer Lifecycle: We translate our terminology into Servicenow standard choices and input to hardware_status and install_status to appease Computer and ALM level forms.
Duplicate Computers: We check for a match in all other computer tables on serial and name to flag possible duplicate records.  These are summarized in a report in the Dashboard.


Once the plugin has been activated in your instance, navigate to the Sassafras Discovery module. You will see several navigation items which will reflect your instance configuration (CMDB vs SAM). Click on the About/Config to enter the information for your AllSight instance, as well as choose various data import options. Mousing over each option will display a tooltip.

AllSight ServiceNow Configuration Options


  • Ignore Inactive Computers - This will skip any Computer records that are Dormant or Excluded. If your service desk concerns are only active computers, you can reduce table size by not importing these. If however you want to have retired records available in ServiceNow you should leave this off.
  • Ignore Thin Client Records - Recommended ON. This will skip import of Computer records that are Thin Client technologies (Green icon in KeyConfigure). Because these are client connection records that all point to the same host server (e.g. Terminal Services) these are generally not useful to import to your service desk environment.
  • Ignore Virtual Computers - Depending on your environment this may or may not be useful. This includes "thick" style VDI (Orange records in KeyConfigure) as in 1:1 pools or personal virtual machines.
  • Create User Records - Recommended ON. This is provided as an option because some sites do not wish to have numerous records created in the User database in ServiceNow. These records are required however if you wish to use the various Usage data in relation to users and not just Computers. We attempt to correlate users to existing records, but this can be very tricky depending on the environment (real name vs login name, etc). Any records we create are inactive and marked as being created by KeyServer. This makes them easy to find, and should help address any concern of unused active records.
  • KS Username and Password - If you have the KeyReporter Guest account disabled in AllSight (i.e. all users must authenticate to the Web UI) you will need to provide credentials for a Guest level service account to access the import data. Contact Sassafras Software Support if you need assistance.
  • Removal

    In the event you wish to remove our plugin and the related data, this should be easily accomplished. The majority of our data is put into extended tables so removal of the plugin should remove those tables. For data that is put into normal tables (e.g. Users), the records are all noted with a source of "KeyServer". This makes it easy to find and delete those records manually, or use a Background Script to automate this.


    The main navigation items provide access to the above detailed About/Configuration page, an example Dashboard with a number of Reports using the imported AllSight Data, a link to Sassafras Software Support, a list of the imported Computer records, and a list of the Scheduled Data Imports. Included with the KS_Computers custom table is a custom form view to allow easy viewing of our extensive data fields. The Additional Tables sub menu includes the Printers table, filtered views of import data for troubleshooting, Usage and Session tables, and a filtered list of imported Users.

    Main Menu Items     Sub Menu Items


    A typical concern, especially if using multiple Discovery sources, is duplicate CI records. Because we store Computer records in an extended table, there is no concern about data overwrite from another source like SCCM which writes to the default computers table. In addition, we perform a duplicate search based on Name and Serial and flag any duplicates in our table with a reference to the match in the default table. These are then viewable in our example dashboard in a widget, so you can remediate if desired. Because we use an extended table, referencing a CI in an Issue will display in the drop down if the record is from the KS_Computers table as well, so you know which source you are referencing in the ticket.

    Duplicate Computers Widget

    Users as mentioned above are put in the default table, but as inactive and flagged with a data source of KeyServer. If a userid matches an existing entry, no new entry is made. This means there is no need to remediate duplicates per se. However, if you would like Usage to line up with existing records, the proper approach would be to ensure the existing SN User record uses the same userid or name that is used for computer logins. This can be complex in some environments which is why this is optional. The Imported Users navigation item will show all accounts created by the import.

    Imported Users Example

    For those using SAM Pro, there can be concern about the ServiceNow product vs the Sassafras Software Product. This is best handled by using the Normalized Product reference in SAM to correlate their product to our product. Once this has been done, you should be able to use the advanced features of SAM Pro normally while leveraging the Sassafras Software data. We recommend contacting ServiceNow for question related to using those features.


    Several items are presented in the modules list to help with potential troubleshooting:

  • Data Imports - Verify that your schedules are active and what time they are set to run.
  • Import Sets - Verify that the included Import Sets ran, and what the result was.
  • Import Logs - Check for any errors related to the Imports.

    As always please contact support if you need assistance.