To create the Zoho IoT connection,
Image: Sample connections home page
Else,The available connections (if any) are displayed on the right.
Image: Sample connections home page with configured connections3. Click Create Connection button at the center of the screen or at the top right corner of the screen.
Note: As the scope ZohoIOT.settings.cirrus.data.READ scope that is used to fetch data from the application is not available in any default service, you need to create a Custom Service connection. Refer to the Creating Custom Services document for complete details.
4. Select the Custom Services tab.
5. In the Custom Service tab, click Create New Service.To create a custom connection for this implementation:
5. The Service is created. Click Create Connection in the resultant page.6. Provide the Connection Name and Connection Link Name.
7. Click Create and Connect.
Image: Sample connections configuration screen9. Click Connect.Image: Connections Connect screen10. Once connected, the below screen will be displayed with the sample code.11. The entries from the highlighted code below is used in the deluge custom function code.Important: You will be using the url, type, parameter, and connection entries when writing your logic in the custom function.
Image: Deluge code
To create the ERP Service connection,1. Select the Custom Services tab.
5. In the Custom Services tab, click Create New Service.To create a custom connection for this implementation:
Image: Sample Custom Service creation screen for ERP Connection
4. Provide the Connection Name and Connection Link Name.5. Click Create and Connect. This connection allows Zoho IoT to send or receive data from the ERP system without re-entering credentials each time.
Image: Sample Custom Service creation screen5. The Sample codes are displayed in the resultant connection screen. The highlighted code below is used in the custom function code.Important: You need to modify the url, type, and parameter entries with your values when writing your logic in the custom function.
Image: Connection screen with deluge script
Image: Sample Custom Function code in deluge editor
DpName = "Energy"; DpSource = "Energy Meter 1"; Period = "lastmonth"; // ============================= // Step 2: Define Zoho IoT API and ERP API endpoints // ============================= // Zoho IoT API endpoint to fetch energy readings from the Zoho IoT application iot_api_url = "https://app15414XXXX.zohoiot.in/iot/v1/datapoints/data?datapoint_name=" + DpName + "&source=" + DpSource + "&period=" + Period; info iot_api_url; // (Update to actual API endpoint in your Zoho IoT setup) // ERP API endpoint to send consumption summary erp_api_url = "https://erp.example.com/api/energy/monthly"; // Replace with actual ERP URL // ============================= // Step 3: Fetch device list from IoT // ============================= // Use Zoho Connection for authentication (example connection name: 'zoho_iot_conn') device_response = invokeurl [ url :iot_api_url type :GET connection:"iotconnection" ]; info device_response; erp_url = "https://erp.example.com/receive_data"; device_response = invokeurl [ url :erp_url type :POST connection:"erp_conn" ]; info device_response; |
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.