Introduction
This article aims to show you how to use Jitterbit to connect to Reltio. At the time of this writing, Jitterbit does not have a predefined Reltio connector. This article will show you how to create one yourself using the HTTP Connector.
The HTTP Connector in Jitterbit Harmony uses REST API in order to connect to an HTTP server. There are a couple of things to consider when using the HTTP Connector to connect to Reltio and we are going to look at them in this article.
Configuring an HTTP Connector
In order to access your Reltio tenant via API, you must use the Reltio Auth API to get an access token. This access token enables you to call other Reltio APIs. This example shows you how to authenticate to Reltio via your Reltio username and password.
Configure an HTTP Connection
From the Component palette panel, which is on the right side of your screen, search for an HTTP Connector. Double-click on it and put a Connection name and Base URL (check the photo below), and then save.
Note: If you receive an error (404 Not Found) after you click the Test button, do not worry, this does not mean that the connection will fail, it is because you have not provided a username and password yet.
Configure an HTTP POST Activity
After you have configured the connection, you will see in the Component palette that a “Reltio Authentication” connector is shown (next to the default API one). When you click on it, you will see the activities that you can use.
Grab a POST activity and drag it to the Design Canvas in the middle of your screen. Double-click on it to open and configure it. You need to configure the following settings for a successful connection:
Settings | Description |
---|---|
Name | An obligatory setting which represents the name of the activity |
Path | Used 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 |
HTTP Verb | It is set to POST and it cannot be changed inside this activityIn order to have another HTTP verb, you need to grab the corrseponding activity from the component palette |
Request parameters | Query parameters for username, password, and grant_type |
Request headers | Headers for Authorization and Content-Type |
After you are ready with the 1st step, click Next to go to the 2nd step. As there is no need to provide a request schema here, click again Next.
In the 3rd step, you need to provide a custom source schema that looks like this:
On the last 4th step the data schema is shown and you can click on Finished.
Create an example workflow
Even though we configured our POST HTTP activity, our operation is not completed yet as there are certain rules for operation validity that can be checked here – https://success.jitterbit.com/cloud-studio/cloud-studio-reference/operations/operation-validity/.
Configure Transformation component
We will add a Transformation block after the POST activity.
- When you open the transformation, you will see that the source schema is already provided from the POST activity as the two blocks are right next to each other.
- For the target schema, we can use the same structure as in the source schema, so you just have to click on the “Mirror Source Schema” button. After that, the source and target schemas should be mapped and as we have the same properties, we can use the “Automap Exact Matches” option. The end result should look like this:
Next, create a global variable where we can hold the access token that we receive from Reltio so that we can reuse it later in other API calls. In order to do that, you should click on the script icon next to the field name of the property you will add the global variable to, in our case the access_token one. The easiest way to define a global variable in the Jitterbit script is by using the $(dollar) sign. It will look like this:
After saving the transformation component, the operation should be first deployed and then run, or you can use the “Deploy and Run” button.
Log access token variable (optional)
If you want to see the access token that has been received, you can log the global variable in the operation log. That can happen either from the script in the transformation where we created the $Access_Token variable or you can create a script block after the transformation block. Let’s see what it looks like with a new script component.
The code inside the script component looks like this:
After you deploy and run the operation, the results will be seen in the operation log – go to the setting of the operation and choose the “View Logs” option. You can click on the lastly executed operation to expand details and there you can also find the logged access token.
Use access token in other API requests
Note: In order to further use the access token for calling other Reltio API requests there is an important thing to bear in mind. As the Base URL used for establishing the authorization request and the Base URL used for other APIs are different, you need to configure a new HTTP Connector in Jitterbit. You can see an example of how to do that in Part 2 of this documentation.
References
Reltio – Obtaining an Access Token with Password Grant Type
Jitterbit Cloud Studio – HTTP Connector
Jitterbit Cloud Studio – Operation Validity