Mule ESB can be used in integration of cloud based applications like Salesforce CRM, Mobile Applications along with many more that adds value to your business - the integration possibilities got our team of Mule Experts thinking - what else can we do with Mule ESB and Salesforce?
We decided to try to integrate a mobile through the intelligent Mule iPaaS ESB with the exciting Sphero Robotic Ball through Salesforce!
Fig 1 Sphero in action
The programmable Sphero Robotic Ball is an interesting gadget. It can be programmed and controlled to change colors, positions, control speed, draw squares, turn circles etc. (Checkout:http://www.gosphero.com)
How did we do it?
Equipped with the Sphero and a Salesforce.com account, we have created a mule workflow (Fig 2) to create a lead in Salesforce through an SMS and then trigger a message to Sphero changing its position and colors.
Salesforce has been integrated with a MuleSoft Salesforce Connector. Sphero is paired with a PC over Bluetooth. A dotnet client has been introduced to receive commands from Mule ESB and pass these commands to Sphero over Bluetooth. An intermediate database has been used to manage the state of the workflow and Mule Database Connector has been used to manage all the database operations.
Sphero WIN SDK API has been used to interact with Sphero Ball over Bluetooth. A Windows Store App with a web service client polls for the input commands through Mule and relays it to Sphero through the Sphero API.
Fig 2 Integration Diagram
Here is the code snippet to create a new lead in Salesforce.
Fig 3 Code Snippet
The source code of the demo is available at GITHUB - https://github.com/WHISHWORKS
With this integration through Mule ESB the response time is under a second and we are able to move Sphero at near real time. So if we can do that, imagine what else we can do!
If you would like to find out more about how APIs could help you make the most out of your current infrastructure while enabling you to open your digital horizons, do give us a call at +44 (0)203 475 7980 or email us at email@example.com.
Other useful links: