Cloud to Cloud Integrations with Force.com Sandeep Bhanot Developer Evangelist @cloudysan
Safe Harbor Salesforce.com Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forwardlooking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, 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 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, 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 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 non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our quarterly report on Form 10-Q for the fiscal year ended October 31, 2009 and our other filings. These documents 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 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. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Your One Stop Shop for Summer 11 Got Twitter? @forcedotcom / #forcewebinar LinkedIn? Developer Force Group http://developer.force.com/releases Demos Webinar Replay Release Notes Documentation Training Facebook? facebook.com/forcedotcom Highlights Discussion Join the conversation using #summer11 http://boards.developerforce.com/sforce/
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Force.com - common integration scenarios
Force.com integration options Apex Data Loader Mobile External Apps Data ETL Callouts REST API Chatter REST API (Pilot) Toolkits SOAP API Bulk API Apex Email Svcs (Inbound) Apex Web Svcs Toolkits SOAP & Bulk API Apex Callouts Outbound Msgs Apex Email (Outbound) Sites RSS Feeds Force.com Platform
Cloud to Cloud integrations In many ways, Cloud-to-Cloud integrations are no different than other integrations. But, they have some unique characteristics. Cloud-to-Cloud RESTful OAuth authentication JSON No Middleware Social data No network/infrastructure reqs Other SOAP/WSDL Username/pwd XML Middleware (often) Business /transactional data Network/Infrastructure reqs
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Outbound integrations Apex Callouts Force.com toolkits Outbound Messaging Apex Email (Outbound)
Apex Callouts Use Apex to invoke a WSDL/SOAP or REST service Oracle Web Service Apex class or trigger initiates the callout Apex Client Legacy Web Service Provider REST API Legacy Systems Google Web Service
Demo Apex callout to LinkedIn 1. Use OAuth Apex client to authenticate with LinkedIn 2. Store OAuth token in Salesforce 3. User updates their Chatter status with #linkedin hashtag 4. Invoke LinkedIn REST API to update User s LinkedIn Status Apex HTTP callout
Apex Callouts Important Considerations Apex can invoke a WSDL/SOAP or REST service Remember Governor Limits Payload size limit 3MB # of Callouts in a transaction 10 Maximum timeout for all callouts 120 sec Callouts from Triggers have to be made asynchronously (using @future) Any DML operations have to be performed after the callout Writing test classes for external callouts requires special considerations Use JSON Code Share project to parse JSON data Native JSON support in Apex actively being worked on (Safe Harbor applies) Remember to add service URL to Remote Site Settings
Apex Callouts and security Apex Callouts supports two-way SSL (aka client side certificates) Can also set custom HTTP security headers Use the OAuth Playground Code Share project for client side OAuth 1.0a
Toolkits for Outbound Integrations Native Force.com (Apex/Visualforce) wrappers for Google Data APIs Amazon Web Services Facebook (Beta) Twitter And. Salesforce for Twitter and Facebook (and other AppExchange packages)
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Inbound integrations Force.com APIs SOAP, REST, Chatter REST (Pilot), Bulk Apex Web Services SOAP, REST (Pilot) Force.com toolkits
There is an API for that Scenario Thousands to millions of records Synchronous processing required REST/JSON preferred Lightweight client library preferred/required Process Chatter data Hundreds of millions of records Async. processing ok SOAP API REST API API Chatter REST API (Pilot) Bulk API Most commonly used for Cloud-2- Cloud integrations
Apex Web Services Expose custom Apex logic as SOAP and/or RESTful (Pilot in Summer 11) services Use Apex Web Services to implement custom business logic (e.g. transactions) or expose a customized service interface
Toolkits for Inbound Integrations Platform/Language native wrappers of the SOAP API for Ruby (Heroku) PHP (AWS, PHP Fog etc.) Windows Azure Google App Engine
Inbound Integration sample Facebook PHP App querying Jobs data from Force.com
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Hybrid integrations Integration typically initiated by an outbound call from Force.com External cloud application then makes a callback to retrieve/update Force.com data
Demo PDF merge in Google App Engine 1. Invoke GAE service with Record Ids to merge 2. Authenticate with Force.com using OAuth 3. Retrieve PDF Attachments (Force.com REST API) 4. Perform PDF Merge 5. Insert merged PDF as Attachment record ( Force.com REST API)
Today s Agenda Cloud to Cloud integrations with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
UI Integration LinkedIn widget embedded in Visualforce. A public Force.com Sites page shown in Facebook.
Today s Agenda Cloud to Cloud integration with Force.com Cloud to Cloud Integration patterns Outbound Demo - Integrating with LinkedIn Inbound Hybrid Demo - Integrating with Google App Engine UI Integration Q & A
Upcoming webinar Do not forget! Sign up for the live webinar for the Database.com Sneak Preview http://bit.ly/databasedotcom_webinar
Please Complete Survey http://bit.ly/cloud2cloudintegrations10am
Additional Resources Integration resources: http://wiki.developerforce.com/index.php/integration Integration Recipes http://developer.force.com/cookbook/category/integration/recent Force.com Toolkits: http://wiki.developerforce.com/index.php/tools Force.com API documentation http://wiki.developerforce.com/index.php/documentation#api Apex testing webinar recording (testing Apex callouts) http://wiki.developerforce.com/index.php/webinar:_apex_code:_testing_and_code_coverage JSON Code Share library http://developer.force.com/codeshare/projectpage?id=a0630000002ahp4aaa OAuth 1.0 Apex client Code Share library http://developer.force.com/codeshare/projectpage?id=a0630000008mqymaa4