Integrating Cumulocity with webMethods.io provides a host of opportunities to integrate and share device data with other systems and applications. WebMethods.io has an out-of-the-box Cumulocity IoT connector which can be used as a trigger or as a building block inside the workflow.
Use case 1: trigger a workflow on a Cumulocity IoT alarm
Trigger creation and configuration
Workflows can be triggered on notifications generated by Cumulocity IoT. Notifications can be either Alarms, Events, Measurements or Inventory changes.
For a detailed description of the creation of a Cumulocity IoT trigger, please refer to the article Create a Cumulocity IoT trigger
One of the most popular integration use case is to react to an alarm. This can be easily achieved in a few steps.
In a new workflow click on the start block, select the Cumulocity connector, choose trigger on an alarm, enter your Cumulocity IoT tenant and credentials and enter the device id. You can alternatively enter the id of a group of devices or select all devices.
Creation of a workflow action
The next step would be to create an action that will be executed when an alarm in Cumulocity IoT occurs. The action could be to raise a ticket in Zendesk, post to a Slack or MSTeams channel or send a simple email
The resulting email could look as follows:
Use case 2: add a new device to Cumulocity IoT
We can also use webMethods.io to easily add new devices to Cumulocity via webhook.
For a detailed description of the creation of a Cumulocity IoT connector, please refer to the article Create a Cumulocity IoT Connector
For this scenario, the trigger for the workflow would be a webhook with input parameters such as device name, serial number, location, etc. This can be connected to a cumulocity block with an inventory action “CreateManagedObject”. We then issue a notification via email with the Cumulocity device id of the newly added device. The workflow could look as follows:
To execute the webhook simply copy the Webhook URL add the input parameters and send the request. The webhook supports basic and oauth authorization.
Use case 3: batch registration of new devices
Another integration use case would be to batch provision devices from a list. The source of the data can be Google Sheets, Excel Online, Salesforce or many others. In the example below, we use google sheets to read a list of devices, register them in Cumulocity and document the results including the new device ids.
As the workflow is executed, the Google Sheets document is read and the loop element reads each row, registers a device (operation CreateNewDeviceRequest) and documents the result.
This is only a tiny insight into the many integration opportunities between webMethods.io and Cumulocity IoT. It is also worth noting that even if there is no ready-made connector available for a certain use case, users can use webmethods.io to create their own connectors.