lead_setCreates a new lead in the CRM.
| Name | Type | Required | Example |
|---|---|---|---|
mode | String | Y | insert/update'insert' or 'update' - if mode is 'update' then 'lead_id' or 'external_id' is required |
lead_id | String | N | 123456Lead id to update |
external_id | String | N | ABC123456Lead external id to update (or may also provide for insert) |
full_name | String | N | John DoeFirst & Last - script will attempt to separate them |
first_name | String | N | JohnFirst name of lead |
last_name | String | N | DoeLast name of lead |
company | String | N | Example CompanyCompany of lead |
address | String | N | 123 Test StreetLead address |
address_2 | String | N | 123rd AveLead address second line |
city | String | N | Test CityLead city |
state | String | N | Test StateLead state |
zip | Integer | N | 97303Lead Postal Code |
country | String | N | Test CountryLead Country |
lat | Decimal | N | Latitudinal street address position |
lng | Decimal | N | Longitudinal street address position |
phone | String | N | 132-123-1234Lead Phone Number |
cell | String | N | 321-321-4321Lead Mobile Number |
ok_to_text | String | N | NoEither "Yes" or "No" |
fax | String | N | 213-213-4231Lead Fax Number |
skype | String | N | johnsmith100Lead Skype Username |
ip | String | N | 123.123.123.123Lead IP Address |
followup_date | DateTime | N | 2010-01-01 12:00:00Next follow up date for lead - auto-creates a followup event when updated |
besttime | String | N | MorningBest time to follow up with lead |
status | Integer | N | 1Comment this to direct them to the status TE page TODO |
priority | String | N | WarmHow important the lead is |
custom_status | Integer | N | 0Integer custom_status or custom_status Text (must already exist in the custom_status table) |
gmt_offset | Integer | N | -1000Lead's time zone |
email | String | N | example@example.comLead Email address |
admin_notes | String | N | Note text for adminsNotes viewable by admins |
govt_id | Integer | N | 100-10-1000Lead government id |
source | String | N | example.comLead source |
sub_id | String | N | 10Affiliate sub id |
sub_id2 | String | N | 11Second Affiliate sub id |
birth_date | Date | N | 1980-01-31Lead's date of birth (YYYY-MM-DD or MM-DD) |
note | String | N | Bla bla blaA new note to be appended to the notes section |
notes | JSON Encoded String | N | [{"Status":"Message","Notes":"test"},{"Status":"Email","Notes":"example@example.com"}]Each note needs a status and the content of the notes |
tags | String | N | tag1,tag2,tag3This will set the tags on the lead to exactly this list (missing tags will be removed) |
ownerID | String | N | 12The userID of the user by which this lead will be owned |
pool | String | N | billmoreA Pool Name to which this lead belongs |
upload_file_name | String | N | filename.pdfBase name of file (without path) |
upload_file_contents | String | N | "*#@(!...."Full contents of the file (keep files small to avoid delays in post time) |
OTHER_CUSTOM_FIELDS | Misc | N | ...Other custom fields may be available on a per-system basis (see names of custom field names in edit mode) |
match_update | Integer | N | 1Perform matching (Duplicate Scrubbing) and update an existing lead (leave 'mode'='insert') |
match_name_and_address | Integer | N | 1Both name+address must match (each match item is ORed with the others) |
match_name_and_phone | Integer | N | 1Both name+phone must match (each match item is ORed with the other) |
| Name | Type | Example |
|---|---|---|
status | Integer | 0 |
status_message | String | Lead Creation Successful |
lead_id | Integer | 1001 |