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.
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.
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.
Request Object: FicoRetailLendingRequest
Response Object: FicoRetailLendingResponse
Request Object: FicoApplicationFraudRequest
Response Object: FicoApplicationFraudResponse
When submitting a request to the FICO platform, you need to follow these steps:
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).
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.
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.
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:
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.
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.
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).
You will need to set the Content-Type header to application/json; charset=UTF-8. This can be done in the OnBeforeRequest action.
Follow the patterns established in the OutSystems Integration Studio (IS) module to create and handle requests and responses.
Use the Fico<object>_CreateRequestJson action to dynamically create JSON request data based on the request structure.
Use the Fico<Object>_GetFromExternal action to send the request to the external service.
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.
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.
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.