Webhook Overview

Webhooks are user-defined HTTP callbacks in user applications triggered by some events. eformsign Webhooks are triggered by document events that occurred whenever document status changes through the document workflow process. You will learn how to:

  • Add a webhook endpoint to eformsign service

  • Get the results from eformsign document events

Types of eformsign webhook events

Document event

  • Raised when a document has been created or document status has been changed

  • The event type is "document" and contains a document object.

PDF creation event

  • Raised when a PDF file of a document has been created

  • The event type is "ready_document_pdf" and contains a ready_document_pdf object

Wehook structure

{
"webhook_id":"faf2...663e",
"webhook_name":"Webhook",
"company_id":"2b99...f427",
"event_type":"ready_document_pdf",
"ready_document_pdf":{
    "document_id":"be7b...9045",
    "document_title":"Leave Request Form",
    "workflow_seq":2,
    "workflow_name":"Approval",
    "template_id":"44fc...3937",
    "template_name":"Leave_Request",
    "template_version":"21",
    "document_status":"doc_request_participant",
    "document_history_id":"f61d...1651",
    "export_ready_list":[
        "document"
    ],
    "mass_job_request_id":""
    }
}

Prepare webhook callback URL

In this class, we will use a website that enables us to test and debug Webhooks and HTTP requests.

  1. Visit https://webhook.site (You don't need to create an account).

  2. Copy the callback URL as shown below.

Register callback URL to eformsign

  1. Left-Side vertical navigation menu

  2. Integration > API / Webhook > Manage Webhook tab > New Webhook button

  3. New Webhook dialog

    1. Name: "webhook.site"

    2. URL: "https://webhook.site/6d7126bb-xxxx-xxxx-xxxx-429c2c4e2b06"

    3. Target: All documents

    4. Authentication type: No authentication

  4. Register

Test Webhook

You can test if the callback URL works fine. Just click the Test button as below.

You should see the test event received at https://webhook.site as below.

Create document

  1. Fill out forms except for the OFFICE USE ONLY section and Complete.

  2. Complete dialog > OK

Response from eformsign

Go back to the https://webhook.site and you should see the 3 events received.

Last updated