You can use Zoho Creator Form to collect information and populate it in Zoho CRM using create() Deluge task.
Syntax
<CRM Response> = zoho.crm.create(<CRM Module Name>, <Field values as map value>, <optional duplicateCheck as Integer>);
where,
<CRM Response> is the map variable returned by CRM as response.
<CRM Module Name>is the name of the CRM module where the record will be added. For example, "Leads" refers to the Leads module.
<Field values> is the map variable that holds the key,value pairs. The map key is the label name as specified in the CRM module and the map value is the field value as submitted in the ZC form. For example, "Company" : input.Company_Name . Here, "Company" is the label name as specified in the crm module and input.Company_Name refers to the value specified in the Company_Name field in the Zoho Creator form.
<duplicateCheck> Set value as "1" to check the duplicate records and throw an error response or "2" check the duplicate records, if exists, update the same. If the value is not specified, duplicate check will not be performed. Refer here for more details about duplicate check.
For example, the steps to create a lead in CRM from Creator form is described below:


leadinfo = {
"Task Owner" : input.Owner_Name,
"SMOWNERID" : input.Owner_ID,
"Last Name" : input.Name,
"Company" : input.Company_Name,
"First Name" : input.First_Name,
"Lead Source" : "Advertisement",
"Campaign Source" : "Website Contact us Form",
"Description" : input.Comments,
"Email" : input.Email_Id
};
crmResp = zoho.crm.create("Leads", leadinfo);
The above is a wrapper for insertRecord API defined in https://zohocrmapi.wiki.zoho.com/insertRecords-Method.html
leadinfo is the map variable that holds the key,value pairs.
Leads is the module name in Zoho CRM
crmResp is the map variable returned by CRM as response.
{
"message":"Record(s) added successfully","Created Time":"2011-06-14 12:28:11","Modified By":"ZohoTest","Id":"1584000000028003",
"Modified Time":"2011-06-14 12:28:11", "Created By":"ZohoTest"
}
On submit, the record is added to the Zoho CRM Leads module as shown in the screen-shot below.
Please refer the Zoho Creator sample application CRM-Creator-Invoice Integration
A file uploaded in Zoho Creator using the File upload field, can be pushed to Zoho CRM as an attachment in the zoho.crm.create() task.. The key name for referring to attachment is Attachment in both syntax and response.
Example
fetch = Add_Case [ID == xxxxxxxx];
leadinfo = { "Company" : "Test", "First Name" : "Test", "Last Name" : "test", "Email" : "test@zoho.com", "Phone" : "1234567",
"Address" : "test", "City" : "test", "State/Province" : "test", "Country" : "test", "Birth Date" : zoho.currentdate.subYear(20),
"Attachment" : fetch.File_upload };
crmResp = zoho.crm.create("Leads", leadinfo);
where,
fetch is the variable which holds the record values of the given ID
Attachment is the key name which refers to the file attachment.
fetch.File_upload refers to the File_upload field value.
Response
{"message":"Record(s)added successfully","Attachment":"File has been attached successfully" ,"Created Time":"2012-06-08 05:45:50","Modified
By":"Test","Id":"231356000000189001","Modified Time":"2012-06-08 05:45:50","Created By":"Test"};
You can define the create() task using Script Builder by following the steps given below:



taskInfo = {
"Task Owner" : input.Owner_Name,
"SMOWNERID" : input.Owner_ID,
"Subject" : input.Subject,
"Description" : input.Description,
"SEMODULE" : "Accounts",
"SEID" : input.Account_ID,
"CONTACTID" : input.Contact_ID};
crmResp = zoho.crm.create("Tasks", taskInfo);
where,
SMOWNERID is the ID of the Owner
SEMODULE can be Accounts or Leads or Cases
SEID is the ID of the Record given in the SEMODULE
CONTACTID is the ID of the contact record