User Tools

Site Tools


Common Request Format

Version Author
Argon pnguyen

The following is the default implementation of the common request format. The common request format mirrors what one would see of the Request form in ServiceNow with related lists expressed in embedded XML form. The Common Request update set will include a Table Map that generates the below XML payload when specified in a Dynamic Share, it also includes the default Import Set Table and Transform Maps to ingest this format and produce all the artifacts that comprises of a Request and its related records.


The implementation of any common document format is symmetrical which means that the output, when consumed, should produce the same or similar records at the target. The implementation should also exhibit idempotent behavior which means that when the same document is consumed and processed repeatedly, the same result appears or is ignored because the results already exists.

Dynamic Shares

For the correct outputs to be produced, you must create 2 Dynamic Shares - one to capture the comments and work_notes field values in a before context, and the other as async mode to capture the related records in a delayed step.

In the before Dynamic Share, use the following code snippet to prevent unwanted outbound messages to be queued when comments or work_notes are not updated.

if (current.comments.nil() && current.work_notes.nil()) {
	ignore = true;

Outbound Table Maps

The following table maps construct the outbound messages to be queued. Specify the main Request to Common Request Table Map in your Dynamic Share as the root map.

Name Type Source table Description
Request to Common Request common_request Request [sc_request] Main body of the common_request format
psp_attachment embedded_attachment sys_attachment Map for building embedded attachments field
psp_requested_item embedded_requested_item Requested Item [sc_req_item] Map for building embedded requested items
psp_approver embedded_approver Approval [sysapproval_approver] Map for building embedded approvers
psp_group_approval embedded_group_approval Group approval [sysapproval_group] Map for building embedded group approvals
psp_recurring_price embedded_recurring_price Recurring Price [sc_recurring_rollup] Map for building embedded recurring prices

NOTE: As of the Fluorine release, the Catalog Task (sc_task) table map is included as part of the Common Request update set. To learn more about catalog tasks, see view and edit a catalog task.

Inbound table Map

In order to process messages of topic: siam and type: common_request, you must create an inbound table map to target the import set table as follows. (This map should have been included in the provided update set already)

Import Set

The import set table is called u_psp_common_request and has a transform map called PSP Common Request to Request. This transform map has transform scripts that are responsible for parsing the embedded sections of common_request:

  • attachments
  • requested_items
  • approvers
  • group_approvals
  • recurring_prices

Select to deactivate each of these transform scripts if you choose not to parse these embedded objects into records. If you need to extend or add additional capabilities, instead of modifying the existing scripts, add new ones so that upgrades are possible.

These transform scripts use specific script includes to assist in parsing and ingesting the embedded objects into the correct artifacts. The script includes are

  • PerspectiumAttachment
  • PerspectiumRequestedItem
  • PerspectiumApprover
  • PerspectiumGroupApproval
  • PerspectiumRecurringPrice

These script includes are included as part of the Common Endpoint update set that should be installed prior to installing the common object format update sets.


Attachments are automatically embedded inside the Common Document Format record that is shared and subscribed to by MSPs and Customer Endpoints. This is done using embedded table maps that are included with the Common Endpoint update set. Attachments are limited to 7MB in size per outgoing Common Document Format record.

To ensure that duplicate attachments are not sent out in an incident, a “tag” should be created so as to tag attachments. This way, when a record is updated and attachments are queried for that record to embed, it will ignore attachments that have been sent and are “tagged”.

To setup a tag:

  1. Create a tag in the “label” table (type “label.list” in the Filter Navigator box to quickly go to the label table):

  1. Use a unique name such as “msp_client_sent” or “msp_client_request_sent” to ensure this tag is not used by other MSP or SIAM integrations. If you create the tag as “msp_client_request_sent”, you can skip the next step and are done setting up a tag. NOTE: If you are integrating multiple common document formats, use a different tag for each format (i.e. “msp_client_incident_sent” for incident, “msp_client_problem_sent” for problem, etc.)
  2. Go to the Perspectium > Control and Configuration > Table Maps and open the “Request to Common Request” outbound table map
  3. Open the field map that begins with “${TM:psp_attachment”:
  4. In this field map, replace “msp_client_request_sent” with the name of the tag you created in step one:
  5. Go to the Import Set table (type in “u_psp_common_request.list” in the Filter Navigator box) and click on the “Transform maps” UI action
  6. Open the “PSP Common Request to Request” table transform map and then go to the “Transform Scripts” section
  7. Open up the attachment transform script and change “msp_client_request_sent” to the tag created in step one. Note, keep the “” around the tag when you replace it here. For example, if your tag is named mycompany_sent, change “msp_client_request_sent” to “mycompanysent”:

Sample Output

<?xml version="1.0" encoding="UTF-8"?>
	<activity_due />
	<additional_assignee_list />
	<approval>not requested</approval>
	<approval_history />
	<approval_set />
	<approvers />
	<assigned_to />
	<assignment_group />
	<business_duration />
	<business_service />
	<calendar_duration />
	<calendar_stc />
	<closed_at />
	<closed_by />
	<close_notes />
	<cmdb_ci />
	<comments />
	<comments_and_work_notes />
	<company />
	<contact_type />
	<correlation_display />
	<correlation_id />
	<delivery_address />
	<delivery_plan />
	<delivery_task />
	<description />
	<due_date>2017-10-06 03:09:59</due_date>
	<expected_start />
	<follow_up />
	<group_approvals />
	<group_list />
	<location />
	<opened_at>2017-10-04 03:10:00</opened_at>
	<order />
	<parent />
	<rejection_goto />
	<requested_date />
			<assigned_to />
			<due_date>2017-10-06 03:09:59</due_date>
			<sc_catalog />
	<short_description />
	<sla_due />
	<special_instructions />
	<sys_created_on>2017-10-04 03:10:00</sys_created_on>
	<sys_domain_path />
	<sys_tags />
	<sys_updated_on>2017-10-04 03:10:00</sys_updated_on>
	<time_worked />
	<user_input />
	<variables />
	<variables />
	<variables />
	<watch_list />
	<wf_activity />
	<work_end />
	<work_notes />
	<work_notes_list />
	<work_start />

The following Perspectium Inbound/Outbound Message unloads can be un-gzipped and uploaded into your instance of ServiceNow to view and used for testing.

Common Request Sample -

Common Request Sample -

common_request_format.txt · Last modified: 2019/02/13 22:59 by timothy.pike