SlideShare uma empresa Scribd logo
1 de 41
5 key ideas for robust and flexible REST API integrations with
Apex
Lucian Mihai Ciobanu
OUR SPONSORS
#CD23 @CzechDreamin
John’s accounting team is pretty frustrated
#CD23 @CzechDreamin
Lead Developer
Declarative Webhooks
@Lucian_Ciobanu
/in/lucian-mihai-ciobanu-8331a227/
Lucian Mihai Ciobanu
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Loading
#CD23 @CzechDreamin
● API class that handles API calls only
● Helper class that handles the logic
● Webhook class for receiving inbound calls
● Test class that can cover the integration
code
Use separation of concerns
Idea 1/5
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
@RestResource : Accepts incoming calls
and events from the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
#CD23 @CzechDreamin
● API class that handles API calls only
● Helper class that handles the logic
● Webhook class for receiving inbound calls
● Test class that can cover the integration
code
Use separation of concerns
Idea 1/5
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
@RestResource : Accepts incoming calls
and events from the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
#CD23 @CzechDreamin
● API class that handles API calls only
● Helper class that handles the logic
● Webhook class for receiving inbound calls
● Test class that can cover the integration
code
Use separation of concerns
Idea 1/5
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
@RestResource : Accepts incoming calls
and events from the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
#CD23 @CzechDreamin
● API class that handles API calls only
● Helper class that handles the logic
● Webhook class for receiving inbound calls
● Test class that can cover the integration
code
Use separation of concerns
Idea 1/5
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
@RestResource : Accepts incoming calls
and events from the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
#CD23 @CzechDreamin
● API class that handles API calls only
● Helper class that handles the logic
● Webhook class for receiving inbound calls
● Test class that can cover the integration
code
Use separation of concerns
Idea 1/5
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
@RestResource : Accepts incoming calls
and events from the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
#CD23 @CzechDreamin
TRIGGER
Idea 1/5
Use separation of concerns
#CD23 @CzechDreamin
TRIGGER
Idea 1/5
Use separation of concerns
#CD23 @CzechDreamin
TRIGGER
Idea 1/5
Use separation of concerns
#CD23 @CzechDreamin
TRIGGER
Idea 1/5
Use separation of concerns
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Loading
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Loading
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Loading
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Loading
#CD23 @CzechDreamin
● Custom metadata with base urls and
credentials
● The API class can extract the information
from the custom metadata type
Idea #2
Idea 2/5
Make everything configurable
#CD23 @CzechDreamin
Idea 2/5
Make everything configurable
#CD23 @CzechDreamin
● Configurable field mapping with custom metadata or custom settings
Idea 2/5
Make everything configurable
#CD23 @CzechDreamin
Idea 2/5
Make everything configurable
#CD23 @CzechDreamin
Idea 2/5
Make everything configurable
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Loading
#CD23 @CzechDreamin
● Log outbound calls
● Log inbound calls
● Make sure to log failures
Idea #3
Idea 3/5
Log every call
#CD23 @CzechDreamin
Idea 3/5
Log every call
#CD23 @CzechDreamin
Idea 3/5
Log every call
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Log every call
4. Loading
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Log every call
4. Loading
#CD23 @CzechDreamin
● Callouts WILL fail, it’s just a matter of time
● Show it in the interface (synchronous integrations)
● Warning to an admin (asynchronous integrations)
○ Slack
○ Chatter
○ Email
● Automatic retry (asynchronous integrations)
Salesforce
API
Idea 4/5
Handle API Failures
#CD23 @CzechDreamin
● Callouts WILL fail, it’s just a matter of time
● Show it in the interface (synchronous integrations)
● Warning to an admin (asynchronous integrations)
○ Slack
○ Chatter
○ Email
● Automatic retry (asynchronous integrations)
Idea 4/5
Handle API Failures
#CD23 @CzechDreamin
● Callouts WILL fail, it’s just a matter of time
● Show it in the interface (synchronous integrations)
● Warning to an admin (asynchronous integrations)
○ Slack
○ Chatter
○ Email
● Automatic retry (asynchronous integrations)
Idea 4/5
Handle API Failures
Handle API Failures
Idea 4/5
Handle API Failures
Idea 4/5
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Log every call
4. Handle API failures
5. Loading
#CD23 @CzechDreamin
● A set of objects and classes that gives you a
head start in future integrations
API class
Handles API calls, API settings, request
and response classes
Inbound Webhook class
Accepts incoming calls and events from
the external system
Helper class
Handles logic of the integration
and connection between
Salesforce objects and the API
Test
class
Triggers,
LWC,
Visualforce,
Flows
Idea 5/5
Build yourself a framework
#CD23 @CzechDreamin
Make your next
integration easier
Idea 5/5
Build yourself a framework
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Log every call
4. Handle API failures
5. Build yourself a framework
#CD23 @CzechDreamin
5 key ideas for robust and flexible REST API integrations
1. Use separation of concerns
2. Make everything configurable
3. Log every call
4. Handle API failures
5. Build yourself a framework
#CD23 @CzechDreamin
Resources
● Github Repository: https://bit.ly/3W5bEvh
● Slides: https://bit.ly/42UBwwB
● My Twitter: @Lucian_Ciobanu
● My LinkedIn: https://bit.ly/3W50TJj
Thank you

