Transferring Data To Go High Level

Follow

This article shows you what you need to do to transfer your lead data from LeadByte to GHL; the article covers Adding a Contact to a sub account, adding to a GHL Marketing Campaign and when booking an appointment into a calendar via api

Adding Lead as a Contact in GHL

To successfully add a contact you will need the following from GHL:

✅ The URL to post the lead to in GHL
Check that this is the correct URL in GHL to post to: https://rest.gohighlevel.com/v1/contacts/
Further reading here: https://developers.gohighlevel.com/#17e15b4d-34c7-4b55-9c38-5c32d09b44e8

✅ The GHL API key
Get the API key, you will need to add this to your LeadByte Delivery as a Header
You should find this under Company Settings

Screen_Recording_2021-12-22_at_12.37.35_pm.gif

✅ The Fields + Any Custom FieldID's
This is needed to create your delivery.  If you need to post to custom fields in GHL you will need to know what the ID is as this is used. 

NOTE: to get a list of the custom fields, your client will need to retrieve it from an API call: https://developers.gohighlevel.com/#69e0e6ad-7bb8-4999-8f6e-f8f858918ab8

Creating the Delivery in LeadByte for adding a Contact
The delivery you need to create is a Direct Post using JSON Post as the remote system. 

Below is an example of the JSON Post data (remember, the field names MAY be different for your GHL account):

{
"email": "[email]",
"name": "[firstname] [lastname]",
"postalCode": "[postcode]",
"customField": {
"jjFla5jrLns1PfHDTHAe": "[data1]",
"pJVzfAljlSiWgYS9Pap6": "[data2]"
}
}

In the above example, jjFla5jrLns1PfHDTHAe and pJVzfAljlSiWgYS9Pap6 are the custom fields for the GHL account.

You need to use Header Authorization.  The field value is Bearer {API}.  You get the API from GHL under Settings > Company (at time of this article).


Screenshot_2021-03-10_at_13.48.36.png

Adding Lead To Marketing Campaign
For this to work you will need to have a Marketing Campaign in GHL

Example
ghl_marketing_campaign.png

With every Marketing Campaign a Campaign ID is generated.  This is required in the JSON Delivery POST from LeadByte.  When you create a contact in GHL to start a Marketing Campaign you not only need to pass over the personal data but also declare for what Marketing Campaign ID.

LeadByte Delivery Set Up

The delivery in LeadByte is a JSON POST request. 
The Request URL is: https://api.gohighlevel.com/campaign/start

Example JSON Body

{
"campaign_id": "ENTER_YOUR_ID",
"first_name": "[firstname]",
"last_name": "[lastname]",
"phone": "[phone1]",
"extrafield": "[ssid]"
}

In the above example we have created the custom field called "extrafield".  The JSON is how you would pass in a value to that field.

Screenshot_2021-03-10_at_13.30.07.png

Response
The success response for Go High Level can be handled using a Status 200 OK
Image_2020-10-12_at_3.26.31_pm.png




When booking an appointment into a calendar via api

1. The request URL is different: https://rest.gohighlevel.com/v1/appointments/

2. JSON format is largely similar with a few extra fields as below: 

{
"firstName": "[firstname]",
"lastName": "[lastname]",
"phone": "[phone1]",
"selectedSlot": "2021-08-21T15:00:00-05:00",
"selectedTimezone": "US/Central",
"calendarId": "[CALENDAR ID FOR THE SPECIFIC CALENDAR HERE]",
"customField": {
"extrafield": "ExtraTest"
}
}

3. Points to note:
- The selected slot MUST be in the format as specified above. YYYY-MM-DDTHH:MM:SS
- the extension, in the above this is "-05:00" Is the time zone offset from GMT. The Time zone relates to the time zone in the settings in Go High Level. This MUST match the calendar you are booking the appointment into. 
as an example, if I had the calendar set to the time zone in the screenshot:


GHL_APPT.jpeg


Then when adding a selected slot it must be like so: 


"selectedSlot": "2021-08-21T15:00:00-04:00",
"selectedTimezone": "America/New_York",

Where the time zone and the offset from GMT match the calendar you are pushing into. Its important that the selectedTimezone is one of Go High Levels specified time zones in the drop down. For example using "EDT" would not work. 

- Finding the calendar ID - The calendar ID is located in the URL when you load a specific calendar. Example below: 


GHL_calendar_id.jpeg

4. You also need to make sure in the calendar settings there is available time between appointments and they are available to book. 

5. Response is the same as when adding a contact as explained above. 

6. Authorization is the same as adding a contact also explained above.

More information here https://developers.gohighlevel.com/

Was this article helpful?
0 out of 0 found this helpful

Comments