FLG Support

Working with Webhooks

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.

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

Image: https://flg360.uservoice.com/assets/215435551/working_with_webhooks_2.png

Click on 'Add New Action'.

Image: https://flg360.uservoice.com/assets/215435776/working_with_webhooks_3.png

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

Image: https://flg360.uservoice.com/assets/215436154/working_with_webhooks_4.png

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. 

Image: https://flg360.uservoice.com/assets/215436307/working_with_webhooks_5.png

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: 

Image: https://flg360.uservoice.com/assets/215436724/working_with_webhooks_6.png

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 Street Address line 1 
address2This Area Address line 2 
address3This Village Address line 3 
towncityThis Town Town 
postcodeBB12 1BC Postcode
emailjoe.bloggs@example.com Email Address 
phone101282123456 Phone Number 
phone201282654321Alternative Phone Number 
fax01282321654Fax Number 
dob1990-12-15 Full Date of Birth
YYYY-MM-DD
dobday15Birth Day 
dobmonth12Birth Month 
dobyear1990Birth Year 
companyABC Ltd. Company
jobtitleManagerJob Title 
leadgroupnameMortgagesLead Group Name 
leadgroupid12345 Lead Group ID 
leadtypeGeneralLead Type Name 
sitenameABC Ltd. Site Name 
siteid123Site ID 
statusQuotedLead Status 
usernameJoe Bloggs Assigned User Name 
userid1234Assigned User ID 
progressQualifiedBilling Point 
sourceGoogleMarketing Source 
mediumPPCMarketing Medium 
termLoansMarketing Term 
cost10Lead Cost 
value20Lead Value 
received2019-10-08
08:50:09
Date & Time Lead Received
YYYY-MM-DD HH:MM:SS
buyernamePartner Co. Referral Partner Name 
buyerid1234Referral Partner ID 
buyerreferencePassed to Joe Telephone Transfer Reference 
transferdatetime2019-10-11
14:23:02
Telephone Transfer Date/Time
YYYY-MM-DD HH:MM:SS
transfersuccessfulYesTelephone Transfer Success Result (Yes or No) 
subid1234-1234 Sub Lead ID 
xmldatetime2019-10-11
14:23:02 
Internet 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.net Lead Dropbox Address 
ipaddress62.123.456.789 IP Address Lead Was Submitted Fr om 
data# (1 to 50)User-defined Additional Field Data 
type# (1 to 50)User-defined Additional 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 Customer Last note left on the lead. New > Telephone Call OR New > Note 
lastnotedatetime2019-10-11
15:00:49
Date & Time of last note.
YYYY-MM-DD HH:MM:SS
eventtypestatusEvent type that triggered the webhook 
eventusernameJoe Bloggs Name of user that triggered the event 
eventuserid123ID of user that triggered the event 
eventdatetime2019-10-20
15:00:00
Date & Time of the event that triggered the webhook 
appointmentdatetime2019-10-20
15:00:00
Date & Time of referral appointment.
YYYY-MM-DD HH:MM:SS *
appointmentnotesCall landline number Notes associated with referral appointment *
jUser-defined Journey 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.