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!
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:
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.
|
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.
|
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.
|
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.
Here's how to create a conditional share:
This feature allows you to sync your ServiceNow attachments along with your dynamic share or bulk share. Here's how:
|
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:
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. |
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:
|
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:
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:
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.
|
Here's how to create before and/or after share scripts:
For cases where you have a table's records updated frequently but data doesn't actually change (such as a table that gets updated every single day via another integration or ServiceNow Discovery), you may not want the table's dynamic share (with interactive only not selected) to run and share out any records. For example, say the field that gets updated every day is u_last_discovered_date. The rest of the fields don't usually change, and you don't want to share these records out again since the subscribing side (such as a database) doesn't really need the latest u_last_discovered_date. In these cases, you can run the following script to ignore sharing the record:
|
The Before bulk share script section also allows you to cancel a bulk share from running if your script contains:
That is, if after evaluating the script, there is a cancel variable and its value is set equal to true, then the bulk share will cancel from running. This may be useful for when you only want the bulk share to run if certain conditions are met and you prefer to create/check for these conditions using server side javascript instead of the condition builder. |
Use the Before and After share script sections together to specify a language to share out records in. In the Before share script, you would have the following script so all records shared out will have English translated text (for fields that support translation as mentioned in the language link above):
In the After share script, you would cancel this change so it doesn't affect users who are using the system and want to see translations in their selected language:
|
When you have a ticket bulk share where you want to use the Share only Sys IDs listed feature and want to populate the sys id related list with sys ids of tickets that meet a query condition such as a state of open, you can write a script using the PerspectiumBulkShare API in the Before bulk share script as follows:
Please note, when using the PerspectumBulkShare.addSysId() function and adding sys ids to the bulk share's sys id related list, only sys ids of the table specified in the bulk share should be added. The Share only Sys IDs listed feature only queries the table listed in the bulk share for these sys ids so if you specify sys ids of a different table they will not be found. In the above code sample, the bulk share is for the ticket table so you would only want to add sys ids of ticket records using PerspectiumBulkShare.addSysId(). |