Skip to content

Latest commit

 

History

History
243 lines (166 loc) · 10.3 KB

README.md

File metadata and controls

243 lines (166 loc) · 10.3 KB

My CRM Residential Application Lodgement

MyCRM aims to integrate with a wide range of lodgement targets either by communicating directly to a lender or via 3rd party gateways. At the point of lodgement, based on configuration and predefined rules, the user is presented a selection of available lodgement targets for their loan application. Once a target is selected a lodgement package is created within MyCRM containing all available loan application information. This lodgement package is then sent to the selected lodgement target for validation, if the validation is successful, the package can then be lodged. After initial lodgement, MyCRM will listen for any updates regarding the staus of the application so these statuses can be visible within MyCRM. The intention of this readme is to assist potential lodgement targets in completing this integration with MyCRM.

Lixi Version

Lodgement uses Lixi packages for both Australia and New Zealand.

  • CAL - 2.6.35
  • CNZ - 2.1.8

MyCRM Lodgement Overview

The following diagrams demonstrates a highlevel overview of MyCRM and integration into the Target API.

Lodge

POST Application/{applicationId}/Lodgement/Residential

Lodge a residential deal.

image

Validate

POST Application/{applicationId}/Lodgement/Residential/Validate

Validate a residential deal.

image

Lodgement Target

A lodgement target is implemented per lender, the target can lodge and validate a lixi package. Each target is independent and can have different security requirements, but all endpoints will require at minimum authorization.

Required Endpoints

  • Lodge
  • Validate

image

Retry Strategy

Calling into a target endpoint a retry policy will be utilised. The implementation of the retry strategy is on specific status codes retry up to 3 attempts with a exponential back off of 2 seconds to the power of the retry attempt.

Conditions:

  • Status Code 420 - Enhance your calm;
  • Timeout exception;

Client Authentication

This section outlines how participants in the CDR regime will authenticate clients seeking access to end points. Lodgement Targets should support the authentication of the Lodgement API using a signed JWT using the client credentials flow.

Transaction Security

Use of TLS

All HTTP calls MUST be made using HTTPS incorporating TLS >= 1.2.

Backchannel

POST Lodgement/Residential/Backchannel The Lixi Standard could be CNZ or CAL.

The backchannel allows a call-back endpoint for the lender to update a deal after being lodged. The backchannel endpoint will be developed and managed by Loan Market. The LIXI package for CAL and CNZ already has the required fields. The Lodgement Target should send these updates using the Lixi Standard.

image

Samples

<?xml version="1.0" encoding="UTF-8"?>
<Package>
    <Content>
        <Application>
            <Overview BrokerApplicationReferenceNumber="LoanScenario-1558767-ZYCANU1" LenderApplicationReferenceNumber="BNZ-005045"/>
        </Application>
    </Content>
    <Instructions>
        <ApplicationInstructions>
            <Update>
                <Event DateTime="2021-04-24T01:01:24" Name="Application Received" Details="Thanks for submitting this application. We've started working on it and will get back to you soon."/>
            </Update>
        </ApplicationInstructions>
    </Instructions>
    <Publisher LIXICode="LIXICode"/>
    <Recipient Description="Simpology Pty Ltd" LIXICode="SPLMO1"/>
    <SchemaVersion LIXITransactionType="CAL" LIXIVersion="2.6.35"/>
</Package>

Authorization

The back channel uses Okta to Authenticate using client credentials.

Loan Market will supply the following details which are all required to authenticate:

  • Okta Domain - the okta domain is different per environment;
  • Client Id;
  • Client Secret;
  • Scope - integration.lodgement;

Type Definitions

A separate Open API definition has been specified for the back channel.

OpenAPI

The Open API definitions versions are backed up to OpenApi Definitions.

Samples

All samples included within this repository are using .NET Core 6 The sample provides a very basic application which provides an example OpenAPI schema.

Required Software installations:

Application

image

  • Test Harness - Console application which will run a series of tests against the sample.
  • Open API Spec - An API which provide a swagger specification and also acts as a proxy calling into the Target API.

Running the sample

Open a console within ./samples/MyCRM.Lodgement.Sample and execute "dotnet run"

Schemas


Generating Classes

There are many tools to generate classes from an Open API Definition file.

  • AutoRest - Supports the majority of languages and has documentation.

ValidationResult

Name Type Required Description
ReferenceId string optional Obsolete, supporting previous existing implementations.
ValidationErrors [ValidationError] mandatory The list of validation errors.

ValidationError

Name Type Required Description
Name string optional Obsolete, supporting previous existing implementations..
Code string mandatory Const 401.
IsValid bool mandatory Const false.
ErrorType string optional Obsolete, supporting previous existing implementations.
Attributes [ValidationErrorAttributes] optional Contains the Error message that will be shown on MyCRM pop-up

ValidationErrorAttributes

Name Type Required Description
Ids string optional Obsolete, supporting previous existing implementations.
ErrorMessage [ErrorMessage] optional

ErrorMessage

Name Type Required Description
Title string mandatory
Detail string optional Obsolete, supporting previous existing implementations.

Samples

<?xml version="1.0" encoding="utf-16"?>
<ValidationResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <ValidationErrors>
        <ValidationError>
            <Code>401</Code>
            <IsValid>false</IsValid>
            <Attributes>
                <Ids />
                <ErrorMessage>
                    <Title>Proof of income wasn't supplied </Title>
                </ErrorMessage>
            </Attributes>
        </ValidationError>
        <ValidationError>
            <Code>401</Code>
            <IsValid>false</IsValid>
            <Attributes>
                <Ids />
                <ErrorMessage>
                    <Title>Proof of Identity wasn't supplied</Title>
                </ErrorMessage>
            </Attributes>
        </ValidationError>
        <ValidationError>
            <Code>401</Code>
            <IsValid>false</IsValid>
            <Attributes>
                <Ids />
                <ErrorMessage>
                    <Title>Employment history must have minimum of 3 years</Title>
                </ErrorMessage>
            </Attributes>
        </ValidationError>
    </ValidationErrors>
</ValidationResult>

Validation Pop-up

Download Lixi package

We are using the Swagger api tools in order to generate the package, here are some instructions about how to get the Authentication Bearer code and the endpoint that generates the Lixi package.

ScreeShot 2022-10-11 at 15 46 42@2x

  • Log in to MyCrm using the credetial provided.
  • Once you logged in to MyCRM using the browser developer tools (F12) filter the network calls and search for the getuser calls.
  • Get the Bearer token and copy it into the Swagger Authorize (exclude the “Bearer” prefix)

ScreeShot 2022-10-11 at 15 49 40@2x

Final step click the excute and get the package

ScreeShot 2022-11-10 at 12 18 39@2x