SFDC DEMO
© Mohan Noothalapati
AGENDA
Introduction to Salesforce
Salesforce Developer Account demo
Force.com Web Services API
SOQL
API Calls
Outbound Messaging
About APEX
APEX Web Services
WSDL Demo
Explore SFDC
Shared Resources
Q&A
ABOUT SALESFORCE
Salesforce.com is a software as a service (SaaS) company
that distributes business software on a subscription
basis. Salesforce hosts the applications offsite. It is best
known for its Customer Relationship Management
(CRM) products.
The Force.com platform allows external developers to
create add-on applications that integrate into the main
Salesforce application and are hosted on salesforce.com's
infrastructure.
These applications are built using Apex (a proprietary
Java-like programming language for the Force.com
Platform) and Visualforce (an XML-like syntax for
building user interfaces in HTML, AJAX or Flex).
DEMO WITH SFDC DEVELOPER
ACCOUNT
Personal Information and Profile
Security Token and Tab Customization
Email, Templates and Stay in Touch
Import Accounts and Contacts
About Entire Customization Tab – Tabs, Objects,
Fields, Validation Rules, Layouts.
Workflows, Triggers, Outbound messages, Pages,
Sites, APEX classes, Test Classes
General Settings
Force.com Explorer
Apex Explorer
Sforce Offline Edition
THE FORCE.COM API
Overview
Salesforce provides
programmatic
access to
organization’s
information using a
simple, powerful,
and secure Force.com Mobile
application Force.com Builder
programming Force.com Connect Apex Code
Force.com API
interface, the Force.com DB
Force.com Web Force.com OS
Services API.
HOW DOES IT WORK?
1. Login call
Log in to the server and receive authentication information to be used for
subsequent calls
2. Salesforce Objects (sObjects)
are representations of organization’s Salesforce data
e.g. accounts are represented by an Account object
The Account object has fields that represent the account name, phone
number, shipping address, and so on
3. Operations
Create, update, and delete data (create, merge, update, upsert, delete calls)
Replicate data locally (getDeleted and getUpdated calls)
Perform administrative tasks (e.g. getUserInfo , setPassword calls)
Obtain and navigate metadata (e.g. describeSObject call)
http/s
Work with workflow and approvals (process call)
Username/Password
Username/Password
Query your organization’s information (query, queryAll, queryMore, and
Force.com API
retrieve calls)Token
URL/Session
URL/SessionID
ID Token
Use the Salesforce Object Query Language (SOQL) to construct simple
powerful query strings
SOQL
Similar to SQL syntax
Allows you to specify
Source object (such as Account),
A list of fields to retrieve
Conditions for selecting rows in the source object.
Sample SOQL statement:
SELECT Name
FROM Account
WHERE Name like 'A%'
Supports Relationships
For more information – Go to SOQL under Query() in Web
Services API Guide.
API CALL
API call
After logging in, defining and populating the sObject
and choosing the operation
URL (http/s)
Force.com API
FACTS
The Force.com API exposes
all standard Salesforce Objects.
all custom Salesforce Objects and custom fields on standard
Salesforce objects
The Force.com API is secure
Supports Secure Sockets Layer (SSL) protocol SSLv3
Username/Password Credential Authentication
Optional Support for SAML and other token mechanisms
The Force.com API is standards-based
Simple Object Access Protocol (SOAP) 1.1 compliant
Web Service Description Language (WSDL) 1.1 compliant
WS-I Basic Profile 1.1 compliant
OUTBOUND MESSAGING
Overview
Outbound Messaging
enables real-time
integration by sending
Outbound Messages from
Salesforce.com to any Web
Service endpoint exposed
on the Internet based on
triggered Workflow Rules.
OUTBOUND MESSAGING
Overview
Call back using
Partner/Enterprise URL,
Outbound Messaging
Session ID Token contained
in the original Outbound
Message
is asynchronous
but allows easy callbacks
into Salesforce.com using
the Force.com API
(all Outbound Messages
contain Enterprise/Partner
URL and a Session ID
Token for easy backs)
api
OUTBOUND MESSAGING
How does it work?
1 Create a Workflow Rule / Approval Process
Define Workflow Rules / Approval Processes that trigger Outbound Messages
2 Create an Outbound Message Workflow Action
Manage Outbound Message content and Endpoint URL
Download Outbound Message WSDL file
Implement a Web Service Listener that consumes the Outbound
3
Message
Outbound Messaging is
4 Reliable
24 hours retry for failed Outbound Messages
Secure
Supports HTTP/S
Supports X.509 Client Certificates
Outbound Messages sent from salesforce.com IP Addresses
Outbound Messages contain Salesforce.com OrganizationId
WHAT IS APEX?
Force.com Apex code is a strongly-typed, object-oriented programming
language that allows developers to execute flow and transaction control
statements on the Force.com platform server in conjunction with calls to
the Force.com API. Using syntax that looks like Java and acts like
database stored procedures, Apex code enables developers to add
business logic to most system events, including button clicks, related
record updates, and Visualforce pages. Apex scripts can be initiated by
Web service requests and from triggers on objects.
APEX WEB SERVICES
1 Write your Apex Code
class myPackage {
webService Id makeContact(String lastName
Class ,Account a)
{
2 Use the webService
Contact c = new Contact(lastName = 'Spohn',
AccountId = a.Id);
annotation to expose a insert c;
commit;
Method of the Class as Web }
return c.id;
Service }
3 Download the WSDL file
Go to Setup | Build | Code
Click the name of a package
that contains webService
methods
Click Generate WSDL Eclipse
Demo
M O
DL DE
WS
EXPLORE ON SFDC
Developer account can be created at http://developer.force.com
Technical Documentation (Integration) at
http://wiki.developerforce.com/index.php/Documentation
Community at http://community.salesforce.com/
Salesforce.com blog at http://blog.sforce.com/
Force.com Video Tutorials at
http://www.salesforce.com/platform/
API Documentation at
http://www.adnsandbox.com/media/flexsdk/docs/package-summa
ry.html
WebServices API at
http://www.salesforce.com/us/developer/docs/api/index_Left.htm
SHARED RESOURCES
\\ie10nt3ksvm064\share
-> Software's, Videos, API Guides, Cookbooks, Cheat sheets
Next Webinar:
Q&
A
Thank You