Command-Line Tool for Export to ServiceNow

FlexNet Manager Suite 2022 R1 (On-Premises)

This tool extracts data from the FlexNet Manager Suite operations database, and imports it into ServiceNow.

Note: This utility may be triggered in three different ways:
  • Automatically by a scheduled task
  • Manually by an operator through the web interface for FlexNet Manager Suite. Navigate to the system menu ( in the top right corner) System Settings > Integrations.
  • From the command line, as described in this topic.
In all cases, it exports the data specified to ServiceNow. However, when it is run manually from the command line, the behavior of the utility then differs: it does not update the results in the web interface for FlexNet Manager Suite. For this reason, automatic operations are the preferred method of operation; but this command line is available for testing and troubleshooting.
                -url ServiceNow-URL
                -user ServiceNow-account-name
                -token ServiceNow-token
                -endpoint ServiceNow-endpoint
                -changes Boolean
                -changesPeriod -numberOfDays
                -changesSince YYYY-MM-DD
                -connectionTest true
                -withApplications Boolean
                -withContracts Boolean
                -WithHardwareInventory Boolean
Option Sample value Notes
-url Mandatory. The URL to your ServiceNow server instance in the cloud. Use the HTTPS protocol.
-user Mandatory. This is the user name specified in the appropriate credentials set within ServiceNow, the same credentials from which the token is collected.
-token 86 random alpha-numeric characters Mandatory. This is the refresh token copied from ServiceNow.
-endpoint or api/x_fls_flexera_fnms/integration/fnmstosn Mandatory. Leave the value unchanged. This is the integration point for ServiceNow.
Tip: While the endpoint is visible in ServiceNow and could be modified there, it is also recorded in the operations database for FlexNet Manager Suite. Changing it in ServiceNow without a matching change in the operations database will cause automated exports to fail.
-changes true Optional, with a default of true if it is not present. When this option is not present, or when it is present with a value of true (case insensitive), only differential changes are included in all data exports to ServiceNow. For the baseline from which differences are measured, see the -changesSince or -changesPeriod options. When this option is present and has a value false, all data (from the relevant period) is exported from the relevant tables in FlexNet Manager Suite (which is likely to make the data transforms in ServiceNow considerably more time-consuming).
Tip: You may use the default value even for an initial data transfer, or for the first transfer after an upgrade from an earlier version of the executable. Initial transfers are always the full data set, with differential transfers following thereafter.
-changesPeriod -5 Optional (no effect when not present). When present, specifies the time window (as a number of days) before the export for which changes are included in the export. The negative sign is mandatory. The example means that changes in the previous five days are exported. Days are measured as complete 24-hour blocks prior to the time of the export.
-changesSince 2015-02-28 Optional. Use only when necessary to over-ride the default date, which is the last run of the batch scheduler on the central batch server for FlexNet Manager Suite (or, for smaller on-premises implementations, the server hosting this functionality). The format is YYYY-MM-DD.
-connectionTest true Optional. If this option is provided, and has a value true (case insensitive), no data exports are attempted. The executable attempts a connection to ServiceNow, and reports the results (0 or 2 as described below) on the console. In order to transfer data from FlexNet Manager Suite to ServiceNow, this parameter must either be omitted, or set to false.
-withApplications false Optional. When omitted, it is assumed to be true, and insatalled applications are included in the export. If set to false, installed applications are excluded from the export. Note that at least one of these -with* parameters must be true.
-withContracts false Optional. When omitted, it is assumed to be true, and contracts are included in the export. If set to false, contracts are excluded from the export. Note that at least one of these -with* parameters must be true.
-WithHardware Inventory false Optional. When omitted, it is assumed to be true, and hardware devices are included in the export. If set to false, hardware devices are excluded from the export. Note that at least one of these -with* parameters must be true.
In ServiceNow, contracts and installed applications both have dependencies on hardware inventory. It is recommended that you do not exclude the hardware inventory, as this may result in unpredictable gaps in other records when the correct dependencies cannot be established.

Exit Codes

0 Success
1 A data upload to ServiceNow has failed through the maximum number of retries set in the configuration file.
2 Connection failure, being either of:
  • Failed to connect to ServiceNow. Check the URL and account details for connection.
  • Failure to connect to the FlexNet Manager Suite compliance database.
3 There is no valid license for execution of the export utility recorded for your enterprise.
4 Incomplete set of command-line parameters provided (see syntax listing above). Help information is displayed in this case.
5 An invalid tenantUId was provided. (Not applicable to on-premises implementations.)
6 Export from FlexNet Manager Suite cannot proceed because ServiceNow has not completed previous pending imports.


This example runs a connection test (because of the final parameter). Although the defaults are set for all data transfers (installed applications, contracts, and hardware inventory), no exports occur. The command-line result is 0 for good credentials, and 2 for bad credentials.
       -token DbBNKvekyBVGFxPXe7TAGooeyb5bsByB2jSubap232lAkerucGHn5SnlaQasincR89... 
       -connectionTest true
The following example restricts the export to collect only hardware inventory. Because it is not mentioned, the default true value includes hardware inventory, with the other two possibilities excluded. Because the -changes and -changesSince options are both missing, only hardware changes occurring since the last scheduled export are included.
       -token DbBNKvekyBVGFxPXe7TAGooeyb5bsByB2jSubap232lAkerucGHn5SnlaQasincR89... 
       -withContracts false 
       -withApplications false
This example covers all export types from FlexNet Manager Suite, but including only changes that occurred in the previous 3 days, measured back in 24-hour blocks from the time the export is run. Assuming this example is run at 1pm Thursday, it will export only changes from 1pm Monday to 1pm Thursday (all times are local on the batch server). Strictly, -changes true is redundant, since this is the default.
       -token DbBNKvekyBVGFxPXe7TAGooeyb5bsByB2jSubap232lAkerucGHn5SnlaQasincR89... 
       -changes true 
       -changesPeriod -3

FlexNet Manager Suite (On-Premises)

2022 R1