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

Weitere ähnliche Inhalte

Ähnlich wie 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
 
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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

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