How can we help?

Integration via Advanced Connections


Advanced Connections are LoanPro's webhook tool, allowing you to send information to third-party systems based on your own custom automations and business logic. 

Advanced Connections can be used for a wealth of different purposes. Instead of simply sending a payload of information, you could automate your processes. For example, you can use Advanced Connections to automatically log AutoPay adjustments, create third-party integrations with other software like Slack, or make changes to customer profiles. You could even use some of our other tools in tandem with webhooks—like creating Walkthroughs for your users that have them select smart checklist items that automatically send out webhooks.

In-Depth Information

If you've used webhooks in the past (or if you've read some of our articles on the subject), you'll know that webhooks allow you to send information to a separate system when an event occurs. This is helpful if you're using two pieces of software in tandem and would like them to communicate with each other. Typically, webhooks are used to simply send information across the web. This form of communication isn't doing the things you see an API doing—like creating, updating, or deleting stuff. If you're using webhooks right now, you're probably also using an additional piece of software just to reformat the information you're receiving so that you can use it in your system. That probably took time and a lot of money to develop, and you're probably still spending money to maintain it.

LoanPro takes webhooks a step further. Now, you can use LoanPro's webhooks to send GET, PUT, POST, and DELETE requests to other URLs. You can also send information in whichever format you'd like and with custom headers—meaning you can use webhooks to update information via a separate system's API. To top it all off, you can also use LoanPro's Context Engine Variables in the URL, payload, and custom headers, giving you some incredible automation options.

This opens a wealth of possibilities for automating your processes. If you're using a separate piece of software and you're wondering if you could use this to automate LoanPro API usage, you absolutely can. Our webhooks feature may fully eliminate your need to build and maintain the middleware that connects your processes. You can wave goodbye to using third-party integration services, too.

Let's take a look at how these features work. Each setting is going to be dependent on what you'd like your webhooks to do, but we'll give you a few examples to show you what you could build yourself. Below, we'll show you how to build a webhook that's sent to an external source and how to build one that's sent to LoanPro to update something. Let's create a trigger-based webhook that's sent out when a loan is five days past due and in the "Open" or "Collections" loan status. Here's our rule:

(and (= status-days-past-due 5) (or (= loan-status "Open") (= loan-status "Collections")))

Method and Callback URL

 If you're familiar with webhooks, you'll know that the callback URL is the destination of your webhook. How the destination handles the information you send is determined by the method.

Sending to an External Source

Method: POST 
Callback URL: https://yoururlhere.com

If we're sending this webhook to an external source—whether it be another system's API, a piece of middleware, etc—we'll use a callback URL that reflects that.

We'll also use a POST here to create a new message in the system we're sending it to.

 
 

Sending to LoanPro

Method: PUT 
Callback URL: https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers([[v('customer.primary.id')]])

When this webhook is triggered, we're going to send a message back to LoanPro. And the message we're going to send will tell LoanPro to do something for us. In this instance, we're going to tell LoanPro to create a new customer note for us when our loan hits the criteria we set in the rule. The callback URL in this example is the endpoint used to create, edit, or delete customer information. And we're even going to use a Context Engine Variable to autofill the customer ID associated with the loan.

Since we're updating a customer's information, we'll use a PUT method.

 
 

undefined

Tokens and Custom Headers

When sending and receiving information over the web, it's a good idea to use some form of authentication. Most APIs require authentication, and you likely use authentication with your own external systems. LoanPro's webhook functionality provides a few different authentication options. You can generate and use a new authorization token within the webhook setup page. Or, you can use custom headers to provide the headers that are required for the receiving source.

Sending to an External Source

If we're sending this to an external source, the authentication we use will depend on what the receiving end requires. It may not have a set of required authentication protocols, like if you're testing your webhook via an online service.

 
 

Sending to LoanPro

LoanPro's API requires specific headers for request authentication. If you're familiar with our API, you'll recognize them:

Autopal-Instance-Id: <Tenant ID>
        Authorization: <Bearer token>
        Content-Type: application/json

If we want to send a webhook to LoanPro, we'll use the headers above so the API can authenticate the request. Without them, the webhook will result in a 401 response, and the customer note we're trying to create will not be saved.

 
 

undefined

Payload Formatting

Here, you'll determine what information you're sending to your destination. Our webhooks have two different formatting options. First, you can select and send Context Engine Variables in the 'Variables to include in the callback payload' section. This text field cannot be formatted in a specific way, but you can include as many variables here as you'd like. Your second option is using the second text field and using 'Custom Body Formatting'. Here, you can format your payload in any way you'd like. If you'd like your payload to be sent in a JSON format, as a string of text, or in another programming language entirely, you can do so.

In our webhook's case, we'll have some specific information that should be sent.

Sending to an External Source

If we're sending this to an external source, the formatting options for the information sent within the payload will depend on the system receiving the webhook. If you'd like to simply send a list of variables within the payload, you will format the field like the following:

loan-id,loan-status,customer.primary.full-name,current-date,status-amount-due,status-days-past-due,next-scheduled-payment-date,next-scheduled-payment-amount

The set of variables above will send out a payload formatted like the following:

{
           "eventName": "Customer's Loan is 5 Days Past Due",
           "context": {
               "current-date": "2022-09-26",
               "next-scheduled-payment-amount": 89.24,
               "loan-id": 3579,
               "loan-status": "Open",
               "next-scheduled-payment-date": "2022-10-20",
               "status-days-past-due": 5,
               "status-amount-due": 158.70,
               "customer": {
                   "primary": {
                       "full-name": "Douglas McCallagher"
                   }
               }
           }
           "trace": "204262bb-4634-49ad-8b88-db8217b76c09",
           "auth": "",
           "attemptNumber": 1
        }
 
 

Sending to LoanPro

In the instance of sending our request back to LoanPro, our payload will need to fit a few requirements. First, it will need to be in the JSON format, and the payload will need to include the information that's applicable to our request. Since we're adding a customer note, we'll use the Custom Body Formatting section to format our payload.

This is the payload that creates a customer note, and it includes context engine variables that will be replaced with loan information when the webhook is sent.

{
           "Notes": {
               "results": [
                   {
                       "body": "This customer was late on their payment  on [[v('current-date')]]. Their outstanding balance at the time was $[[v('status-amount-due')]].",
                       "categoryId": 2,
                       "subject": "Delinquencies",
                       "type": "STANDARD"
                   }
               ]
           }
        }
 
 

undefined

If you plan on sending custom formatted payloads, you'll need to make sure the system catching the webhook accepts the format you use. If necessary, make sure to update your custom headers to accept the payload you use.

 

 


console.log(location);