Attachment synchronization

ServiceNow Side

Basic support

To activate synchronization of attachments from ServiceNow to SAP SolMan, simply add the attribute “ISATTACHSET” to the payload definition of the tasktype:

Go to All → CC4 → Customising and choose the payload you want to add attachments and add new name-value pair. value can be left initial.

image-20241021-073036.png

Options

Without any specifications all attachments will always be sent. Per default the binary data will be sent. To fine tune this feature, following options are aviable:

Option Name

Option Value(s)

explanation

Option Name

Option Value(s)

explanation

delta_user

the username (id) of integration user created in ServiceNow instance

All attachments coming from SolMan will be created by this integration user and you might not want to send those attachments back.

delta

LAST

FULL

LAST will sent only attachments created after last synchronization;

FULL sends all attachments associated to this ticket

sending_mode

binary [default]

url

binary is recommended when only a few or small attachments in one ticket. The binary data is sent inside the body-payload and might get relatively big

url is recommended for many big attachments per ticket. To get the actual attachment, an additional REST-GET call has to be performed form SAP side, which leads to more traffic overall.

A final definition might look like this:

image-20241021-074610.png

SAP side

Attribute ISATTACHSET has to be activated in Action Create/Update Inbound. To send attachments from SolMan to ServiceNowconfigure action Attachment Outbound.

Inbound

Navigate to Viewcluster to configure action create and update inbound:

Make sure ISATTACHSET is not disabled:

Make sure filedmapping is valid:

1: decide wether you want to work with url or binary data of attachments (for URL use IVURL)

2: add additional filter

Note:
The empty definitions are inherited from parent configurations and only seem empty.

Outbound

To send attachments to ServiceNow we use the attachment/upload API by ServiceNow. Define for URI in your configuration profile /api/now/attachment/upload:

This API uses multipart/form-data and accepts only one attachment per call.

At the moment we can only send one attachment per synchronization from SolMan to ServiceNow.

 

The attribute/payload definition is somewhat more complex:

 

ServiceNow’s API requires a specific order in the attributes of the payload. With a little trick using the Dep.Attribute field, we make sure /table_sys_id (0IVEXTGUID) and /table_name (0IVPROCESSTYPE) are filled first with the values from our normal attributes IVEXTGUID/IVPROCESSTYPE