SlideShare a Scribd company logo
Developing Apex Triggers for Chatter
Chad Smith, Senior Consultant
Alternative Technology Solutions
@chad_w_smith
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.
Chad Smith
Senior Consultant,
Alternative Technology Solutions
@chad_w_smith
#SFChatterTrigger
Agenda
▪ Trigger Architecture
• Single trigger per object
• Utility Class for processing and DML operation

▪ Chatter Objects
• FeedItem
• EntitySubscription

▪ Example #1 – Auto-post to “Customer Win” Chatter Group
▪ Example #2 – Manager auto-follow “Big Deals”
▪ Example #3 – Auto-add new users to “Salesforce Q&A” Chatter Group
… before we begin
▪ Who is using Chatter now?
▪ Who is using trigger with Chatter?
▪ Who has written a trigger before?
Trigger Architecture
▪ Problems with multiple triggers on the same object
• Cannot control order of execution
• Organization of the org

▪ Solution

Class Code

• Single trigger per object
• Processing and DML
done within utility class

Trigger

Class Code

DML Statement
FeedItem Object
▪ “FeedItem represents an entry in the feed, such as changes in a record
feed, including text posts, link posts, and content posts.”
▪ Important Fields
• Body (Textarea) – The text or ‘body’ of the post
• ParentID (ID) – Chatter Group ID, AccountID, UserID (Profile Post)
• Type (Picklist) – TextPost, LinkPost, PollPost

▪ http://www.salesforce.
com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm
EntitySubscription Object
▪ “Represents a subscription for a user following a record or another
user.”
▪ Important Fields
• NetworkID (ID) – Community ID
• ParentID (ID) – ID of the record being followed
• SubscriberID (ID) – ID of the user following the record.

▪ Add Link to Docs
CollaborationGroupMember Object
▪ “Represents a member of a Chatter group.”
▪ Important Fields
• CollaborationGroupID (ID) – Chatter Group ID
• CollaborationRole (Picklist) – Admin or Standard
• MemberID (ID) – UserID of the Member
• NotificationFrequency (Picklist) – D for Daily, W for Weekly, N for Never, P for
Post

▪ http://www.salesforce.
com/us/developer/docs/api/Content/sforce_api_objects_collaborationgr
oupmember.htm
Object Model
Example #1 – Auto-Post to “Customer Win” Chatter
Group
▪ Post information to your “Customer Win” Chatter Group when your
opportunity goes to “Closed Won”
▪ Celebrate Victories!
▪ Minimize Emails in favor of Chatter (Chatter Adoption)
▪ Other Ideas
• Opportunity Next Action Group
• Project Next Action Group

▪ Code Walk Through
Example #2 – Manager Auto-Follow for Big Deals
▪ Set manager of a user to follow any opportunity over $5,000.
▪ Code Walk Through
Example #3 – Add new users to the “Salesforce
Q&A” Chatter Group
▪ Salesforce Chatter Group for Salesforce Questions & Answers
▪ Minimize support emails for your Administrator
▪ Drive Salesforce & Chatter Adoption
Deck & Code
▪ Dreamforce Session Chatter
▪ Alternative Technology Solutions Website
• http://alttechsolutions.com/http://alttechsolutions.com/SFtrigger
Email me!
• csmith@alttechsolutions.com
Chad Smith
Senior Consultant,
Alternative Technology Solutions

@chad_w_smith
Developing Apex Triggers for Chatter

More Related Content

What's hot

Developing Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceDeveloping Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in Visualforce
Salesforce Developers
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
David Scruggs
 
Making Your Apex and Visualforce Reusable
Making Your Apex and Visualforce ReusableMaking Your Apex and Visualforce Reusable
Making Your Apex and Visualforce Reusable
Salesforce Developers
 
The Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce ComponentsThe Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce Components
Salesforce Developers
 
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with SalesforceLightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
Salesforce Developers
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce Developers
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
Joshua Hoskins
 
Atl elevate programmatic developer slides
Atl elevate programmatic developer slidesAtl elevate programmatic developer slides
Atl elevate programmatic developer slides
David Scruggs
 
Lightning components performance best practices
Lightning components performance best practicesLightning components performance best practices
Lightning components performance best practices
Salesforce Developers
 
Unlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live AgentUnlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live Agent
Salesforce Developers
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
David Scruggs
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product Overview
Salesforce Partners
 
Build Better Communities with Lightning
Build Better Communities with LightningBuild Better Communities with Lightning
Build Better Communities with Lightning
Salesforce Developers
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
Salesforce Developers
 
ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017
Salesforce Partners
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
Salesforce Developers
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
Salesforce Developers
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
Salesforce Developers
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
Salesforce Developers
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForce
vraopolisetti
 

What's hot (20)

Developing Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceDeveloping Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in Visualforce
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
 
Making Your Apex and Visualforce Reusable
Making Your Apex and Visualforce ReusableMaking Your Apex and Visualforce Reusable
Making Your Apex and Visualforce Reusable
 
The Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce ComponentsThe Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce Components
 
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with SalesforceLightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com Webinar
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Atl elevate programmatic developer slides
Atl elevate programmatic developer slidesAtl elevate programmatic developer slides
Atl elevate programmatic developer slides
 
Lightning components performance best practices
Lightning components performance best practicesLightning components performance best practices
Lightning components performance best practices
 
Unlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live AgentUnlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live Agent
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product Overview
 
Build Better Communities with Lightning
Build Better Communities with LightningBuild Better Communities with Lightning
Build Better Communities with Lightning
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForce
 

Similar to Developing Apex Triggers for Chatter

Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
Salesforce Developers
 
Moving Sharing to a Parallel Architecture
Moving Sharing to a Parallel ArchitectureMoving Sharing to a Parallel Architecture
Moving Sharing to a Parallel Architecture
Salesforce Developers
 
Improving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service PortalImproving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service Portal
dreamforce2006
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
Salesforce Developers
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
Ritesh Aswaney
 
CLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global GatheringCLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global Gathering
Lynda Kane
 
Introduction to Data.com APIs
Introduction to Data.com APIsIntroduction to Data.com APIs
Introduction to Data.com APIs
Salesforce Developers
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)
Salesforce Partners
 
Extracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and TacticsExtracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and Tactics
Jigar Shah
 
Txd19 speaker session template v1
Txd19 speaker session template v1Txd19 speaker session template v1
Txd19 speaker session template v1
rikkehovgaard
 
Salesforce knowledge user group july2013
Salesforce knowledge user group   july2013Salesforce knowledge user group   july2013
Salesforce knowledge user group july2013
Francois Lopitaux
 
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditAdmin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Salesforce Admins
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour Edition
Peter Chittum
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your Employees
Salesforce Developers
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Salesforce Developers
 
Become a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata TypesBecome a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata Types
Salesforce Admins
 
Aan010 Young 091907
Aan010 Young 091907Aan010 Young 091907
Aan010 Young 091907
Dreamforce07
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manish
Manish Thaduri
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to Apex
Peter Chittum
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
Peter Chittum
 

Similar to Developing Apex Triggers for Chatter (20)

Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Moving Sharing to a Parallel Architecture
Moving Sharing to a Parallel ArchitectureMoving Sharing to a Parallel Architecture
Moving Sharing to a Parallel Architecture
 
Improving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service PortalImproving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service Portal
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
CLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global GatheringCLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global Gathering
 
Introduction to Data.com APIs
Introduction to Data.com APIsIntroduction to Data.com APIs
Introduction to Data.com APIs
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)
 
Extracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and TacticsExtracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and Tactics
 
Txd19 speaker session template v1
Txd19 speaker session template v1Txd19 speaker session template v1
Txd19 speaker session template v1
 
Salesforce knowledge user group july2013
Salesforce knowledge user group   july2013Salesforce knowledge user group   july2013
Salesforce knowledge user group july2013
 
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditAdmin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour Edition
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your Employees
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in Salesforce
 
Become a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata TypesBecome a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata Types
 
Aan010 Young 091907
Aan010 Young 091907Aan010 Young 091907
Aan010 Young 091907
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manish
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to Apex
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
 

More from Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Salesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
Salesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
Salesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
Salesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
Salesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
Salesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
Salesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
Salesforce Developers
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
Salesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
Salesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
Salesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
Salesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
Salesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
Salesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
Salesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
Salesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
Salesforce Developers
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
Salesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 

More from Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

Developing Apex Triggers for Chatter

  • 1. Developing Apex Triggers for Chatter Chad Smith, Senior Consultant Alternative Technology Solutions @chad_w_smith
  • 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 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.
  • 3. Chad Smith Senior Consultant, Alternative Technology Solutions @chad_w_smith #SFChatterTrigger
  • 4. Agenda ▪ Trigger Architecture • Single trigger per object • Utility Class for processing and DML operation ▪ Chatter Objects • FeedItem • EntitySubscription ▪ Example #1 – Auto-post to “Customer Win” Chatter Group ▪ Example #2 – Manager auto-follow “Big Deals” ▪ Example #3 – Auto-add new users to “Salesforce Q&A” Chatter Group
  • 5. … before we begin ▪ Who is using Chatter now? ▪ Who is using trigger with Chatter? ▪ Who has written a trigger before?
  • 6. Trigger Architecture ▪ Problems with multiple triggers on the same object • Cannot control order of execution • Organization of the org ▪ Solution Class Code • Single trigger per object • Processing and DML done within utility class Trigger Class Code DML Statement
  • 7. FeedItem Object ▪ “FeedItem represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts.” ▪ Important Fields • Body (Textarea) – The text or ‘body’ of the post • ParentID (ID) – Chatter Group ID, AccountID, UserID (Profile Post) • Type (Picklist) – TextPost, LinkPost, PollPost ▪ http://www.salesforce. com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm
  • 8. EntitySubscription Object ▪ “Represents a subscription for a user following a record or another user.” ▪ Important Fields • NetworkID (ID) – Community ID • ParentID (ID) – ID of the record being followed • SubscriberID (ID) – ID of the user following the record. ▪ Add Link to Docs
  • 9. CollaborationGroupMember Object ▪ “Represents a member of a Chatter group.” ▪ Important Fields • CollaborationGroupID (ID) – Chatter Group ID • CollaborationRole (Picklist) – Admin or Standard • MemberID (ID) – UserID of the Member • NotificationFrequency (Picklist) – D for Daily, W for Weekly, N for Never, P for Post ▪ http://www.salesforce. com/us/developer/docs/api/Content/sforce_api_objects_collaborationgr oupmember.htm
  • 11. Example #1 – Auto-Post to “Customer Win” Chatter Group ▪ Post information to your “Customer Win” Chatter Group when your opportunity goes to “Closed Won” ▪ Celebrate Victories! ▪ Minimize Emails in favor of Chatter (Chatter Adoption) ▪ Other Ideas • Opportunity Next Action Group • Project Next Action Group ▪ Code Walk Through
  • 12. Example #2 – Manager Auto-Follow for Big Deals ▪ Set manager of a user to follow any opportunity over $5,000. ▪ Code Walk Through
  • 13. Example #3 – Add new users to the “Salesforce Q&A” Chatter Group ▪ Salesforce Chatter Group for Salesforce Questions & Answers ▪ Minimize support emails for your Administrator ▪ Drive Salesforce & Chatter Adoption
  • 14. Deck & Code ▪ Dreamforce Session Chatter ▪ Alternative Technology Solutions Website • http://alttechsolutions.com/http://alttechsolutions.com/SFtrigger Email me! • csmith@alttechsolutions.com
  • 15. Chad Smith Senior Consultant, Alternative Technology Solutions @chad_w_smith