Push data to Zoho CRM

Zoho Creator can push Form data to Zoho CRM. Below example steps (and explanation) tell you how to add a CRM lead from Zoho Creator Form. Note that there is no need here for the ZSC Key or the Zoho API/Ticket. They are all handled by Zoho Creator deluge task. 


1. Create a Lead Form in Zoho Creator:

Create a Zoho Creator Form with the following fields. (See https://help.creator.zoho.com/By-adding-new-forms.html  )
  1. Company Name (field type - Single Line)
  2. Name (field type -  Single Line)
  3. Telephone (field type -   Single Line)
  4. Email Address (field type -   Email)
2. Write the script:

Go to the On Add ->On Success
section of the above Form and navigate to Free flow script builder
.

    2.1. Create the CRM vs Creator fields map:

      It is important to set up the field mapping for the Zoho Creator system to push data to the right fields on the CRM module. Sample below. Final script is given at the end of the article.
                
         //create a map variable

         myFieldMap = map();
         //add values to the map. CRM fields first and then Creator fields (
without the quotes
). Creator field’s deluge name
is used here.
         myFieldMap.put(“Company”, Company_Name);
         //note that in the above line, Company is the CRM field and Company_Name is the Creator field
         myFieldMap.put(“Last Name”, Name);
         myFieldMap.put(“Phone”, Telephone);
         myFieldMap.put(“Email”, Email_Address);

   2.2. Write the function to push data to CRM:
                
      The syntax of the function that pushes data to CRM from Creator looks like below. 

                  response = zoho.crm.create(
CRM Module Name
, Fields map
);


   2.2.1 Function explanation:

         1. zoho.crm.create() is the function that tells Zoho Creator system to add new record in CRM. 
         2. CRM Module Name and the Fields map (refer section 2.1) are passed to the function to make sure the right record is added to the right module.
         3. response stores the result of the action (success or failure with the record ID of the CRM module).

    2.2.2 Example script (continued)

      According to our example, the below script should be written at the end of the script given at (section 2.1).

            response = zoho.crm.create(“Leads”, myFieldMap);

So the final script will be 

         myFieldMap = map();
         myFieldMap.put(“Company”, Company_Name);
         myFieldMap.put(“Last Name”, Name);
         myFieldMap.put(“Phone”, Telephone);
         myFieldMap.put(“Email”, Email_Address);

         response = zoho.crm.create(“Leads”, myFieldMap);


Click on Save Script.

Submit data on your Creator Form and check the lead in CRM.

Note
: This article captures only 4 basic fields from CRM Leads module. You can use other fields in the same method too.
This entry was posted in crm.