Web Services API
The Force.com Web Services API provides access to your Force.com data and logic. You can call the Web Services API from a wide variety of client-side languages. All of the functionality built into the Force.com on-demand platform is automatically part of any application that uses the Web Services API. Data validation, workflow, Apex triggers and the Force.com security scheme are just a few of the features that help you to integrate your external application with the Force.com platform.
What's Here
| API | Integration | AJAX | Adobe ColdFusion | |
| Adobe Flex | Java | Mac OS X Cocoa | ||
| .Net and Visual Basic | Perl | PHP | Python | |
| Ruby on Rails | Amazon | S-controls |
API
Official Documentation
Force.com Web Services API Developer's Guide Version 16.0 for Summer '09- HTML | PDF | ZIP | What's New | Samples | Earlier Versions
- Version 15.0 for Spring '09: HTML | PDF | ZIP | What's New
- (Audience: Developers) Reference for the SOAP-based Force.com API.
- HTML | BNF
- (Audience: Developers and Advanced Administrators) Reference and samples for writing SOQL queries.
- HTML
- (Audience: Developers and Advanced Administrators) Reference and samples for writing SOSL queries.
- HTML | PDF | Earlier Versions
- Version 15.0 for Spring '09: HTML | PDF
- (Audience: Developers) Reference for the Metadata API, a means of retrieving and deploying setup information in your organization.
- HTML | PDF
- (Audience: Developers) Reference for the Force.com Migration Tool, a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce organization.
- HTML | PDF | ZIP | Earlier Versions
- Version 15.0 for Spring '09: HTML | PDF | ZIP
- (Audience: Developers) Reference and samples for the AJAX Toolkit, a means of accessing the Force.com API from Javascript.
- HTML | PDF | MSI Install
- (Audience: Developers) Reference and samples for the Office Toolkit, a plug-in for accessing the Force.com Web Services API from within Microsoft Office.
Articles and Presentations
Using the Force.com API: A very detailed series of articles from the O'Reilly Network. Author Tony Stubblebine uses Perl to construct a mashup between Salesforce.com and MovableType blogs, then packages the whole thing up.- Part I: An Introduction to Salesforce.com's AppExchange
- Part II: Using the Force.com API
- Part III: Packaging for Salesforce.com's AppExchange
The Power of Force.com SOA: Demonstration of using Force.com SOA to integrate external data sources in your Force.com applications.
Introduction to the Force.com API: Presentation from Dreamforce 2005.
Apex Day: Creating Next Generation Mash-ups:
Simple Yahoo Maps Mashup: Code for Yahoo Maps mashup example.
Force.com Mashups++: The Latest Platform Features for the Best Composite Apps:
Performance
API Performance Tips: Summary of issues that you should consider to maximize the performance of your API requests and interactions.Performance, Optimization, and Tuning for the API: Presentation on achieving optimal performance from the API.
Compression with Axis 1.3: Using Apache Axis 1.3 compression with the Web Services API.
Single Sign-On and Security
Single Sign-On Implementation Guide- (Audience: Administrators and Professional Developers) Information on configuring Salesforce apps to work with single sign-on solutions.
- (Audience: Administrators and Professional Developers) A comprehensive overview of Force.com platform security features, including Apex and Visualforce coding for avoiding cross-site scripting and SOQL injection attacks.
- Single Sign-On is a process that allows network users to access all authorized network resources without having to separately log in to each resource.
- Implementing single sign-on for Force.com applications.
- Overview of how to use authentication and existing salesforce.com user name/passwords in other applications.
- Coverage of the difference between SAML and the delegated authentication scheme used by the API for LDAP and Active Directory integration
- Notice describing the impending change to SSL support and known causes.
Technical topics
Email To Case: Using the Web Services API to pull information from emails and adding it to cases.Note about Office Toolkit: Notice regarding support for Force.com Office Toolkit.
Using the Salesforce CSS in Your Apps: Instructions for using the Salesforce CSS to mimic our presentation.
Integration
Enterprise Integration Series: The Enterprise Integration series is designed to help you understand the integration capabilities built in the Force.com platform. This series consists of the following presentations -
Overview of Salesforce.com Enterprise Integration: This presentation introduces you to the various methods you can use to integrate the Force.com platform with your existing systems.
Web Services and Force.com SOA: This presentation covers how to expose your Apex Code to the outside world as a Web service, and how to access Web services from the Force.com environment.
Data Loader: This presentation covers the use of the Data Loader tool to move data in and out of the Force.com environment..
Enterprise Integration: Combining the Force.com Platform with Your Architecture: Presentation from Dreamforce '07.
Oracle and MySQL examples: Article on creating matching database tables for Salesforce.com objects in Oracle and MySQL.
AJAX Toolkit
The AJAX Toolkit is a JavaScript wrapper around the Web Services API.
Official Documentation
AJAX Toolkit Developer's Guide Version 16.0 for Summer '09- HTML | PDF | ZIP | Earlier Versions
- Version 15.0 for Spring '09: HTML | PDF | ZIP
- (Audience: Professional Developers) Reference and samples for the AJAX Toolkit, a means of accessing the Force.com API from Javascript.
Articles
Ajax Proxy: Using Force.com SOA to access domains other than salesforce.com.Code samples
Simple AJAX Query- Show me the code! Drop this Sample AJAX into an SControl HTML body, save it and run it from a custom link.AJAX Toolkit + S-control Hello World Example: Basic example of using AJAX in an s-control.
Ajax Tools: This Force.com app provides forty six AJAX Toolkit 8.0 samples and DOJO/UI samples. Install the app into your Developer Edition account to view and run samples.
Yahoo Maps Mashup From Apex Day- Mashup using AJAX and the Web Services API to provide the ability to find contacts in the same City by clicking the Find Nearby link at the bottom of the opportunity list.
Send Emails Through S-Controls: This code example allows you to send emails through the new Email API. You can CC and BCC email addresses, include your email signature, send text or HTML email.
Create a many to many relationship with a multi-select picklist: This code example is an scontrol that uses the AJAX toolkit to insert rows into a joiner table. It does date formatting and accepts user input.
Get Template Folder Names: Instructions for how to decode personal and public folder names, when selecting templates from folders.
Migrating S-Controls to API and AJAX: Moving from s-controls prior to Winter '07 to AJAX code and the Web Services API.
Nitobi: Dave and Andre build an awesome contact manager using AJAX and Adobe AIR, see their article here. There is some very interesting work here with off line features in mind, check it out.
Displaying multiple records with an s-control
Using special characters
Adobe ColdFusion
Basic Web2Lead Implementation
Adobe Flex
Flex Toolkit: Everything you need to use Flex with the Web Services API.Building Rich Internet Apps for Businesses:
Make Your App *Bling* - Build Amazing Force.com Applications Using Adobe Technologies: Presentation from Dreamforce '07
Using the Flex Toolkit to Develop Rich UIs for Force.com Apps: Dreamforce '07 presentation on using Flex for rich client interfaces to the Force.com platform.
Build On-Demand Apps with Adobe Flex:
Getting Started with Flex Toolkit for Force.com: Quick start that shows you what you can accomplish for using Flex with the API.
Turbo-charging AppExchange with Rich Apps: Creating a rich user interface for your Force.com applications with Flex.
Tutorial: Creating Flex Force.com Mashups: Overview of using the Flex Toolkit to create Force.com applications.
Tutorial: Creating Flex charts without much programming.: Add Flash charts to Force.com with little effort.
Code samples
Flex Hello World: Simple example using Flex and the Web Services API.Building a FLEX S-Control Mash-Up: Bringing a rich Flex interface to a Force.com application.
Apollo Sample: Sample using Apollo, now known as Adobe Integrated Runtime.
Flex AJAX Bridge Source: Acts as a bridge between the AJAX and Flex environments.
Flex Pie Chart MXML Source: Code used to create a Flex pie chart.
Nitobi: Dave and Andre build an awesome contact manager using AJAX and Adobe AIR, see their article here. There is some very interesting work here with off line features in mind, check it out.
Displaying multiple records with an s-control
Displaying a Flex application in your Force.com application
Force.com for Google App Engine: This Python or Java library lets you access the Force.com Web services API from within Google App Engine applications. The library is open source, and we've got an installation and user guide to help you start coding.
Google Apps and the Force.com Platform:
Building the Ultimate Google & Salesforce Mashup: Presentation from Dreamforce '07.
Google Gears Demo Screencast: Demonstration of using Google Gears with the Force.com platform.
New APIs for Your Next Mashup:
Building Offline Force.com Applications with Google Gears and Google Web Toolkit: A complete description of how to create offline applications with Google Gears.
Building a Google Calendar Mash-up with Force.com SOA Login to Google Data API using the sample code in this article, includes an AppExchange package. Demonstrates the Force.com SOA JavaScript Proxy feature to call out to Google's data APIs.
Business Mashups: Best of the Web APIs: Using APIs from Yahoo and Google in your Force.com applications.
Google Maps + Google Search + API: Code for s-control using two Google APIs.
Google Resource Center: Home page for further documentation resources for using Google APIs with the Force.com platform.
Java
Creating an Outbound Messaging Notification Service with Eclipse 3.2: Describes all the steps to create a Force.com outbound messaging service with Apache and Eclipse.Migrating from Axis 1.1 to Axis 1.2: Potential 'gotchas' for this migration.
Compression with Axis 1.3: Using Apache Axis 1.3 compression with the Web Services API.
Code Samples
Java Quick Start: Executable JAR and source containing core API samples for required external libraries, including Apache Axis 1.4JAX-WS Quick Start: Executable JAR and source containing core API samples for JAX-WS 2.1
Enterprise WSDL Samples 9.0: Sample code that demonstrates accessing all methods of the API using the Enterprise (strongly typed) WSDL and Java
Java Partner WSDL Samples 10.0
Partner WSDL Samples 9.0: Sample code to that demonstrates accessing all methods of the API using the Partner (weakly typed) WSDL and Java
JSP Samples 9.0: This sample demonstrates two methods of using the API from an externally available web server. The sample requires that you have Jakarta Tomcat 5.5 and Apache Axis 1.4 installed in your environment.
Send_Emails_Via_Eclipse Send Email Example 9.0: This example demonstrates two ways of sending emails using the API: Single Emails and Mass Emails. The sample requires that you have Jakarta Tomcat 5.5.20 and Apache Axis 1.4 installed in your environment.
Batching record writes for Java
Using Query More with Java
Logging in with Java
Checking for active session with Java
Two Relationship Queries with Java
Wrapper class for common API functions in Java
Creating a Job record with Enterprise WSDL and Java
Java code
Mac OS X Cocoa
Cocoa for Force.com API: Simon Fell's tookit provides access to the Force.com API from Objective C / Xcode, allowing you to build native Mac OS X apps that talk to your Force.com apps..Net and Visual Basic
Official Documentation
Force.com Office Toolkit Developer's Guide Version 4.0- HTML | PDF | MSI Install
- (Audience: Professional Developers) Reference and samples for the Office Toolkit, a plug-in for accessing the Force.com Web Services API from within Microsoft Office.
Other Resources
DateTime in .NET 2.0: Hotfix for parsing issue.More Tips and Tricks: Learn from the pros, favorite tips and tricks from the blogs.
Force.com for ASP.NET Developers: This article provides a dive deep into using the Force.com Platform Web Services to access your Salesforce.com data from within a Visualforce page or from within a Microsoft ASP.NET Web form.
Toolkits
Salesforce Dotnet API - This toolkit makes it easy to perform API method calls from within .NET and ASP.NET. Requires .NET 2.0+.
Code Samples
Quick Start: Sample code and pre-compiled console application and source containing core API samples.C# .NET Samples: Sample code and pre-compiled console application that demonstrates accessing all methods of the API using Microsoft CSharp. This package contains both Enterprise (strongly typed) and Partner (weakly typed) API samples.
Visual Basic .NET Samples: Sample code and pre-compiled console application that demonstrates accessing all methods of the API using Microsoft Visual Basic .NET. This package contains both Enterprise (strongly typed) and Partner (weakly typed) API samples.
ASP Samples: This sample demonstrates two methods of using the Force.com API from an externally available web server. The sample requires Visual Studio 2005 and .NET Framework 2.0.
Creating an Outbound Messaging Notification Service with C# and .Net Framework 2.0: Learn how to create and test your Outbound Messaging Notification Service on the .NET Framework 2.0.
SOAP Compression: Learn how to achieve performance gains and bandwidth savings by simple modifications to your client code.
Batching record writes for .Net
Using Query More with .Net
Logging in with .Net
Checking for active session with .Net
Wrapper class for common API functions in .Net
Creating a Job record with Enterprise WSDL and .Net
Creating a Job record with Partner WSDL and .Net
CSharp code
VB code
Perl
Perl Toolkit: Toolkit for accessing the Force.com Web Services API from Perl.Perl SPAN DBD Salesforce Module: Toolkit for accessing the Force.com Web Services API from Perl.
Using the Force.com API: Very detailed series of articles from the O'Reilly Network. Author Tony Stubblebine uses Perl to construct a mashup between Salesforce.com and MovableType blogs, then packages the whole thing up.
- Part I: An Introduction to Salesforce.com's AppExchange
- Part II: Using the Force.com API
- Part III: Packaging for Salesforce.com's AppExchange
PHP
Developing on Force.com Using PHP: Overview and example of using the Force.com API from within PHP (Dreamforce 07)PHP and Rails with AppExchange: Overview and example of using the Force.com API from within PHP and Ruby on Rails (Dreamforce 06)
Toolkits
PHP Toolkit - This toolkit makes it easy to perform API method calls from within PHP. Requires PHP 5.2+.
Self-Service Portal Toolkit for PHP 5: This toolkit makes it easy to embed the salesforce.com Self-Service Portal within an existing PHP web application.
Code Samples
Creating Email Reports in PHP: Learn how to use PHP to query the API, format the results, and send the output to an email address.Simple PHP Authentication Service
Saleforce PHP Upsert Tutorial #1: This tutorial will focus on using Oracle as the local database and pushing data to Salesforce.com using the upsert command, which combines insert and update functionality.
Saleforce PHP Tutorial #2: Working with large data sets
Simple Web2Lead Implementation
Python
Beatbox: A Python adapter that provides access to Salesforce.com data and metadata via the Force.com API. The code is provided under the GPL open source license.Suds: Suds is a lightweight SOAP python client for consuming Web Services. Unlike Beatbox, it consumes wsdls, so can provide new functionality as it is released by Salesforce.
Ruby on Rails
PHP with Rails with AppExchange: Presentation from Dreamforce '06 on using PHP and Ruby on Rails.ActiveSalesforce: A Ruby on Rails framework connection adapter that provides direct access to Salesforce.com data and metadata via the Force.com API and the ActiveRecord model layer. The code is provided as an unsupported open source project via RubyForge.
Salesforce Scraper Using Ruby on Rails: On the subWindow Blog, Erik Peterson builds a mashup between Salesforce and a Postgres database.
Amazon
Force.com for Amazon Web Services: This toolkit exposes the Amazon Web Services Simple Storage System (S3) services natively in the Force.com environment. Apex code wraps the S3 API and access methods, making them directly available to your own application code.S-controls
Demystifying S-Controls and AJAX: Learn what S-controls are and how to build them using AJAX.Code Samples
Basic s-control: Standard 'Hello World' s-control.S-control title snippet: S-control that calls another s-control snippet.
S-control snippet: Snippet called by above example.
Using SOSL in an s-control
Implementing Salesforce.com look and feel in an s-control
Sending data to a mobile phone from an s-control
Accessing a Web service from an s-control
The Web service called by the previous example.
S-Controls and AJAX: Showing a pull-down list of related contacts