Event notification is an important part of most business applications. When something important happens, you sometimes need one or more users to take a specific action. This intermediate- to advanced- level webinar teaches you all about event notification, contrasts the different Salesforce features you can use to implement it, and shows you practical examples of how to use those Salesforce features to suit your specific event notification use case.
Key Takeaways
:: Understand how use case requirements help you determine the appropriate Force.com feature to use for event notification.
:: Implement and contrast event notification with Visualforce pages that poll, Visualforce pages that use the Force.com Streaming API, workflow rules, Chatter feeds and scheduled reports.
Intended Audience
:: This intermediate-level webinar is geared towards Force.com application developers and architects.
2. 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 intellectual property and other litigation, risks associated with
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 nonsalesforce.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-Q for the most recent fiscal quarter ended July 31, 2012. This 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.
#forcewebinar
4. Follow Developer Force for the Latest News
@forcedotcom / #forcewebinar
Developer Force – Force.com Community
+DeveloperForce – Force.com Community
Developer Force
Developer Force Group
#forcewebinar
6. Have Questions?
§ We have an expert support team at the ready to answer your questions
during the webinar.
§ Ask your questions via the GoToWebinar Questions Pane.
§ The speaker(s) will chose top questions to answer live at the end of the
webinar.
§ Please post your questions as we go along!
§ Only post your question once; we’ll get to it as we go down the list.
#forcewebinar
7. Recognize this scenario in life?
Something
happens
#forcewebinar
Call to
action
Someone or
thing acts
8. Recognize this scenario in life?
Leaky
pipes
#forcewebinar
Call
plumber
Plumber fixes
the pipes
16. Event importance can dictate requirements
How important
is an event?
Critical
Insignificant
#forcewebinar
17. Event Notification Requirements: Importance
Requirement
Minimal Latency
Accountability
Response
#forcewebinar
Critical
Yes
Yes
Yes
Insignificant
No
No
No
18. Event frequency can dictate requirements
How often does
an event occur?
Frequent
Infrequent
#forcewebinar
19. Event Notification Requirements: Frequency
Requirement
Minimal Latency
Accountability
Response
#forcewebinar
Frequent
No
No
No
Infrequent
Yes
Yes
Yes
25. Improv + Discovery = Satisfied Customers
How improvistational theatre techniques can
improve your discovery skills
T.K. Horeis, salesforce.com, Cloud and Industry Architect
@TKHoreis
Steve Bobrowski, salesforce.com,
@sbob909
27. Force.com event notification approaches & options
Dynamic
Web
pages
#forcewebinar
Near
real-time
messages
Deferred
messages
28. Force.com event notification approaches & options
Dynamic
Web
pages
#forcewebinar
Near
real-time
messages
Deferred
messages
29. Dynamic, auto-refreshing Web page
Characteristics
§ Teams of users are
online & watching
§ Missed events tolerated
§ Refreshes happen often
§ Receipt of event
notification not required
Stock ticker
#forcewebinar
45. Implementation 1a: Controller
public with sharing class leadListController {
Transient Lead[] leads;
String query = 'SELECT Id, Name, State, Company, Email, LastModifiedDate FROM
Lead WHERE Status = 'Open - Not Contacted'
AND Rating = 'Hot' ORDER BY
LastModifiedDate DESC LIMIT 100';
public Lead[] getLeads() {
leads = Database.query(query);
return leads;
}
public PageReference pollAction() {
leads = Database.query(query);
return null;
}
#forcewebinar
46. Traditional polling implementation: Pros & cons
Pros
Cons
§ Easy
§ Wasteful
§ Partial page refresh
§ Consumptive
§ WHERE clause in query
§ View state
§ Transient controller
variable
§ No API calls
#forcewebinar
47. Implementation 1b: Streaming API
Push
topic
Force.com
database
#forcewebinar
push
Visualforce page
“subscriber” to the push topic
48. Force.com Streaming API factoids
§ Push on CREATE or UPDATE
§ Push topic queries cannot:
– Use relationships (join data)
– Aggregate data (SUM, AVG, etc.)
– Reference formula fields
– Other limitations
#forcewebinar
49. Implementation 1b: Streaming API
Insert
Update
Delete
Lead
#forcewebinar
trigger
Push
topic
HOL__c
Visualforce page
“subscriber” to the push topic
52. Implementation 1b: Controller
@RemoteAction
static public Lead[] getHotLeads() {
String query = 'SELECT Id, Name, State, Company, Email,
LastModifiedDate FROM Lead WHERE Status = 'Open - Not
Contacted' AND Rating = 'Hot' ORDER BY LastModifiedDate
DESC';
Lead[] leads = Database.query(query);
return leads;
}
#forcewebinar
58. Long polling implementation: Pros & cons
Pros
Cons
§ Minimal page refreshes
§ Requires some code
§ Partial page refreshes
§ Complex use cases require
some thought
§ No view state
§ Easy on the database
§ Centralized logic
§ Overcomes Streaming API
challenges
#forcewebinar