// ================================================ // 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; |
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.