This guide is intended to help with two things:Show you how to setup webhook actions in FLG.Outline the format that the webhook data will be sent in.1. How to Setup Webhook ActionsWebhook 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 FormatWebhooks will send data using an HTTP POST with the following headers:content-length: 12345content-type: application/x-www-form-urlencodedNote that the content-length will vary based on the data sent.The below table lists the fields outputted by the webhooks.FieldSampleNotesid123456789Lead ID / ReferencetitleMr.TitlefirstnameJoeFirst NamelastnameBloggsLast NamefullnameJoe BloggsFull Nameaddress1 High StreetAddress line 1address2This AreaAddress line 2address3This VillageAddress line 3towncityThis TownTownpostcodeBB12 1BCPostcodeemailjoe.bloggs@example.comEmail Addressphone101282123456Phone Numberphone201282654321Alternative Phone Numberfax01282321654Fax Numberdob1990-12-15Full Date of BirthYYYY-MM-DDdobday15Birth Daydobmonth12Birth Monthdobyear1990Birth YearcompanyABC Ltd.CompanyjobtitleManagerJob TitleleadgroupnameMortgagesLead Group Nameleadgroupid12345Lead Group IDleadtypeGeneralLead Type NamesitenameABC Ltd.Site Namesiteid123Site IDstatusQuotedLead StatususernameJoe BloggsAssigned User Nameuserid1234Assigned User IDprogressQualifiedBilling PointsourceGoogleMarketing SourcemediumPPCMarketing MediumtermLoansMarketing Termcost10Lead Costvalue20Lead Valuereceived2019-10-08 08:50:09Date & Time Lead ReceivedYYYY-MM-DD HH:MM:SSbuyernamePartner Co.Referral Partner Namebuyerid1234Referral Partner IDbuyerreferencePassed to JoeTelephone Transfer Referencetransferdatetime2019-10-11 14:23:02Telephone Transfer Date/TimeYYYY-MM-DD HH:MM:SStransfersuccessfulYesTelephone Transfer Success Result (Yes or No)subid1234-1234Sub Lead IDxmldatetime2019-10-11 14:23:02Internet Delivery Date/TimeYYYY-MM-DD HH:MM:SSxmlfails0Internet Delivery Outcome (0 = Success, 1 = Failed)xmlreference123456Returned Reference (if captured)xmlresultSuccessReturned Result (if captured)introducernameIntroducer Co.Introducer Nameintroducerid4321Introducer IDreference12345Introducer Reference.Text input specified by the Introducer.contactemailYesPermission to EmailcontactphoneYesPermission to PhonecontactsmsYesPermission to SMScontactmailNoPermission to MailcontactfaxNoPermission to FaxcontacttimeAnytimeContact Time Preferencedropboxabc123@msrvr.netLead Dropbox Addressipaddress62.123.456.789IP Address Lead Was Submitted Fromdata# (1 to 50)User-definedAdditional Field Datatype# (1 to 50)User-definedAdditional Field LabeltaskexistsYesSignifies 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 > Notelastnotedatetime2019-10-11 15:00:49Date & Time of last note.YYYY-MM-DD HH:MM:SSeventtypestatusEvent type that triggered the webhookeventusernameJoe BloggsName of user that triggered the eventeventuserid123ID of user that triggered the eventeventdatetime2019-10-20 15:00:00Date & Time of the event that triggered the webhookappointmentdatetime2019-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.