SlideShare ist ein Scribd-Unternehmen logo
1 von 19
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (18)

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

Ähnlich wie Orchestrate all of your salesforce automation with the trigger actions framework

Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow TemplatesFremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Jayant Jindal
 

Ähnlich wie Orchestrate all of your salesforce automation with the trigger actions framework (20)

Partition Your (Apex) Trigger Logic Using Metadata
Partition Your  (Apex) Trigger Logic Using MetadataPartition Your  (Apex) Trigger Logic Using Metadata
Partition Your (Apex) Trigger Logic Using Metadata
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
The Power of One by Steve Molis
The Power of One by Steve MolisThe Power of One by Steve Molis
The Power of One by Steve Molis
 
The Power of One by Steve Molis
The Power of One by Steve MolisThe Power of One by Steve Molis
The Power of One by Steve Molis
 
Build Together And Deliver Continuously With Salesforce DX
Build Together And Deliver Continuously With Salesforce DXBuild Together And Deliver Continuously With Salesforce DX
Build Together And Deliver Continuously With Salesforce DX
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsDreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
 
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
 
Build System Performance Data Analytics Using Wave
Build System Performance Data Analytics Using WaveBuild System Performance Data Analytics Using Wave
Build System Performance Data Analytics Using Wave
 
Einstein Analytics for Developers
Einstein Analytics for DevelopersEinstein Analytics for Developers
Einstein Analytics for Developers
 
Just-In-Time Sharing Using Apex
Just-In-Time Sharing Using ApexJust-In-Time Sharing Using Apex
Just-In-Time Sharing Using Apex
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
 
TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018
 
SalesforceDX Demo by Manish
SalesforceDX Demo by ManishSalesforceDX Demo by Manish
SalesforceDX Demo by Manish
 
A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-Low
 
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow TemplatesFremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
 
Data import options- Salesforce Dreamforce presentation
Data import options- Salesforce Dreamforce presentationData import options- Salesforce Dreamforce presentation
Data import options- Salesforce Dreamforce presentation
 
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDXBootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
 
Release Management: Managing Your Internal Releases
Release Management: Managing Your Internal ReleasesRelease Management: Managing Your Internal Releases
Release Management: Managing Your Internal Releases
 
Planning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning ExperiencePlanning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning Experience
 

Mehr von Sudipta Deb ☁

Mehr von Sudipta Deb ☁ (13)

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

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

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