SlideShare a Scribd company logo
Orchestrate ALL of your Salesforce
Automation with the Trigger Actions
Framework
Mitch Spano
Application Engineer - Google
@mitchspano
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 Website.
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.
Statement under the Private Securities Litigation Reform Act of
1995
Forward-Looking Statement
Speakers
Mitch Spano
Application Engineer - Google
@mitchspano
If you are an Architect...
• Consider how this framework
can enable your organization
to grow and scale
• Listen for strategies to better
partition your application
If you are a Developer...
• Learn how a metadata driven
trigger framework can allow
you to deliver higher quality
Apex code
• Observe the techniques used
to test Apex used in this
project
If you are a Manager...
• Gain an understanding of the
complexities of working in an
Apex trigger
• Imagine ways this could be
used in a multiple team
environment
Intended Audience
What should you take from this discussion?
Apex Triggers
Background and History
Many Automation Tools
Relative Risk and Power
Flow
Process Builder
Workflow
No Automation
Triggers
Less
Risk/Power
More
Risk/Power
Trigger Logic
Things can get messy
public class OpportunityTriggerHandler extends TriggerHandler {
public override void beforeUpdate() {
for(Opportunity o : (List<Opportunity>) Trigger.new) {
// do something
}
}
// override additional contexts as necessary
}
Existing Frameworks
Separate Trigger from Logic
public class OpportunityTriggerHandler extends TriggerHandler {
public override void afterInsert() {
this.handleWholesaleInsert((List<Opportunity>) Trigger.new);
this.handleRetailInsert((List<Opportunity>) Trigger.new);
}
private void handleWholesaleInsert(List<Opportunity> newList) {
for(Opportunity o : newList) {
// do something
}
}
private void handleRetailInsert(List<Opportunity> newList) {
for(Opportunity o : newList) {
// do something
}
}
}
Existing Frameworks
Handlers Require Modification
public class OpportunityTriggerHandler extends TriggerHandler {
public override void afterInsert() {
this.handleWholesaleInsert((List<Opportunity>) Trigger.new);
this.handleRetailInsert((List<Opportunity>) Trigger.new);
this.recalculateAccountValues((List<Opportunity>) Trigger.new);
this.notifyAMEASales((List<Opportunity>) Trigger.new);
this.setDefaultAccountType((List<Opportunity>) Trigger.new);
this.defineOpportunityContactRoles((List<Opportunity>) Trigger.new);
}
private void handleWholesaleInsert(List<Opportunity> newList) {
for(Opportunity o : newList) {
// do something
}
}
// More methods are implemented and called for every action :(
}
Existing Frameworks
Becomes Unmaintainable
Trigger Actions Framework
A Metadata Driven Approach
Trigger Framework
GitHub Information
https://github.com/mitchspano/apex-trigger-actions-framework
Trigger Framework
Classes and Metadata Types
Trigger Framework
Classes and Metadata Types
Work Together in Teams
Strategies for Working in a Multiple-Team Environment
Working in Multiple Teams
New Package Directories
{
"packageDirectories": [
{
"path": "application/base"
},
{
"path": "application/opportunity-automation"
},
{
"path": "application/retail"
},
{
"path": "application/wholesale",
"default": true
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "50.0"
}
Working in Multiple Teams
Use the Order
Order__c: 2.071
Team Prefix Order
Working in Multiple Teams
Use the Order
Orchestrate all of your salesforce automation with the trigger actions framework

More Related Content

PPTX
Kitchener Developer Group's session on "All about events"
PDF
Shadow DOM, CSS and Styling Hooks in LWC what you need to know
PPTX
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Spring '18 開発者向け新機能
PDF
Introduction to Einstein Bots
PDF
アプリを作った後の運用は万全? Heroku リリース & 運用セミナー
PDF
Get Into Lightning Flow Development
Kitchener Developer Group's session on "All about events"
Shadow DOM, CSS and Styling Hooks in LWC what you need to know
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Spring '18 開発者向け新機能
Introduction to Einstein Bots
アプリを作った後の運用は万全? Heroku リリース & 運用セミナー
Get Into Lightning Flow Development

What's hot (18)

PPTX
Unleash the Power of Apex Realtime Debugger
PDF
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
PDF
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
PDF
Spring '17開発者向け新機能
PPTX
LMS Lightning Message Service
PDF
アドバンスドLightningコンポーネント:品質の高いコンポーネント開発のためのTips
PDF
MuleSoft Anypoint Platformのコンセプトとサービス
PDF
Lightning時代のService Cloud概要とカスタマイズ
PDF
Gesture Controlled Interactions with Platform Events and IoT Explorer
PPTX
Intro to Lightning Components - Dreamforce 2016
PDF
Introduction to MuleSoft
PDF
#DF17Recap series: Integrate apps easier with the Salesforce platform
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PDF
Modern Development with Salesforce DX
PDF
Developer Preview Live – Release Readiness LIVE, Spring '18
PDF
Summer '17 リリース開発者向け新機能Webinar
PDF
Summer '18 Developer Highlights
PDF
Heroku CIを触ってみる
Unleash the Power of Apex Realtime Debugger
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
Spring '17開発者向け新機能
LMS Lightning Message Service
アドバンスドLightningコンポーネント:品質の高いコンポーネント開発のためのTips
MuleSoft Anypoint Platformのコンセプトとサービス
Lightning時代のService Cloud概要とカスタマイズ
Gesture Controlled Interactions with Platform Events and IoT Explorer
Intro to Lightning Components - Dreamforce 2016
Introduction to MuleSoft
#DF17Recap series: Integrate apps easier with the Salesforce platform
CodeLive: Build Lightning Web Components faster with Local Development
Modern Development with Salesforce DX
Developer Preview Live – Release Readiness LIVE, Spring '18
Summer '17 リリース開発者向け新機能Webinar
Summer '18 Developer Highlights
Heroku CIを触ってみる
Ad

Similar to Orchestrate all of your salesforce automation with the trigger actions framework (20)

PPTX
Partition Your (Apex) Trigger Logic Using Metadata
PDF
Introduction to Apex Triggers
PDF
Introduction to Apex Triggers
PPTX
Deep Dive into Apex Triggers
PPTX
Route your triggers like a pro #DF18
PPTX
Force.com Friday : Intro to Apex
PPTX
Intro to Apex - Salesforce Force Friday Webinar
PDF
Introduction to Apex Triggers
PDF
TrailheaDX 2019 : Explore New Frontiers with High Volume Platform Events
PDF
Just-In-Time Sharing Using Apex
PDF
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
PPTX
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
PDF
Intro to Apex Programmers
PDF
Innovation day Oslo 2018 Opening keynote
PDF
Elevate workshop track1
PDF
Dreamforce Prep and Panel 2018
PPTX
Force.com Fridays: Intro to Force.com
PDF
Five Developer Tips Every Admin Needs To Know
PPTX
Elevate Madrid Essentials - Advance Track
PPTX
Salesforce1 Platform ELEVATE LA workshop Dec 18, 2013
Partition Your (Apex) Trigger Logic Using Metadata
Introduction to Apex Triggers
Introduction to Apex Triggers
Deep Dive into Apex Triggers
Route your triggers like a pro #DF18
Force.com Friday : Intro to Apex
Intro to Apex - Salesforce Force Friday Webinar
Introduction to Apex Triggers
TrailheaDX 2019 : Explore New Frontiers with High Volume Platform Events
Just-In-Time Sharing Using Apex
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
Intro to Apex Programmers
Innovation day Oslo 2018 Opening keynote
Elevate workshop track1
Dreamforce Prep and Panel 2018
Force.com Fridays: Intro to Force.com
Five Developer Tips Every Admin Needs To Know
Elevate Madrid Essentials - Advance Track
Salesforce1 Platform ELEVATE LA workshop Dec 18, 2013
Ad

More from Sudipta Deb ☁ (13)

PPTX
Kitchener Canada Developer Group Event: From Admin to Certified Technical Arc...
PDF
DevOps 101
PPTX
Learn how Source Tracking can keep metadata changes in sync between your loca...
PDF
Let's Learn About Heroku and How to Integrate with Salesforce
PPTX
Using Styling Hooks to Customize Your LWC
PDF
Algorithms design and analysis, part 1
PDF
Functional programming principles in scala
PDF
Principles of reactive programming
PPTX
Automate the development lifecycle with cumulus ci on april 9th, 2020
PDF
Dreamforce Global Gathering
PPTX
Introduction to lightning web component
PPTX
Kitchener CA Developer Group Presents Everything you need to know about Einst...
PPTX
Building lightning apps by Daniel Peter
Kitchener Canada Developer Group Event: From Admin to Certified Technical Arc...
DevOps 101
Learn how Source Tracking can keep metadata changes in sync between your loca...
Let's Learn About Heroku and How to Integrate with Salesforce
Using Styling Hooks to Customize Your LWC
Algorithms design and analysis, part 1
Functional programming principles in scala
Principles of reactive programming
Automate the development lifecycle with cumulus ci on april 9th, 2020
Dreamforce Global Gathering
Introduction to lightning web component
Kitchener CA Developer Group Presents Everything you need to know about Einst...
Building lightning apps by Daniel Peter

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
sap open course for s4hana steps from ECC to s4
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Digital-Transformation-Roadmap-for-Companies.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks

Orchestrate all of your salesforce automation with the trigger actions framework

  • 1. Orchestrate ALL of your Salesforce Automation with the Trigger Actions Framework Mitch Spano Application Engineer - Google @mitchspano
  • 2. 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 Website. 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. Statement under the Private Securities Litigation Reform Act of 1995 Forward-Looking Statement
  • 4. If you are an Architect... • Consider how this framework can enable your organization to grow and scale • Listen for strategies to better partition your application If you are a Developer... • Learn how a metadata driven trigger framework can allow you to deliver higher quality Apex code • Observe the techniques used to test Apex used in this project If you are a Manager... • Gain an understanding of the complexities of working in an Apex trigger • Imagine ways this could be used in a multiple team environment Intended Audience What should you take from this discussion?
  • 6. Many Automation Tools Relative Risk and Power Flow Process Builder Workflow No Automation Triggers Less Risk/Power More Risk/Power
  • 8. public class OpportunityTriggerHandler extends TriggerHandler { public override void beforeUpdate() { for(Opportunity o : (List<Opportunity>) Trigger.new) { // do something } } // override additional contexts as necessary } Existing Frameworks Separate Trigger from Logic
  • 9. public class OpportunityTriggerHandler extends TriggerHandler { public override void afterInsert() { this.handleWholesaleInsert((List<Opportunity>) Trigger.new); this.handleRetailInsert((List<Opportunity>) Trigger.new); } private void handleWholesaleInsert(List<Opportunity> newList) { for(Opportunity o : newList) { // do something } } private void handleRetailInsert(List<Opportunity> newList) { for(Opportunity o : newList) { // do something } } } Existing Frameworks Handlers Require Modification
  • 10. public class OpportunityTriggerHandler extends TriggerHandler { public override void afterInsert() { this.handleWholesaleInsert((List<Opportunity>) Trigger.new); this.handleRetailInsert((List<Opportunity>) Trigger.new); this.recalculateAccountValues((List<Opportunity>) Trigger.new); this.notifyAMEASales((List<Opportunity>) Trigger.new); this.setDefaultAccountType((List<Opportunity>) Trigger.new); this.defineOpportunityContactRoles((List<Opportunity>) Trigger.new); } private void handleWholesaleInsert(List<Opportunity> newList) { for(Opportunity o : newList) { // do something } } // More methods are implemented and called for every action :( } Existing Frameworks Becomes Unmaintainable
  • 11. Trigger Actions Framework A Metadata Driven Approach
  • 15. Work Together in Teams Strategies for Working in a Multiple-Team Environment
  • 16. Working in Multiple Teams New Package Directories { "packageDirectories": [ { "path": "application/base" }, { "path": "application/opportunity-automation" }, { "path": "application/retail" }, { "path": "application/wholesale", "default": true } ], "namespace": "", "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "50.0" }
  • 17. Working in Multiple Teams Use the Order Order__c: 2.071 Team Prefix Order
  • 18. Working in Multiple Teams Use the Order