Control your world using the Salesforce1 Platform (IoT)

  • View

  • Download

Embed Size (px)


It's easy to control your office lights, heat, and much more using the Salesforce1 Platform. Our Chief IT Architect at Internet Creations, Chris Ferraro, shows you how to fire a workflow rule based on the temperature, control lights from your mobile phone, and a whole lot more using great DIY technologies like the Arduino and Raspberry Pi.

Text of Control your world using the Salesforce1 Platform (IoT)

  • 1. Control Your World Using the Salesforce1 Platform (IoT) Chris Ferraro Chief IT Architect @chrisf_59
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include but are not limited to risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available., inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Chris Ferraro Chief IT Architect
  • 4. About Internet Creations Salesforce Consulting & AppExchange Apps Member of the Cloud Collective: AppExchange Category Leaders #1 Rated App for Agent Productivity Internet Creations Labs We balance work with the passion for learning. Technical staff are encouraged to spend up to 20% of their time on developing and pursuing their own creative ideas.
  • 5. Agenda - The Internet of Things & Salesforce1 - Platform APIs - Project: Controlling Christmas Lights using HTTP Class - Project: Flash lights upon new P1 Case using workflow & IFTTT (Live Demo) - Project: Temperature Monitoring using REST API (Live Demo) - Questions & Comments
  • 6. Internet of Things Interconnected things using low cost (usually) networkable devices Connect smart devices/physical objects/sensors Connecting devices to the Internet allows automation of anything from anywhere
  • 7. Salesforce1 Salesforce1 Platform (, Heroku, and ExactTarget Fuel) Salesforce1 Mobile App
  • 8. Platform API: Salesforce Web Services Did you know? Common Uses Integrate external systems Load records with Dataloader Connect with IoT devices 60% of Salesforce transactions are API calls
  • 9. Platform API: Salesforce Web Services Outbound HTTP Class WSDL2Apex Outbound messaging Streaming API Inbound SOAP API REST API Custom web services
  • 10. Platform API: Salesforce Web Services Type HTTP Classes WSDL2Apex Advantages Highly customizable, request and response can be formatted in any way. Auto-generates Apex code to interact with a SOAP based web service Uses Callouts to simple or complex external systems. Custom parsing logic for all types of responses including XML, JSON, and Custom formats. Integration with external systems Outbound
  • 11. Platform API: Salesforce Web Services Type Outbound Messaging Streaming API Advantages Triggered by workflow, automatic retries guarantee delivery No need to poll for data, application is notified of changes Uses Integration with middleware applications Use in lieu of polling for record changes Outbound (continued)
  • 12. Platform API: Salesforce Web Services Type SOAP API REST API Custom Web Services Advantages Structured access to Salesforce data Simplified access to Salesforce data Implement custom logic Uses External applications that interact with SF data Mobile applications, external web sites that pull data Exposing complex custom business logic to external apps Inbound
  • 13. HTTP Class for Callouts IoT devices frequently have a REST or JSON based API REST JSON-RPC Invoke callouts to devices using the HTTP class Use @future or the Queueable interface to invoke callouts from a trigger Queueable is new in Winter 15 and allows events to be chained. This can be helpful if you need to contact multiple devices and the actions are dependent. Need to control the local network and open firewall ports inbound from SF
  • 14. Project: Controlling Christmas Lights (HTTP Class)
  • 15. Project: Controlling Christmas Lights (HTTP Class) Configure endpoint under Remote Site Settings Arduino Yun Sainsmart relay board
  • 16. Project: Controlling Christmas Lights (HTTP Class)
  • 17. Project: Controlling Christmas Lights (HTTP Class) public class ChristmasLights { @Future(callout=true) public static void doCallout(string action){ string URL = '' + action + '/go'; Http h = new Http(); HttpRequest req = new HttpRequest(); req.setTimeout(30000); req.setEndpoint(url); req.setMethod('GET'); HttpResponse res = h.send(req); } }
  • 18. Project: Flashing Lights (Workflow & IFTTT) No need to write code Salesforce workflow sends email alert to IFTTT IFTTT Rule Belkin Wemo Switch Light
  • 19. Project: Flashing Lights (Workflow & IFTTT)
  • 20. Inbound data to Salesforce REST API or Custom Web Service Create a Connected App Login to get a session token for use in API calls Custom Web Service exposed on a site Not particularly secure. Anyone could execute the web service!
  • 21. Project: Temperature Monitoring (REST API) Tessel (A microcontroll