/ by

Retrieving an Entity from Reltio by Id using Jitterbit – Part 2

Introduction

I would like to show you how to use the Reltio entities API to get an entity by id. This article assumes that you have followed the steps in Part 1 to create a Jitterbit connector that can authenticate with Reltio and retrieve an access token.

GET Entity Workflow

We will build a new workflow that looks like this:

Let’s break up the operation into smaller units in the next steps below.

Call Reltio Auth Operation

Our first step in the new operation is to call the “Reltio Auth Workflow” that we have created in Part 1 of the documentation. For that purpose, we will use a script component and the RunOperation function. It will look like this:

In the script, if you click on the operations button on the right in the component palette, you will see the existing operations that you have. When you double-click on the “Reltio Auth Operation”, the code will automatically appear in the script.

Configure HTTP Connector and HTTP GET Activity

The next block that we will add is an HTTP Get activity. As we already discussed earlier, we will need another HTTP Connector configured (the Base URL here is different from the Auth one, and the HTTP activities inherit it from the main connector).

HTTP Connector

Search for HTTP Connector in the component palette on the right and double-click on it. Give it a name and a Base URL like this:

HTTP GET Activity

Grab a GET activity and drop it onto the new operation, after the script snap that we created earlier.

This time you will need to configure the following settings:

SettingsDescription
NameAn obligatory setting which represents the name of the activity
HTTP VerbIt is set to GET and it cannot be changed inside this activity
PathUsed to build the URL pathThe URL is built as the Base URL provided in the initial setup of the HTTP connector and the path added in the Path field are concatenated
Request headersAdd two new rows – Authorization and Content-TypeIn the value field for the Authorization put in “Bearer” and from the “V” button on the right select the global variable “Access_Token” that we created earlier For the value of Content-Type put “application/json”

We do not need to provide a request schema in Step 2

For the response schema in Step 3, we will provide the JSON body payload that we normally receive when retrieving an entity, for example through Postman. Choose the “Yes, provide new schema” option. In the example, we are working with a really simple entity that consists only of First and Last names. Our example schema will look like this:

The last 4th step shows us the data schemas that we have provided. Click on Finished to finish the configuration of the GET activity.

Map the data

In order for our operation to be valid, we need a Transformation block in which we will do the field mappings. For the target schema, mirror the source schema and automap the exact matches as we will use the same properties.

Let’s log the First name of our entity to the operation log using the WriteToOperationLog function:

Our simple operation is ready now, so we can save, deploy and run it.

Source code

The 2 workflows created in Part 1 and 2 in the documentation can be downloaded from here:

Reltio Connection Project.json 55KB

In order to use them, you should set the parameters for your own Reltio environment.

References

Contact us

Get in touch and ask us anything. We're happy to answer every single one of your questions.

  • 6A Maria Luiza Blvd, Plovdiv
    4000, Bulgaria
  • Ulpia Tech LinkedIn Ulpia Tech Twitter


    To top