Title: Business Mashups: Best of the Web APIs Track: New
1Business Mashups Best of the Web APIs
Track New AppExchange Developer
- Ron Hess, salesforce.com
- Jon Jessup, Infopia
- Charlie Wood, Spanning Partners
2Safe Harbor Statement
- Safe harbor statement under the Private
Securities Litigation Reform Act of 1995 This
presentation may contain forward-looking
statements the achievement of which involves
risks, uncertainties and assumptions. If any such
risks or uncertainties materialize or if any of
the assumptions proves incorrect, our results
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 the integration of Sendia
Corporations technology, operations,
infrastructure and personnel with ours
unexpected costs or delays incurred in
integrating Sendia with salesforce.com, which
could adversely affect our operating results and
rate of growth any unknown errors or limitations
in the Sendia technology any third party
intellectual property claims arising from the
Sendia technology customer and partner
acceptance and deployment of the AppExchange and
AppExchange Mobile platforms interruptions or
delays in our service or our Web hosting our new
business model breach of our security measures
possible fluctuations in our operating results
and rate of growth the emerging market in which
we operate our relatively limited operating
history our ability to hire, retain and motivate
our employees and manage our growth competition
our ability to continue to release and gain
customer acceptance of new and improved versions
of our CRM service unanticipated changes in our
effective tax rate fluctuations in the number of
shares outstanding the price of such shares
foreign currency exchange rates and interest
rates. - Further information on these and other factors
that could affect our financial results is
included in the reports on Forms 10-K, 10-Q and
8-K and in other filings we make with the
Securities and Exchange Commission from time to
time, including our Form 10-K for the fiscal year
ended January 31, 2006. These documents are
available on the SEC Filings section of the
Investor Information section of our website at
www.salesforce.com/investor. - 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 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, except as required by
law.
3Business Mashups Best of the Web APIs
Track New AppExchange Developer
Jonathan Jessup
Development Manager
4Infopia Introduction
- Leader in On-demand eCommerce Solutions
- The industrys most complete on-demand eCommerce
solution suite for online merchants - Marketplace Manager
INDUSTRY eCommerce
EMPLOYEES 43
GEOGRAPHY Global
USERS 350
PRODUCTS USED Oracle On-Demand, Salesforce.
5Multichannel Selling Means Multi-Mashup
- Infopia utilizes APIs from many partners to
deliver a complete Inventory to Cash solution
6Transforming eCommerce Transactions into
Relationships
- The Challenge Taking my Business to eBay
- Businesses looking to take advantage of eBay
marketplace - Required resources to making this a viable
business channel - Keeping this channel in sync with their
traditional direct sales efforts. - The Solution Infopia, salesforce.com, eBay
- Extend the sales reach to the vast eBay online
marketplace in a cost effective manner - Optimize customer service by maintaining the
complete 360-degree customer visibility
Analysis/ Decisions
Operations Merchandising
Fulfillment Service
Market Presence
Ecommerce Solution
Online Sales Channels
Analytics
Marketing
Service
Sales
CRM Solution
7Keys to Successful API Integration
- Language-independent implementation (SOAP XML)
- Accessible over standard Internet protocols
(HTTPS) - Clear and unambiguous description language (WSDL
or XSD) - Full development and sandbox environments
- SDK and sample codes
- Developers Network and Support
8eBay API Integration
- API to create, revise and process eBay auctions
- SOAP XML with complete WSDL
- Full development and sandbox environments
- Expansive Developers Network and Support
- eBay API Calls
- com.ebay.sdk.ApiCall
- com.ebay.soap.eBLBaseComponents.ItemType
- com.ebay.soap.eBLBaseComponents.AddItemRequestType
- com.ebay.soap.eBLBaseComponents.ReviseItemRequestT
ype - com.ebay.soap.eBLBaseComponents.GetItemTransaction
sResponseType - com.ebay.soap.eBLBaseComponents.AddMemberMessageRT
QRequestType
9Paypal Integration
- API to process Paypal Payments
- SOAP XML with complete WSDL and SDK
- Full development and sandbox environments
- Expansive Developers Network and Support
- Paypal API Calls
- com.paypal.sdk.services.CallerServices
- com.paypal.soap.api.DoAuthorizationRequestType
- com.paypal.soap.api.DoCaptureRequestType
- com.paypal.soap.api.DoDirectPaymentRequestType
- com.paypal.soap.api.DoExpressCheckoutPaymentReques
tType
10Google Checkout Integration
- Google Payment Processing API
- XML Integration with complete XSD and SDK
- Full development and sandbox environments
- Good technical contacts and support
- Google Checkout API Calls
- com.google.checkout.schema.x2.CheckoutShoppingCart
- com.google.checkout.schema.x2.NewOrderNotification
- com.google.checkout.schema.x2.RiskInformationNotif
ication
11Infopia Web Services API
- Allows clients and partners to integrate with
Infopia - SOAP XML, SSL, WSDL, SDK, Code Examples, etc.
- Secure, client-specific access to Marketplace
Manager data - Create, update, retrieve, and synchronize
- Inventory
- Orders
- Customer data
12Infopia Demo
13Business Mashups Best of the Web APIs
Track New AppExchange Developer
Charlie Wood
Principal
charlie.wood_at_spanningpartners.com
14The Road to Sync Feeds and Calendars
- July 05 Spanning Salesforce
- RSS/Atom feeds for Salesforce and other
AppExchange applications - July 06 Spanning Salesforce for iCal
- Web calendars for Salesforce using the iCalendar
format and webcal// protocol
15Requirement Sync with Google Apps
- Customer Feedback
- Calendar publishing is good
- Two-way sync is better
- Google Apps becoming a viable alternative to
Microsoft Exchange - Technology Challenge
- Differences in protocols, formats, data models
- Transparent operation
- On-demand sync system
- Seamlessly integrates Google Applications with
salesforce.com - Speaks each systems native language
16Spanning Sync for Google and AppExchange
- How did we address the challenges?
- Created a composite AppExchange application
- Exposed the user interface in a custom tab
- Hosted the sync engine on an external server
- Used the AppExchange SOAP API and PHP Toolkit,
and the Google Calendar Data API
17User Perspective
- Salesforce calendar and Google Calendar stay in
sync - Key Requirements
- Simple
- Reliable
- Transparent
- Key Benefits
- Eliminates need to maintainmultiple calendars
- Enables calendar sharing withnon-SFDC users
- Enables integration with numerous third-party PIM
applications
18Developer Perspective Components
19Developer Perspective Process Flow
20Developer Perspective The Google Bits
- Login to Google
- Get updated and deleted events
- Create/update events
- Delete events
21GData The Google Data API
- The API for Google Applications
- Google Calendar
- Blogger
- Google Base
- Format
- Atom 1.0 plus custom namespace extensions
- Kinds for specific data types (e.g., calendar
events) - Protocol
- Atom for reading
- Atom Publishing Protocol for writing
- OpenSearch for queries
- Custom authentication for login to Google
accounts - Custom versioning for conflict detection
22Login to Google Calendar
- ClientLogin (for installed apps), not AuthSub
(for web apps) - HTTPS POST login request
- Handle responses from Google
- success (HTTP 200)
- failure (HTTP 403)
- invalid request
- CAPTCHA challenge
- Success response includes an authentication
token, required for all subsequent requests
23Get Updated and Deleted Events Using GData
- Queries are expressed an HTTP URIs
- http//www.google.com/calendar/feeds/default/priva
te/full?gsessionidt1tdeGVYHL0updated-min2006-10
-08T090000-0700max-results1000 - Queries return an Atom feed with data in elements
from two custom XML namespace extensions (gd
and gCal) - ...
- ltgCalsendEventNotifications value"true"/gt
- ltgdrecurrencegtDTSTARTVALUEDATE20060818
DTENDVALUEDATE20060819 RRULEFREQDAILYINTERVA
L1UNTIL20060823WKSTSUlt/gdrecurrencegt - ltgdeventStatus value"http//schemas.google.com/g
/2005event.confirmed"/gt - ltgdtransparency value"http//schemas.google.com/
g/2005event.opaque"/gt - ltgdreminder minutes"10"/gt
- ...
- Updates and Deletes are returned together, with
deletes denoted by their status - ltgdeventStatus value"http//schemas.google.com/g
/2005event.canceled"/gt
24Create and Update Events Using GData
- Specify the event using the GData format
- lt?xml version"1.0"?gt
- ltentry xmlns"http//www.w3.org/2005/Atom"
xmlnsopenSearch"http//a9.com/-/spec/opensearchr
ss/1.0/" xmlnsgd"http//schemas.google.com/g/200
5" xmlnsgCal"http//schemas.google.com/gCal/2005
"gt - ltidgthttp//www.google.com/calendar/feeds/defaul
t/private/full/73st11emr9vunnde9sb2ggnsuglt/idgt - ltcategory scheme"http//schemas.google.com/g/
2005kind" term"http//schemas.google.com/g/2005
event"/gt - lttitle type"text"gtDreamforce
Prepartylt/titlegt - ltcontent type"text"gtDonapost stay out too
late!lt/contentgt - lt/contentgt
- ltgdtransparency value"http//schemas.google.
com/g/2005event.opaque"/gt - ltgdvisibility value"http//schemas.google.co
m/g/2005event.default"/gt - ltgdeventStatus value"http//schemas.google.c
om/g/2005event.confirmed"/gt - ltgdwhen startTime"2006-10-08T210000.000-07
00" endTime"2006-10-00T000000.000-0700"gt - ltgdreminder minutes"15"/gt
- lt/gdwhengt
- lt/entrygt
- To create a new event, use HTTP POST to the
feeds URI - To update an event, use HTTP PUT to the events
URI
25Delete Events Using GData
- To delete an event, use HTTP DELETE with the
events URI - lt?php
- header "Authorization GoogleLogin
auth".this-gtauthToken - header "X-HTTP-Method-Override DELETE"
- ch curl_init()
- curl_setopt(ch, CURLOPT_HTTPHEADER, header)
- curl_setopt(ch, CURLOPT_URL,
theEventURI."?gsessionid".this-gtsessionID) - curl_setopt(ch, CURLOPT_HEADER, 1)
- curl_setopt(ch, CURLOPT_RETURNTRANSFER, 1)
- curl_setopt(ch, CURLOPT_POST, 1)
- tmp curl_exec(ch)
- curl_close(ch)
- ?gt
26GData Optimistic Concurrency (Versioning)
- Motivation
- To prevent one client from overwriting anothers
changes - Implementation
- A version ID is appended to every GData entrys
URI - http//www.google.com/calendar/feeds/default/priva
te/full/k28lgd7n9jgbi220cv4fe5to04/63293840053 - When a PUT or DELETE is performed, the version in
the request is compared to the version of the
existing entry - If the versions dont match, Google responds
withHTTP 409 Conflict - Beta
- This is still a work in progress
27Lessons Learned
- Developing for GData feels like developing for
AppExchange - No software to install, no biz dev meetings to
attend - Develop using your language and tools of choice
- Google Calendar Data API is still in beta
- Only some data types supported (e.g., no contacts
or tasks) - Optimistic concurrency versioning system still
in development - Format and protocol docs dont yet always match
behavior - No scripting-level toolkits available yet, so
youll be writing Java, C, or raw HTTP requests - AppExchange Google mashups can be incredibly
powerful and relatively simple to create
28For More Information
- Google Data APIs (Beta) Developers Guide
- http//code.google.com/apis/gdata/overview.html
- Using the Google Calendar Data API
- http//code.google.com/apis/gdata/calendar.html
- Google Account Authentication
- http//code.google.com/apis/accounts/Authenticatio
n.html - Google Groups Google Calendar Data API
- http//groups.google.com/group/google-calendar-hel
p-dataapi - Moonwatcher (My Blog)
- http//globelogger.com/moonwatcher
29QUESTION ANSWER SESSION
Ron Hess
Salesforce.com
Developer Marketing
Charlie Wood
Spanning Partners
Principal
Jonathan Jessup
Jonathan Jessup
Development Manager
30Session FeedbackLet us know how were doing!
Session ID 234
Save time! Use your cell phone or mobile device
to send Feedback via SMS/Text Messaging!
- Please score the session from 5 to 1
(5excellent,1needs improvement) on the
following categories - Overall rating of the session
- Quality of content
- Strength of presentation delivery
- Relevance of the session to your organization
Send a message to 26335
In the message body Session 234,
Session ID
Scores for 4 categories
For example, Session 123, 5555
SMS Voting powered by
31Login Sample Code (Part 1 of 3)
- lt?php
- function authenticate(gcUname, gcPword,
loginToken, loginCaptcha) - header "Content-type application/x-www-f
orm-urlencoded" - postFields "AccountTypeHOSTED_OR_GOOGLEEm
ail".urlencode(gcUname)."Passwd" - postFields . urlencode(gcPword)."sourceSp
anning-AppExSync-1servicecl" - if(strlen(loginToken) strlen(loginCaptcha
)) - postFields . "logintoken".loginToken.
"logincaptcha".loginCaptcha -
-
- ch curl_init("https//www.google.com/accoun
ts/ClientLogin") - curl_setopt(ch, CURLOPT_HTTPHEADER,
header) - curl_setopt(ch, CURLOPT_HEADER, 1)
// include the header in the output - curl_setopt(ch, CURLOPT_RETURNTRANSFER, 1)
// store the output in a variable - curl_setopt(ch, CURLOPT_POST, 1)
- curl_setopt(ch, CURLOPT_POSTFIELDS,
postFields) - tmp curl_exec(ch)
- curl_close(ch)
32Login Sample Code (Part 2 of 3)
- // extract authorization token
- ret theResponse"body"
- if(ereg("Auth(.)\n",ret,regs))
- this-gtauthToken regs1 //
authenticaion token - else
- failWithError("Authorization token not
found in response from Google Calendar.\n") -
-
- // make subsequent (authenticated) request to
Calendar - ch curl_init("http//www.google.com/calenda
r/feeds/default/private/full") - unset(header)
- header "Authorization GoogleLogin
auth".this-gtauthToken - header "Content-type application/atomxm
l" - curl_setopt(ch, CURLOPT_HTTPHEADER,
header) - curl_setopt(ch, CURLOPT_HEADER, 1)
// include the header in the output - curl_setopt(ch, CURLOPT_RETURNTRANSFER, 1)
// store the output in a variable - curl_setopt(ch, CURLOPT_POST, 1)
- curl_setopt(ch, CURLOPT_FOLLOWLOCATION, 0)
// DON'T follow the (expected) redirect - tmp curl_exec(ch)
33Login Sample Code (Part 3 of 3)
- // extract session id
- ret theResponse"header""Location"
- if(ereg("(\?).gsessionid(.)\n",ret,re
gs)) - this-gtsessionID regs2 //
authentication token - this-gtfeedURL regs1 // feed
URL - else
- failWithError("Session ID not found in
response from Google Calendar.") -
-
- debug("Connected to Google and
authenticated.") -
- ?gt