Data Integrations

How to connect to third-party data source in the DigiFi platform.

Overview Of Data Integrations

DigiFi's platform includes the ability to set up and manage data integrations that can request and receive information from external sources. Once set up, data integrations can be placed within decision strategies to run automatically and have the outputs assigned to variables (i.e. data fields).

720720

Common examples of data integrations include connecting to credit bureaus, collateral valuation data, fraud scores and internal company systems.

👍

The DigiFi platform can be connected to almost any external data source!


Adding A Data Integration

To add a new data integration:

  • Navigate to Company Settings > Integrations > Data Integrations.
  • Click the "Add Integration" button.
  • Provide an Integration Name (required) and Description (optional).
14801480

Standard Configuration

Once your integration is created, you'll be automatically redirected to the detailed integration configuration pages. This is separated into "Standard Configuration" and "Advanced Configuration". The "Standard Configuration" section includes 4 sub-pages:

  • Request Options
  • Request Headers
  • Request Body
  • Response Data

Request Options

To begin configuring a data integration, the following information must be provided:

  • URL, which consists from two parts (provider + other URL parameters). For the hostname, you can select from the list of standard options. If you need an additional option, please contact DigiFi for assistance.
  • Method, which is either POST, GET, PUT, DELETE or PATCH.
18971897

Request Headers

Almost every request requires headers to be sent. These can be standard headers (such as "Content-Type") or custom headers which are used to send credentials or specific header parameters.

Every data integration requires a "Content-Type" to be specified. This is mandatory because it defines how request data will be formatted. "Content-Type" can be one of the following options:

  • JSON
  • XML
  • Form-data

Every custom header can use a static value or use a variables's value (see screenshot below).

16661666

Request Body

The request body is built using JSON (even for non-JSON integrations). We'll then use the "Content-Type" header to transform the request into the correct format.

You can reference variable's inside a request body by wrapping their system name like {{variable_system_name}}.

For example, if your configuration looks like this:

{
  "borrower_type": "person",
  "borrower_email": "{{borrower_email}}"
}

When the request is sent, {{borrower_email}} will be replaced by the borrower's actual email like this:

{
  "borrower_type": "person",
  "borrower_email": "[email protected]"
}

For example:

18771877

Request Body: XML Configuration

If your request has a Content Type of XML, you can configure additional that options to transform JSON to XML by clicking the 3 dots (beside the page title) and selecting "Edit XML Request Body Configuration".

A popup will open where the following options can be configured:

  • trim: Trims the whitespace at the beginning and end of text nodes (default: true).
  • hideUndefinedTag: Ignore undefined tags (default: true).
  • nullValueTag: Contact DigiFi if you need this and the default is not sufficient (default: 'full').
  • emptyStringTag: Contact DigiFi if you need this and the default is not sufficient (default: 'full').
  • formatting : Prettify generated XML (default: true).
  • rootTag: Root tag of the valid xml that is sent to the 3rd-party provider (default: 'requestTag').

For example:

15061506

Response Data

When an API response is received, DigiFi converts it into JSON (regardless of the response format). This response can be traversed through the traversal path.

For each field you would like to extract from the response, you'll need to select a DigiFi variable (which the value will assign to) and provide a traversal path (which is where the value can be found in the response.

18331833

Traversal path is used to get response data items. For example if response data looks like:

{
  "variables": {
    "borrower_company_name": "Wholesale",
    "borrower_phones": ["+372348545", "+3443534636"]
  }
}

The configuration may look like:

11251125

Response Data: Array Parsing Configuration

In case of arrays in the response data additional configuration can be used for a field:

10831083

This configuration will assign 100 to Loan Amount in case if the following JSON will be received in response:

{
  "variables": [{"borrower_company_name": "Best", "amount": 100}]
}

Response Data: XML Parsing Configuration

If your response will come in XML, additional options may be required to transform it to JSON. If this applies to your integration, go to 3-dots > Edit XML Response Configuration (beside the page title).

A popup will open where the following options can be set:

  • explicitArray: Always put child nodes in an array if true; otherwise an array is created only if there is more than one (default: false).
  • attrkey: Prefix that is used to access the attributes (default: @).
  • trim: Trim the whitespace at the beginning and end of text nodes (default: false).

For example:

14901490

Advanced Configuration

The "Standard Configuration" section includes 3 sub-pages:

  • oAuth2 Authentication
  • Certificate Authentication
  • JavaScript Functions

oAuth2 Authentication

If your integration requires oAuth2 authorization it is possible to configure the authorization request through DigiFi. The configuration form includes similar configurations form the "Standard Configuration" steps. Please follow the "Standard Configuration" steps to set up the sections of oAuth2 Authentication.

Once oAuth2 is configured, no other actions are required, DigiFi caches the key and sends it with main request automatically.

15061506

Security Certificate

If your integration requires a security certificate for authentication, it needs to be uploaded in the Security Certificate section.

15061506

Once uploaded, "passphrase" needs to be added. It can be done via "Request Headers" step (it won't be send together with headers).

15061506

JavaScript Functions

JavaScript Functions contain functions that tell the integration what calculations to run on the underlying integration response when it is received.

👍

For security reasons, data parsers can only be set up by DigiFi's professional services team - please contact us if advanced calculations are required on the response.

Within the DigiFi platform, data parsers can be used to:

  • Count the number of tradelines, inquiries and other things within a raw integration response.
  • Sum the total amount of debt, payments and other things within a raw integration response.
  • Perform complex loops and calculations using raw code before integration results are produced.
  • ... and much more!

Parser function have access to the response data using the "json_data" variable. Outputs needs to be assigned to "_global.parsed_variables".

For example:

(function() {
  if (json_data.someValue) {
    _global.parsed_variables.someValuePlusOne = json_data.someValue + 1;
  }
})();

After the data parser is configured, additional mapping within Response Data step needs to be added:

11081108

DigiFi Professional Services

Want help setting up an integration? DigiFi offers end-to-end implementation services, which are performed by our in-house professional services team of analysts and engineers.

👍

Contact us to discuss our implementation services!