---
title: "ServiceNow <> Netsuite Integration (Legacy)"
canonical: "https://docs.perspectium.com/space/earlierReleases/1442182/ServiceNow%20%3C%3E%20Netsuite%20Integration%20(Legacy)"
format: markdown
---
This integration allows for replication of processes between ServiceNow and Netsuite.  This is a legacy feature so it has restricted permissions for Perspectium employees only - it is intended for internal use with customers on a need-by-need basis.  Update Sets To begin integrating Netsuite with your ServiceNow instance, you must first install the Perspectium update sets - request the download links from  support@perspectium.com .  The update sets should be installed in this order: Perspectium for ServiceNow update set. Perspectium Common Endpoint. Perspectium Common Doc to integrate (ie. Common Incident, Common Change, etc.) Dynamic Share and Shared Queue Creating a Shared Queue Click on the   shared queues   link under the   Replicator   tab in the Perspectium App Create a table with a shared queue named   psp.in .siam.client.netsuite   and pass in the respective credentials to the queue Click on this Shared Queue and verify that it is active. Stay in this Shared Queues view to complete the Dynamic Share and Shared queue configuration. To complete the configuration you will need: The SIAM endpoint url The Queue user for your SIAM endpoint. The Queue user password for your SIAM endpoint. You will then need to enter this information into the  Endpoint URL ,   Queue user , and  Queue user password  fields in the  psp.in.siam.client.netsuite  Shared queues. Once this is done. click  Update  in the top right of the shared queue view and these settings should be saved. Creating Dynamic Shares To create your own share for other tables. click the  Dynamic Shares  module under the Perspectium application menu.   Click   New  to move on to the dynamic share form. Select the desired table to share and   check the   Active  box . Then, choose your trigger conditions and move to the   Additional Settings   section of the form. Select the table map that contains OpsRamp and the table name. Select the Target queue   psp.in.siam.client.netsuite . The following images are examples for configuring the ServiceNow incident table to share out to Netsuite incident object: Below is the code for the   Before share script : if (psp_action == 'update' && current.correlation_id == ''){
	psp_action = 'deferred';
} Outbound and Inbound Table Maps The inbound table map will handle the conversion of Netsuite incidents into ServiceNow incidents and the outbound table map will handle the conversion of ServiceNow incidents into Netsuite incidents. Both table maps are key components for the SIAM integration. Incident to Common Incident The outbound table map requires specific fields to communicate from ServiceNow Incidents to the Netsuite incident. For each new table, a table map with the required outbound table map fields are necessary. The “@” designates to the attribute field instead of going directly to the common data format. To properly share attachments, add the field map as shown below: Source field: ${TM:psp_attachment;table_sys_id=$[GR:sys_id];netsuite_sent} Attachments The  psp_attachment  table map below will map attachments into the  <attachments>  field when an incident message is shared out. Below is the script for the  data  field value: var sysEncodedAttachment = new GlideSysAttachment();  
var binData = sysEncodedAttachment.getBytes(current);  
var StringUtil = (typeof GlideStringUtil != 'undefined') ? new GlideStringUtil() : new Packages.com.glide.util.StringUtil();
answer = StringUtil.base64Encode(binData); Transform Map Depending on what field transformations the customer wants, you may need to create a new table map. Here's how: Navigate to transform maps under System Import Sets with the filter navigator bar at the top left. Click  New  at the top left. Follow the example of the pictures below and add more fields if necessary. After creating and defining the field values, you need to add a few transform scripts so that ServiceNow will know how to handle, update, and where to direct values and attachments from received messages in the inbound table. Below is the onAfter transform script for attachments: (function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
	
	var attachments = new PerspectiumAttachment();
	attachments.addAttachments(source, target, "netsuite_sent");
	
})(source, map, log, target);