Table maps handle how data being shared out of ServiceNow is processed. Your outbound table map for Ivanti is the Incident to Common Incident table map, which will require some field changes to ensure that data is mapped correctly when sent from ServiceNow to Ivanti.

Prerequisites


(warning) First, you will need to create a ServiceNow dynamic share for Ivanti.

(warning) You will also need to create a ServiceNow subscribed queue and subscribe for Ivanti.

Procedure

To edit the outbound table map fields for Ivanti, follow these steps:


Access the outbound table map

Log into your ServiceNow instance and navigate to Perspectium > Control and Configuration > Table Maps or simply type and then select Table Maps in the Filter Navigator on the upper left-hand side of the screen. Then, search for and then click into the table map of the table you are integrating. You can easily search for this table map by typing the name in the search window under the Name field.

TableTable Map
IncidentIncident to Common Incident
ChangeChange to Common Change
Problem

Problem to Common Problem

TaskTask to Common Task 

Edit the attachment Source Field

Scroll down to the list of PSP Table Field Maps. Locate and then double-click the ${TM:psp_attachment;table_sys_id=$[GR:sys_id];msp_client_sent;skip_insert} Source Field to edit the field (This will be the Source Field with attachments as the Target Field). Replace the field name with ${TM:psp_attachment;table_sys_id=$[GR:sys_id];ivanti_sent;skip_insert;limit 1} click the icon to save your changes. Alternatively, you can click into the field name and change the Source Field value to ${TM:psp_attachment;table_sys_id=$[GR:sys_id];ivanti_sent;skip_insert;limit 1} and then click Update to save your changes.

Edit the caller_id table map field

Search for and then click into caller_id from the PSP Table Field Maps list. Change the Source Field to caller_id.email and change the Target Field to caller_email. Then, check the Use Script box and enter the script shown below in the Source Script window. Finally, click Update to save your changes to the table map field.

answer = current.caller_id.email;

(info) NOTE: You will need to create a new user with a First Name, Last Name, and Email in ServiceNow's sys_user table for every existing user in Ivanti in order for the Ivanti-ServiceNow Service Gateway integration to work properly.

Add scripts for additional table map fields

Using Step #3 as a guide, click into and then add Source Scripts for the table map fields per the information in the table shown below.


Table Map Source FieldScript to add(info) NOTE: Field values will be reflected in Ivanti in...
description
answer = current.description;
if (current.description.nil()) {
 answer = current.short_description;
}
Summary
business_service
answer = 'Service Desk';
Service
category
answer = 'Capacity';
Category
state
if (current.state == '0') {
answer = "Logged";
}
else if (current.state == '1' || current.state == '2') {
answer = "Active";
}
else if (current.state == '3') {
answer = "Waiting for Resolution";
}
else if (current.state == '6') {
answer = "Resolved";
}
else if (current.state == '7') {
answer = "Closed";
}
else if (current.state == '8') {
answer = "Cancelled";
}
else {
answer = "Active";
}
Status
assigned_to
answer = 'Alan Taylor';
Owner
assignment_group
answer = 'Service Desk';
Team
urgency
if (current.urgency == '1') {
answer = "High";
}
else if (current.urgency == '2') {
answer = "Medium";
}
else {
answer = "Low";
}
Urgency
impact
if (current.urgency == '1') {
answer = "High";
}
else if (current.urgency == '2') {
answer = "Medium";
}
else {
answer = "Low";
}
Impact
Table Map Source FieldScript to add(info) NOTE: Field values will be reflected in Ivanti in...
state
if (current.state == '1') {
answer = 'Waiting';
}
else if (current.state == '2') {
answer = ‘Assigned’;
}
else if (current.state == ‘3’) {
if (current.state.getDisplayValue() == ‘Completed’) {
answer = ‘Rejected’;
}
else if (current.state.getDisplayValue() == ‘Completed’) {
answer = ‘Completed’;
}
}
else if (current.state == ‘4’ || current.state == ‘8’) {
answer = ‘Cancelled’;
}
else if (current.state == ‘5’) {
answer = ‘Accepted’;
}
else if (current.state == ‘6’ || current.state == ‘7’) {
answer = ‘Logged’;
}
Status
description
answer = current.description;
if (current.description.nil()) {
 answer = current.short_description;
}
Details



Next steps


Add and edit ServiceNow transform map scripts for Ivanti