Mais conteúdo relacionado

Semelhante a 5 key ideas for robust and flexible REST API integrations with Apex, Lucian Mihai Ciobanu

Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingAustin Marie Gay
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
 
Andrii Yatsenko "Make the most of Twig"
Andrii Yatsenko "Make the most of Twig"Andrii Yatsenko "Make the most of Twig"
Andrii Yatsenko "Make the most of Twig"Fwdays
 
API workshop by AWS and 3scale
API workshop by AWS and 3scaleAPI workshop by AWS and 3scale
API workshop by AWS and 3scale3scale
 
Api design best practice
Api design best practiceApi design best practice
Api design best practiceRed Hat
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkToby Beresford
 
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the CloudGetting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the CloudRevelation Technologies
 
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Amazon Web Services
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing SoftwareSteven Smith
 
Protection and Verification of Security Design Flaws
Protection and Verification of Security Design FlawsProtection and Verification of Security Design Flaws
Protection and Verification of Security Design FlawsHdiv Security
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & ValidationElmar Selbach
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"GoIT
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020Abhijeet Vaikar
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]Dynatrace
 
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfDEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfFelipe Prado
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectColdFusionConference
 

Semelhante a 5 key ideas for robust and flexible REST API integrations with Apex, Lucian Mihai Ciobanu (20)

Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced Testing
 
Spring Test Framework
Spring Test FrameworkSpring Test Framework
Spring Test Framework
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
FLossEd-BK Tequila Framework3.2.1
FLossEd-BK Tequila Framework3.2.1FLossEd-BK Tequila Framework3.2.1
FLossEd-BK Tequila Framework3.2.1
 
Andrii Yatsenko "Make the most of Twig"
Andrii Yatsenko "Make the most of Twig"Andrii Yatsenko "Make the most of Twig"
Andrii Yatsenko "Make the most of Twig"
 
Keeping up with PHP
Keeping up with PHPKeeping up with PHP
Keeping up with PHP
 
Kku2011
Kku2011Kku2011
Kku2011
 
API workshop by AWS and 3scale
API workshop by AWS and 3scaleAPI workshop by AWS and 3scale
API workshop by AWS and 3scale
 
Api design best practice
Api design best practiceApi design best practice
Api design best practice
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
 
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the CloudGetting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
 
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
Protection and Verification of Security Design Flaws
Protection and Verification of Security Design FlawsProtection and Verification of Security Design Flaws
Protection and Verification of Security Design Flaws
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfDEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 

Mais de CzechDreamin

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...CzechDreamin
 
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...CzechDreamin
 
How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...CzechDreamin
 
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...CzechDreamin
 
Architecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearCzechDreamin
 
Ape to API, Filip Dousek
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip DousekCzechDreamin
 
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel MoyaPush Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel MoyaCzechDreamin
 
How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...CzechDreamin
 
ChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark JonesChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark JonesCzechDreamin
 
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...CzechDreamin
 
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...CzechDreamin
 
Sales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy AvilovSales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy AvilovCzechDreamin
 
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...CzechDreamin
 
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat FragosoNo Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat FragosoCzechDreamin
 
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew CookWhy do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew CookCzechDreamin
 
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel SombuBe kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel SombuCzechDreamin
 
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...CzechDreamin
 
The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...CzechDreamin
 
Restriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise LockieRestriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise LockieCzechDreamin
 
Introduction to Custom Journey Builder Activities, Orkhan Alakbarli
Introduction to Custom Journey Builder Activities, Orkhan AlakbarliIntroduction to Custom Journey Builder Activities, Orkhan Alakbarli
Introduction to Custom Journey Builder Activities, Orkhan AlakbarliCzechDreamin
 

Mais de CzechDreamin (20)

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
 
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
 
How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...
 
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
 
Architecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron Crear
 
Ape to API, Filip Dousek
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip Dousek
 
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel MoyaPush Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
 
How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...
 
ChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark JonesChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark Jones
 
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
 
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
 
Sales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy AvilovSales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy Avilov
 
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
 
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat FragosoNo Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
 
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew CookWhy do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
 
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel SombuBe kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
 
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
 
The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...
 
Restriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise LockieRestriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise Lockie
 
Introduction to Custom Journey Builder Activities, Orkhan Alakbarli
Introduction to Custom Journey Builder Activities, Orkhan AlakbarliIntroduction to Custom Journey Builder Activities, Orkhan Alakbarli
Introduction to Custom Journey Builder Activities, Orkhan Alakbarli
 

