In this article, we will cover:
- Webhooks in PrecisionLender
- Webhook Requirements
- Configuration setup
- Notification responses
- PrecisionLender events for subscription
- Troubleshooting attempt fails
Using Webhooks in PrecisionLender
PrecisionLender offers clients the option to create a subscription to be notified when an event occurs within the PrecisionLender application. Rather than making a repeated API call based on a predefined schedule, the configured webhooks will send a POST request when an event has occurred, lessening the API requests overall and allowing more instant application updates after a webhook is received.
Requirements to Set Up and Use PrecisionLender Webhooks
Admin privileges with ‘Manage API Access’ in PrecisionLender
- Basic knowledge of APIs
- Helpful examples can be accessed via PrecisionLender API documentation
- PrecisionLender API access
- API Access is enabled by PrecisionLender - If you have questions regarding your access, contact PrecisionLender Support
Webhooks Configuration Setup
From the Administration Screen, click “Integrations” on the left-hand side. Then, under “Webhooks Configurations”, click “New Generic Webhook Configuration” to create a new webhook. If you wish to edit an existing webhook, click on its name and select “Save” once the update is made.
When creating a new webhook, the following fields are required to be populated:
- Name: This is the name of the webhook being created (default: ‘New Webhook Configuration’)
- URL: This is the client URL expected to receive the POST notification containing the update details
- Key: This is a unique value associated with the request and can be used to confirm that the source of the data sent to the client webhook URL endpoint is from PrecisionLender. A unique default key is auto-populated however can be edited, as desired.
- Event Triggers Assignment: These are the events that will trigger a notification when there is a change, if the box is checked. Available triggers include:
- Opportunity Created
- Opportunity Updated
- Opportunity Deleted
- RA Run Completed
- State: This is the status of the webhook (default: ‘Enabled’)
- If the webhook should be turned off, select the ‘Disable’ button
- If the webhook notification fails 5 times, the state will automatically be updated to ‘Paused’
When finished updating the above fields, select “Save” to keep the changes made.
Webhooks Notification Response
Once webhooks are configured in PrecisionLender, a webhook response notification will be issued to the URL specified every time the defined event(s) occurs.
A webhook response notification will look like this:
The receiving application must respond to the webhook notification with a 200 OK. Any other response will be treated as a failure.
The X-PL-Signature header is a hashed (HMAC) value of the full response body with the account key as the secret key. This can be used to confirm the source of the data sent to your webhook url endpoint is from PrecisionLender.
PrecisionLender Events for Subscription
The following events are currently available for subscription:
Possible Events to be Added
Adding events to the list of possible webhook subscriptions is a straightforward process, and can be initiated with a request through our Support Center. Here's a list of possible events we could wire up to receive subscription requests:
Troubleshooting attempt fails
If the original notification fails to send, the notification attempt will be run 5 more times. If the 5 additional attempts fail, the notification will be marked as a non-successful delivery and the webhook state will be updated to ‘Paused’. In order for the webhook to be restarted, the state will need to be updated to ‘Enabled’.