Api Function Name

zoho_insert_lead_coldtub


NOTE: THIS FUNCTION IS FOR COLD TUB FORMS ONLY.

This function accepts incoming leads, for example from zapier, which can be a lead originating from various sources such as facebook ads, gravity forms and general forms and insert that lead into the “lead approval” system in the Zoho CRM system for Cold Tubs.

OBSERVATIONS

    1. This api function is a reduced version of theĀ zoho_insert_lead api function but with certain elements stripped out and reconfigured.
    2. When a lead is sent to this api we send a copy of the lead via email to sales@coldtub.com and also insert it to ZOHO.
    3. As a backup of the lead we will BCC a copy of the lead to “leads.from.api@coldtub.com” so in the event of issues we will have a copy of the email.
    4. In the subject line of the lead email we will use a reference number which will be a unix timestamp when the lead was generated as we cannot generate any formal reference number like we do for the zoho_insert_lead api.
    5. This api inserts to zoho using the WEBFORMS system and not the api provided by Zoho because the api does not insert to the lead approval flow.

End Point URL

The url end point is: https://api.arcticspascore.com/live/

Parameters

action Type Example Required Description
action varchar zoho_insert_lead_coldtub yes

Name of the api function

first_name varchar Joe

First name of the lead

NOTE REGARDING FULL NAMES:
In the case you are grabbing only the FULL NAME of the lead, you only need to pass the full name to the first_name field.

On the api side we will "SPLIT" the name into first and last name so both fields are populated.

Why?

Zoho requires a last name so if no last name is passed then the insert will fail, so when we receive the first_name data and last_name we will try and split the full name across the two fields so Zoho will be happy.

last_name varchar Bloggs

Last name of the lead

email varchar joe@bloggs.com

Email address of the lead

tel varchar 999888777

Telephone number of the lead.

Try and pass the full phone number including INT code if possible.

However, if you are passing ip parameter, we will do a country lookup anyway.

street varchar 1 Acme Way

This will be the street address for the lead.

city varchar Acmeville

This will be the city name for the lead.

zip_code varchar 19958

The zip code of the lead.

country varchar Canada

The country name of the lead.

NOTE: if you do not pass country but pass the ip then we will do a ip lookup and establish the country name from the IP.

ip varchar 255.255.255.255

This will be the IP of the lead.

If you pass the ip, we will do a country lookup to get some details of the api and pass those details to the zoho and core system

request_type varchar General Enquiry

This is a free text field for you to enter what type of request it is.

EG: General Enquiry or Support Question

source varchar Some web site

Enter a free text reference so we know where the lead was generated from.

source_url varchar https://domain.com/form

An ABSOLUTE URL where the lead was generated.

For example if the lead is embedded in a form, pass the url of where the lead is embedded.

description varchar Long runs the fox

This is a free text section which will be shown in the description field inside of the Zoho lead detail.

This can contain for example any comments or questions/requirements from the customer.

Response Codes

Response Code Response Message
14000 null response code
14001 error connecting to zoho api
14002 zoho api returned an error (we will provide custom message from zoho)
14003 lead inserted successfully

Example Responses

Response Code Response Format Example
14002 json
{
    "MainResponse": {
        "APIName": "Arctic Spas Core Live API",
        "APIFunctionName": "zoho_insert_lead",
        "HttpResponseCode": 200,
        "RequestID": 255640,
        "QueryDateTimeGMT": "2018-07-13 16:46:27",
        "ResponseTime": 0.793669939041,
        "ResponseCode": "13002",
        "ResponseMessage": "Zoho error code: 4834. Zoho error message: Invalid Ticket Id"
    }
}
14003 json
{
    "MainResponse": {
        "APIName": "Arctic Spas Core Live API",
        "APIFunctionName": "zoho_insert_lead",
        "HttpResponseCode": 200,
        "RequestID": 255643,
        "QueryDateTimeGMT": "2018-07-13 16:47:04",
        "ResponseTime": 1.0912361145,
        "ResponseCode": "13003",
        "ResponseMessage": "lead inserted successfully"
    }
}