fico-platform-connector
Service icon

FICO Platform Connector

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 8 Apr
 by 
0.0
 (0 ratings)
fico-platform-connector

FICO Platform Connector

Documentation
1.0.0

FICO Platform Connector - Documentation

Overview

The FICO Platform Connector forge component adds integration to the FICO platform for Retail Lending and Application Fraud to your OutSystems application. This component includes the necessary structures for the requests and responses.

This documentation describes how to use the FICO Platform Connector forge component that interacts with FICO services for Retail Lending and Application Fraud requests in OutSystems. The component facilitates the creation of requests, handling of responses, and proper integration with external systems.

The integration supports two main services:

  • Retail Lending

  • Application Fraud

This guide will cover how to configure the integration, create necessary structures, and implement the appropriate flows to submit requests and handle responses.




1. General Usage

To use this component, you need to set up a screen with inputs, which will be bound to the correct request objects. These objects vary depending on the type of service you're working with: Retail Lending or Application Fraud.

1.1 Creating the Screen with Input Fields

  • Create a screen in OutSystems with various input fields, such as textboxes and calendars.

  • Bind the fields to the appropriate Request Object based on the action you want to perform.

For Retail Lending:

  • Request ObjectFicoRetailLendingRequest

  • Response ObjectFicoRetailLendingResponse

For Application Fraud:

  • Request ObjectFicoApplicationFraudRequest

  • Response ObjectFicoApplicationFraudResponse




1.2 Submitting a Request

When submitting a request to the FICO platform, you need to follow these steps:

Step 1: Get Token

  • Action: Call FicoToken_GetFromExternal to retrieve an authentication token.

  • Parameters: Provide the ClientID and Secret that correspond to the service you're working with (either Retail Lending or Application Fraud).

Step 2: Submit Request

  • For Retail Lending: Call FicoRetailLending_GetFromExternal with the token and the necessary request parameters.

  • For Application Fraud: Call FicoApplicationFraud_GetFromExternal with the token and request data.

Step 3: Handle the Response

  • The response will contain a decision attribute. The decision result can be found in the following path of the response:

Response.content.outputVariables.OutputTransaction.decision.decisionResult

  • This will contain the decision made by the FICO platform based on the request data.




2. Creating a new connection to the FICO platform

This section provides the steps necessary to add an additional FICO connection. If you only need to access Retail Lending and Application Fraud, you can skip forward to section 3. 

To create a new connection to the FICO platform, follow these steps:

2.1 Configure REST API Request

  • HTTP Method: Set to POST

  • Authorization: Add the Authorization header 

  • Request Format: Set the format to Text/plain.

  • Response Format: Set the response format to JSON.

2.2 Handling JSON Response

  • If you have the output JSON available, you can use it to create a structure for the response. You do not need to provide anything in the request body; leave it blank.

2.3 Renaming Structures

To avoid confusion and ensure clarity, it is recommended to rename structures with a unique prefix. For example, change "Application Info" to FicoRLIn_ApplicationInfo if you're dealing with Retail Lending (RL).




2.4 Set Content-Type Header

You will need to set the Content-Type header to application/json; charset=UTF-8. This can be done in the OnBeforeRequest action.




2.5 Implementing Request and Response JSON Creation

Follow the patterns established in the OutSystems Integration Studio (IS) module to create and handle requests and responses.

Request Creation

Use the Fico<object>_CreateRequestJson action to dynamically create JSON request data based on the request structure.

Request Submission

Use the Fico<Object>_GetFromExternal action to send the request to the external service.




3. Notes on JSON Request Structure

3.1 Dynamic JSON Structure

The FICO platform uses dynamic JSON to support varying data types for the same value. For example:

[

  { "name": "InputTransaction", "value": { "id": 1 } },

  { "name": "CheckFraud", "value": false }

]

In this example, the value attribute for "InputTransaction" is an object ({ id: 1 }), while the value attribute for "CheckFraud" is a Boolean (false). This variability in data types makes it necessary to dynamically generate the JSON Request, which doesn't align with OutSystems' traditional structure-based approach. The JSON Response does not have this.

To automatically create the JSON dynamically, you can use the FicoRetailLending_CreateRequestJson and FicoApplicationFraud_CreateRequestJson actions, which handle this complexity.

3.2 Troubleshooting JSON Parsing Issues

If you encounter issues with parsing JSON, consider the following:

  • Check variable types: For example, ensure that Date fields are correctly set to DateTime if the JSON expects a DateTime value.

  • Dynamic JSON Parsing: You may need to use an OutSystems Forge component, such as ArdoJSON, to parse the JSON dynamically if needed.




4. Final Recommendations

  • Always test with sample JSON inputs to verify that the requests are correctly structured.

  • Use the ArdoJSON Forge component if you encounter difficulties parsing JSON objects that have nested or dynamic structures.

  • When creating request structures, ensure they are aligned with the FICO platforms expected data types and format to prevent errors.