IntegrationHub - Remote Process Sync - Syncing attachments

James Kailukai1
Tera Guru

I have setup and able to exchange Incidents using IntegrationHub's Remote Process Sync. I have a the Inbound and outbound Flows working to update the "attributes". I have started to work on the syncing the attachments

I have looked at this documentation ( https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/integrationhub/reference/remote-process-sync-actions.html ) and it make it seem fairly simple as you see from below. 

Identify and request missing attachments from a remote system: Use these actions in the following order to automatically look up and request attachments from a remote system that don't exist in your local system:

  1. Identify New Attachments - Use this action to look up any attachments that exist on the remote system but don't exist on your local system for correlated records.
  2. Request Attachments from Remote System - Use this action to request the transfer of identified attachments from the remote system to your local system.

I was looking if someone had a flow sample of how to get the Attachments from the remote system. I have the following so far:
find_real_file.png
My issues is that I am new to this and I am struggling with what needs to go in the various Inputs on each of the actions. I am not even sure if I am using the correct actions and in the correct order. 

I would appreciate any help anyone has. 


  

15 REPLIES 15

The "Include attachments" is selected.

find_real_file.png

When I go into the Incident and add an attachment you can see activity in the Outbound Sync Queue.  In the example below I manually added the 4th attachment, and you can see the insert for the new one and 3 updates for the existing ones.

find_real_file.png

The attachment was added "interactively" 

nitin51
Tera Contributor

Hello James,

We are also facing same issue, please update here if your issue is resolved externally.

Looking for more response on this.

Ok, finally got this. Using a wide range of resources, including opening a case with HI, I have been able to exchange attachments. 

Please take a look at the attachment that I added as it walks through all the steps I did and includes some debugging steps as well. 

Marques1
Tera Contributor

Hello everyone,

James I have provide you with some information in a case however I believe I can give more information on how to get the attachments going across instance here.

Assuming you have configured the Process definition to sync the records and the missing step is sync the attachments.

Please proceed as below.

1- Edit your process Definition (to my case it's called Incident Management Process)

find_real_file.png

2- Navigate to Outbound Flows related list And make sure your outboud subflow is set to the correct flow find_real_file.png

Until here no mystery right? 🙂 Now is the fun part.

3- Edit your Outbound Flow designer - Subflow (to my case it's called NEW Remote Process Sync Outbound Flow)

4- Add a new step (Action -> Get Attachment Metadata for Local Record)

This step will build your payload adding the JSON for the attachments on the incident record

find_real_file.png

5- At step 3(below the Get Attachment Metadata for Local Record) Edit the Send Captured Payload to Remote System.

Leave blank the Payload field, and add Manually the fields: Capture Metadata, Change Fields and Attachment Metadata.

find_real_file.png

6- At Attachment Metadata, "using data pill picker" select Attachment Metadata (from step 1)

find_real_file.png

7 - Save and publish your subflow.

Now go to the instance B to configure inbound flow.

8- Confirm you have your inbound flow configured in Remote Sync Definition.

find_real_file.png

9- In Flow Designer, open the Inbound subflow (To my case it's Remote Process Sync Inbound Flow Template - Basic).

10- Make sure your have the Transform Payload from Inbound Sample configured with the format and fields you have specified before in the Outbound Remote Sync Definition - Capture Definition (instance A)

find_real_file.png

11- As you can per above, create a new step (Request Attachment from Remote System) after the "Create Correlation" step.

12- In Attachments field, "data pill pick" it to step 1 Attachment Metadata

find_real_file.png

find_real_file.png

12- Remember to set up the correlation you're creating in step 6.

 

NOTE: Make sure the user rps.api.instance.a and rps.api.instance.b has the proper roles as per documentation: https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/integrationhub/tasks/build-first-remote-process-sync-integration.html

Details of Remote Sync Actions can be found at: https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/integrationhub/reference/remote-process-sync-actions.html

 

Please mark correct if it works as it helps others to faster find the reply

 

James Kailukai1
Tera Guru

I was able to finally get this working, using a wide range of resources, including a ticket to ServiceNow.

I will attach a word do with all steps I did, including some debugging.