For the last 15 years, the Salesforce API has allowed customers to develop applications against the Salesforce data model. Through the use of the SOAP, REST Bulk, Streaming and Generic Streaming APIs, our developers make more than 1 billion API calls per day. With the Summer ‘15 release we are focusing on delivering tools and APIs to reach an even broader community, and provide performance improvements to new and existing applications.
Intended Audience
Admins (for Data Loader for Mac) and existing and new Salesforce developers
3. #forcewebinar
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 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 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 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 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.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
4. #forcewebinar
Go Social!
Salesforce Developers
+Salesforce Developers
Salesforce Developers
Salesforce Developers The video will be posted to
YouTube & the webinar recap
page (same URL as registration).
This webinar is being recorded!
@salesforcedevs / #forcewebinar
5. #forcewebinar
▪ Don’t wait until the end to ask your question!
– Technical support will answer questions starting now.
▪ Respect Q&A etiquette
– Please don’t repeat questions. The support team is working
their way down the queue.
▪ Stick around for live Q&A at the end
– Speakers will tackle more questions at the end, time-
allowing.
▪ Head to Developer Forums
– More questions? Visit developer.salesforce.com/forums
Have Questions?
6. #forcewebinar
Agenda
1. What is the Enterprise API
2. Data Loader for Mac
3. What is a Composite API?
4. Batching REST API Resources
5. TreeSave API (Pilot)
7. #forcewebinar
What is the Enterprise API?
Enterprise API consists of our “Data” APIs
– SOAP API
– REST API
– Bulk API
– Streaming and Generic Streaming API
A few extra odds and ends
– Data Loader
– Outbound Messaging
– Ajax Toolkit
– Replication API
8. #forcewebinar
Data Loader for Mac
Data Loader is a client tool to
load and extract data through
the Partner API
– SOAP API
Mac support one of the largest
Ideas on
success.salesforce.com
– 16K points to date
– Prior to Summer ‘15, only
Windows support
10. #forcewebinar
What is a Composite API?
An API that is built by combining existing API functions
– A single request to an API can perform multiple functions
Orchestration of the composite APIs allow developer
controlled business logic and functionality
– Responses from one API method can be directed as inputs into
another method
– Multiple APIs can be used in a single call to improve performance
Compositions are key for designing efficient API for use in
mobile development
11. #forcewebinar
Batching REST Resource
Resource which accepts multiple REST calls to execute
– A single Batch REST request can execute up to 25 sub-requests
• Sub-requests contains the resource (URI) and the method to execute
• Each sub-request is an unrelated API call
• Sub-requests are executed serially, in order, and as the running user
• As each sub-request completes, the call is committed
– The haltOnError attribute indicates if the batch should stop on any
error that is encountered
– The response will be a JSON object of responses from the sub
requests
12. #forcewebinar
Example Batch Request
{"batchRequests" : [
{"method" : "POST",
"url" : "v34.0/sobjects/account/",
"richInput" : {"Name" : "NewName", "Industry" : "Tech"}},
{"method" : "GET",
"url" : "v34.0/sobjects/account/describe/"},
{"method" : "GET",
"url" : "v34.0/query?q=select id, name, industry from account order by createddate
desc limit 10 "
}]
}
14. #forcewebinar
Example Unsuccessful Batch Response
{"hasErrors" : true,
"results" : [{
"result" : [{"message" : "Required fields are missing: [Name]”,"errorCode" : "REQUIRED_FIELD_MISSING",
"fields" : [ "Name" ]}],
"statusCode" : 400
},{
"result”:[{"message”:"Cannot access this resource in a batch request”,"errorCode”: "INVALID_BATCH_REQUEST”}],
"statusCode" : 400
},{
"result" : [{
"message" : "nselect ids, name, industry from accountn ^nERROR at Row:1:Column:8nNo such column 'ids' on entity
'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your
WSDL or the describe call for the appropriate names.”, "errorCode" : "INVALID_FIELD"
}],
"statusCode" : 400
}]
}
16. #forcewebinar
TreeSave REST Resource
Creates SObject trees with the same top level object type
– A recursive data structure that contains a root record, its data, and its
child records represented as other sObject trees
– The REST resource manages all of the ID creations and mapping
• Create an Account, Contact, Opportunity, and Note in a single call
The request can contain the following:
– Up to a total of 200 records across all trees
– Up to five records of different types
– SObject trees up to five levels deep
• You can create 200 top level records, by only providing the top level
– IE – Create 200 Accounts in a single REST call
17. #forcewebinar
TreeSave REST Resource Usage
The Developer provides the record relations via a reference
ID
– ReferenceId is used to link related records and to return errors
Only Insert is supported
Triggers, processes, and workflow rules fire separately for
each of the object levels
– EX – All triggers fire for all the top level records, then all fire for the
second level records, then third, etc…
All records are rolled back on any error
– Error will indicate which referenceId had the error so that the
developer can take the appropriate action
22. #forcewebinar
Building towards a Composite API on Salesforce
There are a number of existing Composite resources
– Apex REST can be used to build custom logic
• Requires complete design by the developer
– The Batching REST resource allows for the sending of multiple
REST calls in a single round trip
• The calls are unrelated, simply reduces round trips
– The TreeSave REST resource allows creation of multiple
records in a single call
• Limited to insert and all-or-none saves
Additional resources will be added moving forward
25. #forcewebinar
New York City
June 18, 2015
Join us in the Developer Zone
Salesforce World Tour
Register here: http://bit.ly/SWTNYCreg
26. Join us at the
Developer Workshop
Register early, seating is limited!
http://bit.ly/DevDaysWorkshop
June 9, 2015
Toronto, Canada
June 25, 2015
San Francisco, CA