Once you have installed and configured DataSync for ServiceNow, and have become familiar with creating dynamic shares and bulk shares, there are various optional settings that you can configure. There are optional features for dynamic shares and optional features for bulk shares, but there are also a range of features that apply to both dynamic shares and bulk shares.
These optional features can help you customize your DataSync experience and leverage DataSync's robust capabilities to make your organization's integration processes more powerful and streamlined.
Explore all of these available features below!
Sharing Setup
When setting up a bulk share or dynamic share, one of the settings to configure is the Sharing setup. This setting determines what records are sent out with the share. There are three options: Share table records only, Share all table records and child records, and Share the last descending child of each table record. The last option is set as the default. Scroll down a bit for a breakdown of each option. You can also read more about this setting at Replicating ServiceNow's Parent Child Hierarchy.
You can set this feature how you desire at the time of creating your dynamic share or bulk share Here's how to change the setting:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to change the sharing setup for.
- In the resulting dynamic share or bulk share page, in the General Settings section, use the Sharing setup dropdown to select the option you want.
- Click Update.
Share table records only
This feature allows you to share only records for the table you select in your setup of a dynamic or bulk share. Otherwise, by default, shares will share records for the table you select, as well as the last descending associated child records for that table. So, this feature disables the sharing of those associated child records and shares the base table only.
For more information on this, see Replicating ServiceNow's Parent Child Hierarchy.
Share all table records and child records
This feature allows you to share all child records associated with a table, in addition to the table records themselves. Otherwise, by default, shares will share records for the table you select, and the last descending associated child records for that table. So, this feature enables the sharing of all associated child records along with the base table.
Please note that using this option for dynamic share may result in slowed performance in your ServiceNow instance when using business rules.
For more information on this, see Replicating ServiceNow's Parent Child Hierarchy.
Share the last descending child of each table record
This feature for dynamic shares and bulk shares allows you to share only child records that are directly associated with the chosen table, in addition to the table records themselves. This is the default option.
For more information on this, see Replicating ServiceNow's Parent Child Hierarchy.
Conditional shares
This feature allows you to create conditional shares that can be used to share records to multiple target queues and/or using multiple table maps.
Conditional bulk shares will share out records that meet your specified conditions once at a specified time.
Conditional dynamic shares will share out records that meet your specified conditions as records are created, updated, and/or deleted.
- When using a table map with a dynamic or bulk share (including conditional shares), the Sharing setup will default to Share the table records only. If you were to use a Sharing setup of Share all table records and child records with a table map, this will cause duplicate records for a parent and its child records to be sent out since table maps will map all the records to the same target table name.
- With Share only selected fields enabled, the Use Table Map option will not be available on conditional shares. Since both options modify the fields in the outgoing record payload, both options are not compatible with each other.
Here's how to create a conditional share:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Runtime Settings tab, under the Triggers section, check the Conditional share box. This will reveal a PSP Conditional Shares tab below the Related Links section.
- Click the new PSP Conditional Shares tab, and then click New. If using Google Chrome, you may see a popup asking if you want to leave the site—click Leave.
- On the resulting page, use the Target Queue field and the search icon to select a target queue for the conditional shares.
- (Optional!) Check the Use Table Map box if you want to use a table map for your conditional share, and use the search icon to find and select the table map you want to use.
- Now, you're ready to set conditions for the share:
- Click the lock icon next to Domain, and then the search icon to choose a domain. NOTE: To prevent invalid GlideRecord queries, as of Krypton 8.6.0, if the table does not have a sys_domain field, the Domain option will not be available.
- To share out all records in all child domains that match the filter conditions you create, check the Share as Child Domain box.
- Next to Condition, use the choose field dropdown to choose a field that you want to add filter conditions to. Then, choose an operator and value for that filter. To check which operators are available for ServiceNow field types, see operators available for filters and queries.
- To add more conditions, click Add Filter Condition and repeat Step 7c. To add a conditional "or" clause, click Add "OR" Clause instead.
- (Optional!) Click X in line with any of the filters if you want to remove that filter.
- (Optional!) Use the Company field to find and select a company to filter on, if you want to filter the conditional share by company.
- (Optional!) Use the Test Record option to choose a record to test your conditional share for.
- Finally, when your conditions for the share are set, click Submit.
- Back in the dynamic share of bulk share page, click Update. Or, if it's a bulk share, you can click Execute Now. Or, if it's a dynamic share, you can click Run a Bulk Share to run your conditional share as a bulk share first before dynamically sharing records based on the conditions you set.
ServiceNow attachments
Include attachments
This feature allows you to sync your ServiceNow attachments along with your dynamic share or bulk share. Here's how:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Runtime Settings tab, under the Additional Records section, check the Include attachments box.
- Click Update.
SOME NOTES:
- Attachment deletes are not currently supported through the Include attachments option.
- ServiceNow does not support .twb and .twbx attachment.
- If using a dynamic share, you may want to share out previously uploaded attachments that were updated before your dynamic share was created.
- After enabling the Include attachments option, shared records from the sys_attachment and sys_attachment_doc tables will be put into outbound messages in the u_psp_attachment_out_message table before being shared out of your source instance.
- You can also share ServiceNow attachments with only specific file extensions.
Include embedded images or videos
This feature allows you to include embedded images and videos within dynamic shares or bulk shares, so that the subscribing instance(s) to display these images/videos properly when displaying the selected table's records.
This feature is only available for tables that have HTML or Translated HTML field types that support embedded images and videos (for example, the kb_knowledge table). For any other field types (such as String), embedded images/videos will not be shared out properly. For more information on this, see HTML field type.
If the images or videos you want to embed are categorized as an Attachment type, then you can simply use the Include attachments option. Otherwise, here's how to include embedded images/videos:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Miscellaneous tab, check the Include embedded images/videos box.
- On the subscribing ServiceNow instance, you must subscribe to the follwing tables in order for embedded images/videos to be properly synced between instances:
- db_image
- db_video
- sys_attachment
- sys_attachment_do
- Click Update.
If you are re-sharing a record that a subscribing instance previously received and is showing broken images/videos (because the first time sharing didn't properly share these embedded images/videos), you will need to clear your browser's cache after the subscribing instance receives the re-shared messages for these images/videos to properly display. ServiceNow caches embedded images/videos, even ones that were previously broken but are now fixed.
ServiceNow work notes and comments
This feature allows you to include work notes and comments, referred to as journal fields in ServiceNow, in your dynamic shares and bulk shares. This feature requires you to configure a ServiceNow instance as a subscriber.
Here's how:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Runtime Settings tab, in the Additional Records section, check the Include journal fields AND the Include audit log boxes. You must check both of these boxes in order to accurately update the history/activity log on your subscribing ServiceNow instance. For more information about how this works in ServiceNow, see journal fields and audit logging.
- (Optional!) Upon checking the Include audit log box, it will reveal a Filter audit fields box—if you want, you can check this box in order to specify which audit log records to be shared out. This option is helpful if you want to share out only audit records that are related to specific fields on the table being setup for this share. For example, if you are setting up a dynamic share on the Computer (cmdb_ci_computer) table and only want to share out audit records for changes on the Name (name) field.
In order to filter the audit fields, check the Filter audit fields box, which will reveal a Filter Audit Fields tab in the table at the bottom of the page. Click New and in the resulting Share Field page, choose the field that you want to filter and share out audit records on. You can add as many fields as you wish.
If you have checked the Filter audit fields box, but don't add any specific fields, then no audit records will be shared at all. If you want to share audit records, but don't need to specify filters, then make sure to leave that box unchecked. - Click Update.
SOME NOTES:
- As a default, when Include journal fields is selected for a dynamic share, a maximum of 100 comments and work notes records and a maximum of 200 audit log records will be dynamic shared. This limit can be adjusted by changing the system property com.perspectium.dynamic.sys_journal_field.limit. Bulk sharing of comments, work notes, and audit logs are not restricted by these limits.
- A new default limit of 200 is also set for dynamically sharing audit log records. This limit can be adjusted by changing the system property com.perspectium.dynamic.sys_audit.limit. Bulk shares are not restricted by these limits.
- With DataSync Agent, the Include journal fields option will create the sys_journal_field table on the target database. The Include audit log will also create the sys_audit_log on the target database. However, be aware that this option has the potential to contain a huge amount of data
View names
This feature allows you to control the number of fields being shared out from your ServiceNow table. Otherwise, by default, dynamic shares and bulk shares will share all fields available in a table. To enable this feature, you'll want to create a form view, and then personalize it. For information on how to do this, see personalize a form.
Here's how to configure a share so that it shares only specific fields:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Miscellaneous tab, use the View name field to type your form view name.
- Click Update.
Referenced field records
This feature allows you to share field records that are related to the base table you are dynamic or bulk sharing. For example, if you are dynamic sharing the Incident table, you can use this feature to share the referenced fields Assigned To User (sys_user) and Configuration Item (cmdb_ci) for each incident record.
Here's how to enable the feature:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, in the Runtime Settings tab, check the Include referenced field records box. This will add a Referenced Field Records tab at the bottom of the page.
- Click the Referenced Fields Records tab, and click either Add all referenced fields to add all fields that are referenced by the base table you are sharing, or click New if you want to manually select the specific fields.
- If you press New, you'll be taken to a new form where you can manually select the Field you want. If using Google Chrome, you may see a popup asking if you want to leave the site—click Leave. Once you've added the Field, click Submit. Repeat Step 4a for as many fields as you want.
- If you press New, you'll be taken to a new form where you can manually select the Field you want. If using Google Chrome, you may see a popup asking if you want to leave the site—click Leave. Once you've added the Field, click Submit. Repeat Step 4a for as many fields as you want.
- Back in the dynamic share or bulk share page, click Submit.
Before/after share scripts
The before share scripts feature allows the current record being share out to be processed after it is loaded into a GlideRecord, but before it is encrypted and queued up to the Perspectium Cloud Server. Before share scripts expect server-side javascript and is preconfigured with a globally available variable called current, which is the GlideRecord object that is going to be shared.
Because before share scripts are executed every time a record is shared, be aware of the processing delays introduced that will be multiplied when sharing multiple records at the same time. Also, if you have multiple share configurations for the same table (such as different share configurations that each have a different target queue), any changes to the current object may affect any conditions you have to share since this same current object is referenced as we iterate through the table's different share configurations.
The after share scripts feature allows you to specify a script that will run after your dynamic share or bulk share has shared a record. This can be useful for when you run scripts in the before share script for your dynamic/bulk share that you want to then cancel out after the share has run.
Variables to use
Create before or after share scripts
Here's how to create before and/or after share scripts:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, click the Scripting tab.
- Type your before and/or after share script in the appropriate field. For some scripting examples, see the next section.
- Click Update.
Examples of before and after scripts to use
Create filter conditions for a dynamic share or bulk share
This feature allows you to share data only when certain conditions are met. You can also set up filter conditions for table maps. For more information about creating filter conditions in ServiceNow, see condition builder.
Here's how to create filter conditions for a ServiceNow dynamic share or bulk share:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to configure.
- In the resulting dynamic share or bulk share page, click the Runtime Settings tab, and go to the Triggers section.
- Next to Condition, use the choose field dropdown to choose a field that you want to add filter conditions to. Then, choose an operator and value for that filter. To check which operators are available for ServiceNow field types, see operators available for filters and queries.
- To add more conditions, click Add Filter Condition and repeat Step 4. To add a conditional "or" clause, click Add "OR" Clause instead.
- (Optional!) Click X in line with any of the filters if you want to remove that filter.
- Click Update.
Encryption mode and encryption method
Perspectium supports multiple ciphers to encrypt your data when being shared out of your ServiceNow instance. The default cipher is TripleDES.
You can set a different encryption cipher for your entire instance via the Properties module (Perspectium > Control and Configuration > Properties > DataSync Settings), OR you can set it when you create a shared/subscribed queue. You can also choose which encryption mode to use.
There available encryption modes are:
Mode | Description |
---|---|
encrypted | Data is encrypted then base64 encoded |
encrypted_multibyte | Data is base64 encoded then encrypted |
If you choose encrypted_multibyte as your encryption method in the DataSync Settings, you must set your shared queue as encrypted_multibyte as well.
And if you are going to change the encryption key, make sure to follow these requirements:
With ServiceNow's planned deprecation of the GlideEncrypter API in the Xanadu release in Q4 2024, in Krypton 8.5.0 and newer versions, the Perspectium application uses JavaScript library to continue supporting the Triple DES encryption method. See ServiceNow GlideEncrypter API Deprecation for more information.
Encryption Method | Required Encryption Key length |
---|---|
Triple DES | At least 24 characters |
AES-128 | At least 24 characters |
Base64 Encode Only | At least 24 characters |
AES-256 | 32 characters or more |
SOME NOTES:
- When changing the encryption key, make sure to remove the preexisting key and add the new key.
- In certain ServiceBond integrations, AES-128 encryption may be a required cipher. Contact Perspectium Support to determine your application endpoint's specific encryption requirements.
- To ensure that foreign language strings are replicated properly between ServiceNow, instances require that encrypted_multibyte encryption mode is selected on the source instance.
- To ensure that foreign language strings are replicated properly to your target database via a SQL DataSync Agent, you must configure your database connection string for UTF-8 character encoding. For example, agent.xml config is modified with <database_parms> for MySQL subscriber to add the parameter characterEncoding=UTF-8.
<subscribe> <task> <task_name>multibyte_tester</task_name> <handler>com.perspectium.replicator.sql.SQLSubscriber</handler> <amqp_queue>psp.out.replicator.dloo_mac</amqp_queue> <decryption_key>The cow jumped over the moon</decryption_key> <database_server>127.0.0.1</database_server> <database_user>xxx</database_user> <database_password>xxx</database_password> <database_port>3306</database_port> <database_type>mysql</database_type> <database_parms>autoReconnect=true&characterEncoding=UTF-8</database_parms> <database>psp_repl</database> </task> </subscribe>
View records processed
This feature allows you to see a breakdown of the total number of records processed and shared out on a dynamic or bulk share, including the number of auxiliary records shared if options such as Include attachments are activated.
Here's how to view the records processed:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to review.
- Scroll down to the Records Processed tab in the table at the bottom of the page. The tab will only appear if you have already executed the share (otherwise there will be no records sent yet).
Notes
This feature allows you to include simple notes for internal communication/organizational purposes. Here's how to access:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share.
- Click the the Miscellaneous tab to find the Notes field.
Switch form views
This feature allows you to switch between two "view" options when it comes to forms such as on a dynamic share or bulk share page.
The Simple view is designed to simplify configuration selections when creating a bulk and dynamic share. This view will contain commonly used features you can use to customize share configurations. When creating a new share configuration, you will be automatically redirected to the Simple view of that form.
The Standard view is a designed version that offers improved organization and a more intuitive user experience.
To check what view you're on, check the top of your dynamic share or bulk share page. If you are in the new view, it will say Shared He20 Standard view. Here's an example of a new view:
You may prefer one style over the other. Here's how to switch between the simple and standard view:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share that you want to update.
- Scroll down to the Related Links section and click either Simple view or Standard view.
Add display value language
This feature allows you to change the language of display values in your sharing instance. This feature only works for language translations that have been downloaded on your instance.
There are a couple things you need to do first in order to make use of the feature:
First, you need to activate the language plugin in your ServiceNow instance.
Then, you need to Enable DataSync to add display value fields for reference and choice fields (prefixed with 'dv_' by default)
Finally, you're ready to set up your dynamic or bulk share to add display value languages:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share you want to enable the feature on.
- Click the the Miscellaneous tab and check the Advanced box. This will reveal a new Advanced tab (if the Advanced box wasn't already checked).
- Click the Advanced tab and check the Add display value language box, then select your desired language from the Display value language field.
- Click Update.
Data obfuscation
This feature allows your to create obfuscation rules for your dynamic/bulk shares per the the General Data Protection Regulation (GDPR). This is useful for cases where you want to "mask" data contained in your share that may be classified as sensitive.
Reference fields can not be obfuscated due to limitation of ServiceNow.
Here's how to make use of data obfuscation:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > View Dynamic Shares or View Bulk Shares.
- Find and click into the dynamic share or bulk share you want to enable the feature on.
- Click the the Miscellaneous tab and check the Advanced box. This will reveal a new Advanced tab (if the Advanced box wasn't already checked).
- Click the Advanced tab and check the Enable data obfuscation box.
- Scroll down to the table at the bottom of the page and click the PSP Data Obfuscations tab. This will only be available if you have checked the box in Step 4.
- In the PSP Data Obfuscations tab, click New. If using Google Chrome, you may see a popup asking if you want to leave the site—click Leave.
- Type any Name for your new rule and enter a number in the Order field to indicate when your data obfuscation rule will run compared to other data obfuscation rules in the same share (in ascending order)
- Finally, use the Type dropdown to choose a data obfuscation rule type based on the following options:
cation rule type from the following options:
Type of Data Obfuscation Rule
Description
Field Choose a field whose value you want to obfuscate. If this value appears in multiple spots throughout the record, you can optionally choose the Obfuscate value throughout record option.
The Masking Value (special characters only) or Masking Statement (alphanumeric characters) you enter will replace your specified field's value in the record. If choosing the Hashed option, your specified field's value will be obfuscated via the hashing algorithm (SHA-1, SHA-256, or MD5) you select from the Hash Function dropdown.
Pattern Specify a JavaScript regular expression pattern in the Pattern field to search for and replace in your share's outbound message.
The Masking Value (special characters only) or Masking Statement (alphanumeric characters) you enter will replace your specified pattern's value in the record. If choosing the Hashed option, your specified pattern's value will be obfuscated via the hashing algorithm (SHA-1, SHA-256, or MD5) you select from the Hash Function dropdown.
Replacement Specify search values that will be replaced by a masking value. To create a Replacement data obfuscation rule, first create a new data obfuscation rule with Type Replacement and click Submit. A related list of search value records will appear at the bottom of the form. Each search value will be replaced with the masking value if found in your share's outbound message.
When choosing the Replacement type, you can upload a CSV file as a list of comma-separated search values by clicking Import replacement dictionary (.csv). This will take the user to a confirmation page to upload a file.
NOTE: You can quickly add a large number of search values to replace by uploading a CSV file. The CSV file should be a list of comma separated search values which will be added to the Replacement rule.
- Click Submit to save the new rule, and then click Update back in the share page.
Data obfuscation dashboard
You can easily view all of your data obfuscation rules for dynamic shares or bulk shares at the Data Obfuscation Dashboard.
To access, go to Perspectium > Perspectium Core > Shares > Dynamic Share or Bulk Share > Data Obfuscation Dashboard. You will see the same dashboard, with both dynamic and bulk shares listed, regardless of the path you get there.
The Data Obfuscation Dashboard is essentially just a breakdown of all existing rules. The first column in the tables show the name of each share which will take users to the respective share when clicked on. The table specifies which table each share is targeting. The last three columns show each type of data obfuscation (Field, Pattern, or Replacement). A green checkmark indicates at least one data obfuscation rule of that type is active for that share, whereas a red X indicates no data obfuscation rule of that type is active. The dashboard also shows the total number of records obfuscated from each table as well as the total number of obfuscation rules on each table.