Último

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Último (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

5 key ideas for robust and flexible REST API integrations with Apex, Lucian Mihai Ciobanu

  • 1. 5 key ideas for robust and flexible REST API integrations with Apex Lucian Mihai Ciobanu
  • 3. #CD23 @CzechDreamin John’s accounting team is pretty frustrated
  • 4. #CD23 @CzechDreamin Lead Developer Declarative Webhooks @Lucian_Ciobanu /in/lucian-mihai-ciobanu-8331a227/ Lucian Mihai Ciobanu
  • 5. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Loading
  • 6. #CD23 @CzechDreamin ● API class that handles API calls only ● Helper class that handles the logic ● Webhook class for receiving inbound calls ● Test class that can cover the integration code Use separation of concerns Idea 1/5 API class Handles API calls, API settings, request and response classes Inbound Webhook class @RestResource : Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows
  • 7. #CD23 @CzechDreamin ● API class that handles API calls only ● Helper class that handles the logic ● Webhook class for receiving inbound calls ● Test class that can cover the integration code Use separation of concerns Idea 1/5 API class Handles API calls, API settings, request and response classes Inbound Webhook class @RestResource : Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows
  • 8. #CD23 @CzechDreamin ● API class that handles API calls only ● Helper class that handles the logic ● Webhook class for receiving inbound calls ● Test class that can cover the integration code Use separation of concerns Idea 1/5 API class Handles API calls, API settings, request and response classes Inbound Webhook class @RestResource : Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows
  • 9. #CD23 @CzechDreamin ● API class that handles API calls only ● Helper class that handles the logic ● Webhook class for receiving inbound calls ● Test class that can cover the integration code Use separation of concerns Idea 1/5 API class Handles API calls, API settings, request and response classes Inbound Webhook class @RestResource : Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows
  • 10. #CD23 @CzechDreamin ● API class that handles API calls only ● Helper class that handles the logic ● Webhook class for receiving inbound calls ● Test class that can cover the integration code Use separation of concerns Idea 1/5 API class Handles API calls, API settings, request and response classes Inbound Webhook class @RestResource : Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows
  • 15. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Loading
  • 16. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Loading
  • 17. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Loading
  • 18. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Loading
  • 19. #CD23 @CzechDreamin ● Custom metadata with base urls and credentials ● The API class can extract the information from the custom metadata type Idea #2 Idea 2/5 Make everything configurable
  • 20. #CD23 @CzechDreamin Idea 2/5 Make everything configurable
  • 21. #CD23 @CzechDreamin ● Configurable field mapping with custom metadata or custom settings Idea 2/5 Make everything configurable
  • 22. #CD23 @CzechDreamin Idea 2/5 Make everything configurable
  • 23. #CD23 @CzechDreamin Idea 2/5 Make everything configurable
  • 24. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Loading
  • 25. #CD23 @CzechDreamin ● Log outbound calls ● Log inbound calls ● Make sure to log failures Idea #3 Idea 3/5 Log every call
  • 28. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Log every call 4. Loading
  • 29. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Log every call 4. Loading
  • 30. #CD23 @CzechDreamin ● Callouts WILL fail, it’s just a matter of time ● Show it in the interface (synchronous integrations) ● Warning to an admin (asynchronous integrations) ○ Slack ○ Chatter ○ Email ● Automatic retry (asynchronous integrations) Salesforce API Idea 4/5 Handle API Failures
  • 31. #CD23 @CzechDreamin ● Callouts WILL fail, it’s just a matter of time ● Show it in the interface (synchronous integrations) ● Warning to an admin (asynchronous integrations) ○ Slack ○ Chatter ○ Email ● Automatic retry (asynchronous integrations) Idea 4/5 Handle API Failures
  • 32. #CD23 @CzechDreamin ● Callouts WILL fail, it’s just a matter of time ● Show it in the interface (synchronous integrations) ● Warning to an admin (asynchronous integrations) ○ Slack ○ Chatter ○ Email ● Automatic retry (asynchronous integrations) Idea 4/5 Handle API Failures
  • 35. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Log every call 4. Handle API failures 5. Loading
  • 36. #CD23 @CzechDreamin ● A set of objects and classes that gives you a head start in future integrations API class Handles API calls, API settings, request and response classes Inbound Webhook class Accepts incoming calls and events from the external system Helper class Handles logic of the integration and connection between Salesforce objects and the API Test class Triggers, LWC, Visualforce, Flows Idea 5/5 Build yourself a framework
  • 37. #CD23 @CzechDreamin Make your next integration easier Idea 5/5 Build yourself a framework
  • 38. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Log every call 4. Handle API failures 5. Build yourself a framework
  • 39. #CD23 @CzechDreamin 5 key ideas for robust and flexible REST API integrations 1. Use separation of concerns 2. Make everything configurable 3. Log every call 4. Handle API failures 5. Build yourself a framework
  • 40. #CD23 @CzechDreamin Resources ● Github Repository: https://bit.ly/3W5bEvh ● Slides: https://bit.ly/42UBwwB ● My Twitter: @Lucian_Ciobanu ● My LinkedIn: https://bit.ly/3W50TJj