Working with Webhooks

Created by Daniel Beckett, Modified on Thu, 18 May, 2023 at 4:26 PM by Daniel Beckett

This guide is intended to help with two things:

  1. Show you how to setup webhook actions in FLG.
  2. Outline the format that the webhook data will be sent in.

1. How to Setup Webhook Actions

Webhook actions can be setup in lead types and workflows.

For lead actions, these are added in Settings > Lead Groups > Lead Types.

Select 'Edit' on the lead type that you'd like to add the webhook action to.

Click on 'Add New Action'.

Select 'Webhook' from the list of actions and then click to configure.


For the custom URL, specify the endpoint that you want the webhook to send to. You can also change the event that you would like the webhook to run on. (See the lead actions guide for more information on the different events).

Once the webhook action is saved you'll see it in the list of actions for the lead type.

You can also add webhook actions into workflows. This is done by heading to Settings > Workflows. An existing workflow can be used or you can create a new one.
Just like with the lead actions, you click to add an action and then configure the webhook:

2. Webhook Data Format


Webhooks will send data using an HTTP POST with the following headers:
content-length: 12345
content-type: application/x-www-form-urlencoded
Note that the content-length will vary based on the data sent.

The below table lists the fields outputted by the webhooks.
FieldSampleNotes
id123456789Lead ID / Reference
titleMr.Title
firstnameJoeFirst Name
lastnameBloggsLast Name
fullnameJoe BloggsFull Name
address1 High StreetAddress line 1
address2This AreaAddress line 2
address3This VillageAddress line 3
towncityThis TownTown
postcodeBB12 1BCPostcode
emailjoe.bloggs@example.comEmail Address
phone101282123456Phone Number
phone201282654321Alternative Phone Number
fax01282321654Fax Number
dob1990-12-15Full Date of Birth
YYYY-MM-DD
dobday15Birth Day
dobmonth12Birth Month
dobyear1990Birth Year
companyABC Ltd.Company
jobtitleManagerJob Title
leadgroupnameMortgagesLead Group Name
leadgroupid12345Lead Group ID
leadtypeGeneralLead Type Name
sitenameABC Ltd.Site Name
siteid123Site ID
statusQuotedLead Status
usernameJoe BloggsAssigned User Name
userid1234Assigned User ID
progressQualifiedBilling Point
sourceGoogleMarketing Source
mediumPPCMarketing Medium
termLoansMarketing Term
cost10Lead Cost
value20Lead Value
received2019-10-08 08:50:09Date & Time Lead Received
YYYY-MM-DD HH:MM:SS
buyernamePartner Co.Referral Partner Name
buyerid1234Referral Partner ID
buyerreferencePassed to JoeTelephone Transfer Reference
transferdatetime2019-10-11 14:23:02Telephone Transfer Date/Time
YYYY-MM-DD HH:MM:SS
transfersuccessfulYesTelephone Transfer Success Result (Yes or No)
subid1234-1234Sub Lead ID
xmldatetime2019-10-11 14:23:02Internet Delivery Date/Time
YYYY-MM-DD HH:MM:SS
xmlfails0Internet Delivery Outcome (0 = Success, 1 = Failed)
xmlreference123456Returned Reference (if captured)
xmlresultSuccessReturned Result (if captured)
introducernameIntroducer Co.Introducer Name
introducerid4321Introducer ID
reference12345Introducer Reference.
Text input specified by the Introducer.
contactemailYesPermission to Email
contactphoneYesPermission to Phone
contactsmsYesPermission to SMS
contactmailNoPermission to Mail
contactfaxNoPermission to Fax
contacttimeAnytimeContact Time Preference
dropboxabc123@msrvr.netLead Dropbox Address
ipaddress62.123.456.789IP Address Lead Was Submitted From
data# (1 to 50)User-definedAdditional Field Data
type# (1 to 50)User-definedAdditional Field Label
taskexistsYesSignifies whether or not there is an active task on the lead. Yes or No.
workflowexistsNoSignifies whether or not there is an active workflow on the lead. Yes or No.
lastnoteCalled CustomerLast note left on the lead. New > Telephone Call OR New > Note
lastnotedatetime2019-10-11 15:00:49Date & Time of last note.
YYYY-MM-DD HH:MM:SS
eventtypestatusEvent type that triggered the webhook
eventusernameJoe BloggsName of user that triggered the event
eventuserid123ID of user that triggered the event
eventdatetime
2019-10-20 15:00:00
Date & Time of the event that triggered the webhook
appointmentdatetime2019-10-20 15:00:00Date & Time of referral appointment.
YYYY-MM-DD HH:MM:SS *
appointmentnotesCall landline numberNotes associated with referral appointment *
jUser-definedJourney field data. The format is j followed by the field name.

* Note: This is related to the 'Set Appointments' lead referral method and not the Appointments feature.

Need more help?


We always aim to provide great support to everyone. Contact our support team for help and advice or let us know how we can improve FLG on our feedback site.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article