|
Heap POST/JSON WebHook Heap CRM supports a universal JSON, POST or GET (not recommended) request to the webhook url (available under the help section) that creates a person, prospect or message. Most programming languages have built in functions for creating JSON payloads (e.g. PHP, Ruby, Java). A typical JSON payload might look like this (this should be placed in the POST variable "json" -- you can also send data directly to the POST variables): Code:
{Heap is smart enough to just add new people and ignore duplicates (though it updates contact info and person level custom values if possible). By adding a value, probability and more info field, Heap realizes this is a lead (once Heap is creating a prospect you can also post into transaction level custom values): Code:
{A message payload might look like this: Code:
The body variable will be parsed for advanced e-mail operators as described in this document (it will also be parsed for "[association:Name of Prospect]" despite that not being a normal message operator). You can also retrieve prospect data in JSON format by adding the GET or POST variable "search" with a search phrase. A typical JSON response might look like this: Code:
[{The webhook uses the same advanced search system that you use within Heap. You can retrieve people data instead of prospect data if you set the GET or POST variable "searchpeople" to "true". There is some Google Apps Scripts sample code retrieving data in this method available here. Related Documents:
Sending Google Form Submissions to Heap
Using Google Apps Scripts and the JSON WebHook, you can create all sorts of data in Heap automatically |