Sending Details from Zoho Creator

Sending Details from Zoho Creator


This sample implementation helps to understand sending data to the Zoho IoT Application from Zoho Creator with step-by-step procedures.

Scenario   

Zylker Generators, a leading manufacturer of diesel generators, uses two connected Zoho applications “Zylker Sales Manager” (built on Zoho Creator) and “Zylker Generator Monitor” (built on Zoho IoT).

Whenever a new generator is sold, the sales team records the sale in the Zylker Sales Manager application. The creator form captures key details such as the generator model, buyer information, and assigned service engineer.

Once submitted, this data is automatically sent from the Zylker Sales Manager application to the Zylker Generator Monitor application in Zoho IoT. The integration creates a corresponding asset in the IoT application, enabling real-time monitoring and tracking of the generator’s performance and operational status.

This seamless data flow helps Zylker maintain complete visibility from the point of sale to ongoing equipment performance ensuring proactive service and better customer satisfaction.

Prerequisites 

Before starting the integration between Zylker Sales Manager (Creator) and Zylker Generator Monitor (IoT), make sure the following basic setups, access, and configurations are in place.

Accounts and Access

  1. Active Zoho Creator and Zoho IoT accounts with valid licenses.
  2. Necessary permissions to access, create, or modify applications in both platforms.

Zoho Creator – Zylker Sales Manager

  1. A Zoho Creator application named Zylker Sales Manager is available.
  2. The app includes a Sales Form to record generator sales, capturing details such as:
  3. Generator model and serial number
    1. Buyer name and email
    2. Assigned service engineer name and email
    3. Sale or installation date

Zoho IoT – Zylker Generator Monitor

  1. A Zoho IoT application named Zylker Generator Monitor is created.
  2. A Diesel Generator device model exists with key telemetry datapoints such as:
    1. Fuel Level
    2. Temperature
    3. Voltage
    4. and other parameters relevant to generator performance monitoring.
  1. The device model includes custom fields for storing:
    1. Buyer Email ID
    2. Service Engineer Email ID

  2. Alarm rule(s) configured to send email notifications to buyer when fuel level (or other datapoints) reach critical thresholds.
 

Implementation    

Once these prerequisites are in place, you’ll be ready to configure the integration. The high-level steps involved in the Zylker Sales Manager - Creator Application for the implementation are :
  1. Configure Connections - To run API calls inside a custom function, a connection in  Zylker Sales Manager is required to authenticate the respective APIs.
  2. Configure Workflow - To send the captured details to Zylker Generator Monitor via a Custom Function, authenticated through a Zoho IoT connection.   


Procedure  

The following provides a step-by-step procedure of the implementation.

Step 1: Configure Connections  

Create a connection in Zylker Sales Manager (Creator) for Zylker Generator Monitor (IoT) to authenticate when calling the Zoho IoT API.

To create the IoT Connection,
  1. Access Zylker Sales Manager (Creator application).
  2. Select MIcroservices under DEVELOP in the left menu.
  3. Select the Connections tab, and click Create New or Add Connection.



  4. In the Add Connection screen, select Zoho IOT service.



  5. Provide the Connection details, and click the Create and Authorize button. (You can also select Only Specific Action radio button to select required options.)



    If the required action/scope is not available under the selected Zoho IoT connection, you can create a custom service and create a connection for this service. Please refer to the deluge custom service document for more details. 

  6. Provide your application name as the subdomain, and click Authorize. For example if your application url is "dgmonitoring.zylker.com", provide "dgmonitoring" as your subdomain.



  7. Verify the access permission list, select the "I allow Zoho Creator - Zoho IOT Integration to access the above data from my Zoho account" check box, and click Accept.



  8. The connection is created and displayed in the Connections home page.



  9. Click on the Connection to view the details. You can copy the connection name (link name) from this screen. 



Step 2: Create Workflow  

Create a Workflow in Zylker Sales Manager (Creator) to trigger the workflow action when the details are added through the Creator form.
  1. Select the Workflow tab on top, and select Create Workflow to create a new workflow.



  2. Provide the form and action detail in the workflow



    Image: Sample creator workflow configuration

  3. In the workflow action, call a custom function (Deluge Script).



  4. In the custom function script, include the following:
    1. Use the Zoho IoT POST API.
    2. Use the Zoho IoT connection created in Zylker Sales Manager (Creator).
    3. Send the captured generator details to Zoho IoT for device creation.


Step 3: Write Custom Function Script

Sample code below for sending the Form details to Zoho IoT
 
// ================================================
// Step 1: Setup basic variables from Creator Form
// ================================================
gen_name = input.Generator_ID;
spEmail = input.Service_Personnel_Email;
buyEmail = input.Buyer_Email;

// ================================================
// Step 2: Construct the Payload for device creation API (POST) with form inputs
// ================================================
payload = Map();
devices = Map();
devices.put("record_image","tgfa302b7b57d621c40f8b07cf5eb3ec73fcd");
devices.put("name",gen_name);
devices.put("Service_Personnel_Email",spEmail);
devices.put("Buyer_Email",buyEmail);
device_type = Map();
device_type.put("id","gateway");
device_type.put("name","Gateway");
devices.put("device_type",device_type);
connectivity_type = Map();
connectivity_type.put("id","mqtt");
connectivity_type.put("name","MQTT");
devices.put("connectivity_type",connectivity_type);
device_application = Map();
device_application.put("id","custom_app");
device_application.put("name","Custom Application");
devices.put("device_application",device_application);
authentication_security = Map();
authentication_security.put("display_value","Security Token with TLS");
devices.put("authentication_security",authentication_security);
devices.put("data_interval_time","15");
devices.put("edge_name","");
product_id = Map();
product_id.put("id","5144000000283160");
product_id.put("name","Product 1");
devices.put("product_id",product_id);
devices.put("model_id","5144000000283162");
payload.put("devices",devices);

// ================================================
// Step 3: Calling the Zoho IoT's POST API
// ================================================
device_creation_response = invokeurl
[
type :POST
parameters:payload.toText()
connection:"zoho_iot_connection"
];
//replace header with connection: "zoho_iot_connection" where zoho_iot_connection is the connection name
info device_creation_response;
 
 
 
The above custom function pushes the data from Zylker Sales Manager (Creator) to Zylker Generator Monitor (IoT).
 

Conclusion

This implementation ensures seamless data flow between Zoho Creator and Zoho IoT, enabling real-time monitoring, automated alerts, and efficient post-sale support for customers.
Using this same procedure you can integrate other Zoho Apps and send data to Zoho IoT for processing.
 
See Also