Whether external or internal, the value of collaborative and social interactions goes far beyond simple information updates displayed on a wall (stream). They are significant events that can be used as catalysts for meaningful business action. In this session, we will explore the use of Salesforce Triggers and other mechanisms in helping organizations to create a conduit between social events and business processes.
Higher Education Summit '13: Triggering Social Change
1. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
June 25th, 2013
EricWhipple
Triggering Social Change
2. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Introduction
Hi. I am a designer.
Vice President of Products and Solutions
Product Owner – RQ® for Salesforce Product Line
Technical Strategist
Owner, ModernApple Consulting
Salesforce.com Solution Design and Implementation
Process and Satisfaction Modeling
3. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
RCG helps companies prioritize, measure, and advance the relationships that
most impact their performance
Our Process:
— Relational Ladder Methodology
— RQ® for Salesforce
— Over 50,000 RelationshipsAssessed
Some of Our Clients:
— Berkley College –Admissions, Enrollment, Financial Aid
— Univ. of Dayton –Alumni Relations, StudentAmbassadors
— Villanova University – Major Gifts
The Relational Capital Group
4. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
What does “Social Business” Mean?
all business is social
sources
channels
directions
destinations
Social channels are powerful,
but to be meaningful
they must always be tied to…
Real and Measurable Outcomes
Social Business is about
“doing” business socially, not just “watching” it
5. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
The “Tweet” or the Egg?
Why do Companies fail with social initiatives?
History
Culture
Language
Knowledge
With Salesforce.com, you are already
more social than you may realize
Playing
The Game of Social
Isolated Concerns /
Disconnected Results
A Hope Strategy for
ROI
Lack of Clarity and
Intentions
Businesses fail with social initiatives
because of their social practices!
6. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Salesforce Chatter
— Chatter is about Social Collaboration and
Productivity
— Social Profiles and Feeds
— SocialWorkflow
— Chatter Groups
— Chatter Communities
— File Sharing and Preview
— Chatter Mobile
— Chatter Desktop
— Why Chatter is not like Email
— Why Chatter is not like Facebook
7. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Posting a Whole Lot More
— Publisher Actions turn data
management tasks into social
updates
— Posting updates can be as simple
or as sophisticated as you need it
to be
— Encourage good social content
by controlling post data
— Auto fill data attributes to ensure
complete data
8. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Beyond the Wall with Salesforce.com
— Going Offensive with Social
— TellingYour Social Story: SocialTriggers
— Social Integration: Leveraging external social content
— Social Automation: Scheduled Jobs and Chatter API
— Beyond Configuration and Code
— SalesforceAppExchange has many applications that leverage social
channels to help you design, execute, and govern both social and
traditional data processes.
9. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Telling Your Social Story
ApexTrigger
+
Chatter (Apex)
=
Customized and
automated Social
Stories
10. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Telling Your Social Story
1. Create a new FeedItem
2. Assign it to the appropriate
stream
3. Populate it’s content (body)
4. Give it a title
5. Insert the new record
6. DONE!
trigger opportunityActions on Opportunity (after insert, after update) {
for(Opportunity opp :Trigger.new){
if(opp.stageName == 'ClosedWon'){
//format Opportunity amount
List<String> args = new String[]{'0','number','$##,###,##0.00'};
String amount = String.format(opp.amount.format(), args);
//Add a new Link post to theAccount's stream
FeedItem post = new FeedItem();
post.ParentId = opp.accountId;
post.Body = 'We are KILLING it! Won another deal for
‘+amount+' on ‘+String.valueOf(opp.closedate);
post.LinkUrl = '/'+opp.id;
post.Title = opp.name;
insert post;
}
}
}
11. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Social Integration
— Question: How can we leverage our LinkedIn networks to be better
observers of trending topics?
— Question: Is it really possible to act effectively and efficiently with what’s
going on “out there”?
— Question: How can we do that without hiring a bunch of people to “watch the
world”? How can we automate the process?
— Example: Capture LinkedIn stream data and take specific sales and marketing
actions, based on the content of that data
— MonitorTrendingTopics
— Add new Leads, based on strategically relevant social topics
— Automatically assign Leads to appropriate marketing campaigns
12. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Social Integration
Integration Stack Benefits
— Leverages existing LinkedIn capabilities
— Utilizes standard (well-known) data structures
— Captures actual structured data, not just blobs
— Full development platform to leverage social
data
— Complete CRM toolset to connect social
behaviors with real people
13. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Social Integration
Creating a Simple (but powerful) MVC application
Visualforce
page
LinkedIn Apex
Controller
LinkedIn
Helper
Class
LinkedIn
Models
Class
Campaign
Member Object
Campaign Object
Lead Object
Other…
14. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
The LinkedIn Class Model
— Classes
were
derived
from
the
LinkedIn
Api
JSON
response
to
an
HTTP
request
— They
are
automaAcally
be
mapped
to
the
JSON
message
— Unmappable
(unecessary)
aHributes
will
be
“skipped”
— ConsumpAon
(capturing
and
parsing)
of
data
will
be
done
in
ONE
LINE
OF
CODE
public
with
sharing
class
LinkedInModel{
public
class
LinkedInResponse{…}
public
class
LinkedInSHARUpdate{…}
public
class
UpdateContent{…}
public
class
Person{…}
public
class
CurrentShare{…}
public
class
ShareContent{…}
public
class
SiteStandardProfileRequest{…}
}
16. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Key Code Bits
— Create New Leads and Perform Additional Processing
public static void upsertSocialLeads(List<LinkedInModel.LinkedInSHARUpdate> postValues){
for(LinkedInModel.LinkedInSHARUpdate socialContent : postValues){
// If the lead already exists, just add the post to that Lead.
// If it does not, then add a Lead and then add the post to that Lead.
List<Lead> existingLead = [select id from lead where firstname = :firstName and lastname = :lastName];
if(existingLead.size() > 0){
// Save individual post content as a completed task on that Lead
Task newPost = newTask();
(… Continue Processing…)
} else {
// Create, populate, and save a new Lead
Lead socialLead = new Lead();
(… Continue Processing…)
insert socialLead;
whoId = socialLead.id;
addToCampaigns(socialLead,get2013Campaigns());
}
17. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Social Automation
— Force.com APIs enable the platform to be notified of social events
— ScheduledApex jobs enable automation of poll-based interactions
global class scheduledMerge implements Schedulable{
global void execute(SchedulableContext SC) {
HttpRequest req = new HttpRequest();
req.setEndpoint(getLinkedInRequestUrl());
Http http = new Http();
HttpResponse response = http.send(req);
linkedInResponse = (LinkedInModel.LinkedInResponse)JSON.deserialize(
response.getBody(), LinkedInModel.LinkedInResponse.class);
(… Continue Processing…)
}
}
18. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Final Thoughts
— All Business is social
— Social actions must be designed to be meaningful
— Salesforce.com encourages and supports sophisticated social
collaboration out of the box
— Social content can be easily leveraged to contribute to meaningful
business action that drives higher quality and greater performance
19. HIGHER EDUCATION SUMMIT ’13:
ENGAGE. TRANSFORM. SUCCEED.
Questions
— eric@relcapgroup.com or eric@modernapple.com
— www.relcapgroup.com
— www.rqforsalesforce.com
(or check us out on theAppExchange)