For centuries, Egyptian documents were a mystery because no-one could decipher the meaning of the hieroglyphs. The Rosetta Stone helped to finally crack the code as it had the same message carved on a tablet in Egyptian, Greek and Demotic making it possible to understand what the hieroglyphs meant. And with this insight, scientists and historians could make sense of thousands of Egyptian documents and maps. Suddenly a pile of data became information!
What does all this have to do with IoT ? Just like Egyptian hieroglyphs, sensor data has little value until it can be interpreted with business context and converted into useful information. For example, sensor data may indicate that a water pump needs servicing, but without the details on the customer, the water pump model, location and warranty details, it’s impossible to schedule a service call to fix the pump.
Salesforce which stores customer and product data can help convert sensor data into actionable business information. And in that sense, Salesforce is like the Rosetta Stone for IoT.
There are three considerations to consider while converting data to insight :
- Volume of Sensor Data - Sensors are continuously generating a huge data stream of information, but only a small percentage of that needs to be acted upon. How do you tame this flood of data to isolate the part that needs to be acted upon?
- Security - How do ensure that only authorized IoT applications are allowed to access confidential customer and product data from Salesforce ?
- Performance - Having thousands of queries for customer data from Salesforce can degrade performance. How do you make sure that queries for customer and product details are performed only when really needed?
The temperature of the motor is first extracted from the incoming sensor data stream and only those readings above the defined temperature are processed further. Next we check if details on the motor (based on its Sensor ID ) are already available from having been looked up earlier. If available, those machine details from cache are used, avoiding a query against Salesforce. For the queries where the temperature of the motor is above the safe limit and the customer and motor details are not known already, we query Salesforce.
We wrote a java application that performs this automated query against Salesforce using a customized WSDL (Web Services Description Language) to retrieve customer and motor information. The results of this query are also stored in cache to be reused in case the same Sensor ID is being used for another query. A Certificate helps ensure that only authorized queries are granted access to customer information. More details on creating Salesforce WSDLs are availablehere and a copy of the Skilled Analysts WSDL code is available freely here.
Note that the customer record is configured for ‘Bulk API access’ to support this IoT Application.
Create a JAR file to let a java application programmatically access Salesforce.
So whether you’re trying to understand Egyptian antiquities or a stream of IoT sensor data, the principle is the same - you first have to be able to interpret data and put it into context. Perhaps Salesforce is the 'Rosetta Stone' for your next IoT application!
Skilled Analysts is a San Francisco based consulting firm that helps clients quickly develop their IoT proof-of-concepts with industry leading IoT platforms and sensors integrated with enterprise systems such as Salesforce.