Description

Webhooks is a callback that allows event-driven communication between two applications. Webhooks are used by web applications to receive small amounts of data from other applications, or to trigger workflow automations. In SoftLedger, setting up a webhook can serve as an event-driven notification to another application to kick off some form of action in that application. For example, if a Bill is Paid in SoftLedger, a webhook can be set up to alert another system when a Bill has been Paid, to take some form of action in that system, like notifying a Vendor that a Bill has been Paid.


Format

From SoftLedger, webhooks send a post request. The body of the post request will be in the format:

{
        uuid, // Unique ID for the webhook

        date, // Timestamp webhook was triggered at
 
        objectType, // SoftLedger API Object
 
        action, // What happened? ex LedgerAccount Updated

        objectId, // Primary key for the "objectType" (usually the "_id" value)

        tenantId // tenant the webhook was triggered for

}

Verification of Webhook

An easy way to check if webhooks are firing would be to create a test object and confirm the data was received appropriately. This could be done by console logging from the webhook endpoint or using a service like webhook.site to create a temporary webhook endpoint and then create a test object to confirm the webhooks are firing correctly.

Note: The latter option will not however, show that the application is receiving webhooks so best practice is to record a log from the endpoint in the receiving application to confirm receipt.


Important Considerations

  • Bulk actions in SoftLedger (e.g. Bulk uploading Journals via excel spreadsheet) do not send webhooks



For more information, please reach out to support@softledger.com and the SoftLedger team is happy to assist.