---
title: "Add and edit ServiceNow transform map scripts for Autotask"
canonical: "https://docs.perspectium.com/space/gold/1254304/Add%20and%20edit%20ServiceNow%20transform%20map%20scripts%20for%20Autotask"
format: markdown
---
To ensure that the data being shared out of Autotask and into ServiceNow (inbound data) is being mapped correctly when arriving at your ServiceNow instance, you will next need to add and update some of the scripts in the  PSP Common Incident to Incident  transform map under the PSP Common Transform Maps module.  ServiceNow transform maps  handle the format of data being shared into a ServiceNow instance. Making changes to the transform map scripts will allow data to be properly shared out of  Autotask   Service Manager  and then be mapped correctly to the relevant fields in ServiceNow. Prerequisites  First, you will need to  create a ServiceNow dynamic share for Autotask .  You will also need to  create a ServiceNow subscribed queue for Autotask  and  edit ServiceNow outbound table map fields for Autotask . Procedure To add and edit the PSP Common Incident to Incident transform map scripts for Autotask, follow these steps: When Order Script OnAfter 100 (function runTransformScript(source, map, log, target /*undefined onStart*/ ) { var qgr = new GlideRecord("u_psp_queues"); var queue = ""; qgr.addQuery("u_name", " psp.in .meshlet.autotask"); qgr.query(); if (!qgr.next()){ return; } queue = qgr.sys_id; var qc = new GlideRecord("psp_replicate_conf"); qc.addQuery("table_name", "incident"); qc.addQuery("u_target_queue", qgr.sys_id); qc.query(); if (!qc.next()){ return; } var gr = new GlideRecord("incident"); gr.addQuery("sys_id", target.sys_id); gr.query(); if (gr.next()){ var pspR = new PerspectiumReplicator(); pspR.shareRecord(gr, "incident", "update", qc.sys_id, "cipher=3,SIAM_provider=servicenow"); } })(source, map, log, target); Next steps Add ServiceNow attachment.uploaded script action for Autotask Similar topics Contact Perspectium Support US:  1 888 620 8880 UK:  44 208 068 5953 support@perspectium.com