---
title: "PerspectiumBulkShare"
canonical: "https://docs.perspectium.com/space/apisdk/1703976/PerspectiumBulkShare"
format: markdown
---
The  PerspectiumBulkShare  API is a Java object that modifies and/or executes a  ServiceNow bulk share . Initialization To use the  PerspectiumBulkShare  object, you must first initialize the object with the following parameters: Parameter Type Description Required? bulkshare_sys_id string Initializes  PerspectiumBulkShare  with the  sys_id  of a bulk share  GlideRecord   ( psp_bulk_share )  Yes condition string Passes a condition to query against the bulk share's table No name string Passes a name to give the bulk share's scheduled job that runs in the background to share records No Functions Once initialized, you can reference the  PerspectiumBulkShare  object's functions: addSysId Enables the  bulk share only Sys IDs feature Parameter Type Description Required? sys_id string Adds the  sys_id  argument to the bulk share's sys_id related list for use when  bulk sharing only Sys IDs   NOTE :  You can only add sys_ids for records in the table selected for your bulk share.  Yes clearSysIds Clears all the  sys_ids  in the bulk share's sys_id related list. No parameters are required for this function.   NOTE :  If the “Share only Sys IDs listed” option is selected on the bulk share, calling this function will deselect the option. executeNow Runs a bulk share immediately To run an existing bulk share, pass the  sys_id  for the existing bulk share record as the sole parameter for the executeNow function. Otherwise, to create and then run a new bulk share, pass the following parameters: Parameter Type Description Required? bulk_share_name string A name for the newly created bulk share Yes table_name string Name of the table for which records will be bulk shared Yes target_queue_name string Name of the queue to which records will be bulk shared Yes condition string Conditions to filter records on before bulk sharing No cipher string Encryption method for data being bulk shared Encryption options : Unencrypted  = 0 TripleDES  = 1 AES-128  = 2 Base64 Encode Only  = 3 AES-256  = 4 No table_map string Name of the outbound table map to map bulk shared fields for No Example pBS = new PerspectiumBulkShare(bulkshare_gr);
var tgr = new GlideRecord('ticket');
tgr.addQuery('state', '1');
tgr.query();
while(tgr.next()){
    pBS.addSysId(tgr.sys_id);
    pBS.executeNow('Test Bulk Share', 'incident', 'Test Queue', 'active=true^company=CompanySysID^EQ', '3', 'Test Table Map');
} Similar topics Contact Perspectium Support US:  1 888 620 8880 UK:  44 208 068 5953 support@perspectium.com