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.
Lodgement uses Lixi packages for both Australia and New Zealand.
- CAL - 2.6.35
- CNZ - 2.1.8
The following diagrams demonstrates a highlevel overview of MyCRM and integration into the Target API.
POST Application/{applicationId}/Lodgement/Residential
Lodge a residential deal.
POST Application/{applicationId}/Lodgement/Residential/Validate
Validate a residential deal.
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.
- Lodge
- Validate
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;
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.
All HTTP calls MUST be made using HTTPS incorporating TLS >= 1.2.
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.
<?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>
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;
A separate Open API definition has been specified for the back channel.
The Open API definitions versions are backed up to OpenApi Definitions.
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:
- 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.
Open a console within ./samples/MyCRM.Lodgement.Sample and execute "dotnet run"
There are many tools to generate classes from an Open API Definition file.
- AutoRest - Supports the majority of languages and has documentation.
Name | Type | Required | Description |
---|---|---|---|
ReferenceId | string | optional | Obsolete, supporting previous existing implementations. |
ValidationErrors | [ValidationError] | mandatory | The list of validation errors. |
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 |
Name | Type | Required | Description |
---|---|---|---|
Ids | string | optional | Obsolete, supporting previous existing implementations. |
ErrorMessage | [ErrorMessage] | optional |
Name | Type | Required | Description |
---|---|---|---|
Title | string | mandatory | |
Detail | string | optional | Obsolete, supporting previous existing implementations. |
<?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>
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.
- Use the Swagger api url https://api.integration.mycrm.finance/swagger/index.html
- Lodgement Api definition should be selected as shown below.
- /Lodgement/Residential/Admin/Package endpoint is used to generate the package, it also allows to select the format Json or XML
- 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)
- Open an application you've created. from the application link copy the opportunityId in this example 114390700 and palace in the swagger and generate the package in the format you need. https://integration.mycrm.finance/app/opportunity/fact-find?opportunityId=114390700&loanId=12345&sourceFamilyId=4403391&isContactOpener=1
Final step click the excute and get the package