SlideShare una empresa de Scribd logo
1 de 25
Architect’s View on Time-based Workflows
Pawel Dobrzynski, May 2023
#CD2023 @CzechDreamin
2006 - Salesforce fan
2015 - PwC Salesforce Team
2016 - #packleader #dogslife
2019 - Application Architect, 11 certificates
2022 - FlowFest Contest - Top 10
Salesforce Architect
Paweł Dobrzyński
Lightning Resources want to notify the Case Owner when a Case is
inactive for 5 days. Every update on the Case restarts the counter. After
5 days of inactivity an Email Alert should be sent to the Case owner.
● Closed Cases do not trigger notifications
● The counter starts after a Case is accepted from the Queue (do not
send notifications to Queue members)
● The delay period (5 days) should be parametrised
The Problem
Notify Case Owner After 5 Days
Notify Case Owner After 5 Days
Think about
possible solutions
to this problem
The Solution
Ask the Audience
Ask the Audience
1
Record Triggered Flow with Scheduled Path
Record Triggered Flow
with Scheduled Path
Basic Concept of Time-based Workflow
Entry Criteria Time Offset Deferred Action
Time-based Workflow
Basic Concept
Case updated
→ Reset counter
Case accepted
→ Start counter
After 5 days
→ Send Email
Case created and
assigned to Queue
Entry Criteria
Custom Formula Field: Owner Type
= IF ( ISBLANK (Owner:User.Id ), "Queue", "User")
Other options:
● BEGINS( OwnerId , "005") → User
● BEGINS( OwnerId , "00G") → Queue
First Dillema
Recognise the moment
when the Case is assigned to User
Last Modified Date
5 Days
IsClosed = FALSE
AND
Owner Type = User
Email Alert
to
Case Owner
Run Immediately After 5 days
Variant A: Time offset defined explicitly
Entry Criteria
Time Offset
Deferred Action
It Works! (With Any Object)
Easy to Implement
Hard Coded 5 Days Period
Custom X-Object Formula Field
Advantages and Drawbacks
Drawback Advantage
Record Triggered Flow with Scheduled Path
Record Triggered Flow with Scheduled Path
Case Reminder Date
0 Hours
IsClosed = FALSE
AND
Owner Type = User
Email Alert
to
Case Owner
Run Immediately After Threshold
Variant B: Time offset defined in Custom Field
LastModifiedDate +
$CustomMetadata.SupportProcessParameters__mdt.
InactivityThreshold.NumericValue__c
Reminder Date (Date/Time) =
(custom formula field)
Entry Criteria
Time Offset
Deferred Action
It Works! (With Any Object)
Easy to Implement
Parametrised 5 Days Period
+2 Formula Fields
Advantages and Drawbacks
Drawback Advantage
Record Triggered Flow with Scheduled Path - variant
Record Triggered Flow with Scheduled Path - variant
What would be the highest number
of cases per day
that can be smoothly processed
with the mentioned solution?
Assume Unlimited Edition with 1000 users
Max Daily Cases Limit
Think about it
Think about it
1K Email Alerts per day per user
=> 1 M alerts possible per day
1K time trigger workflow resumes per hour
=> max 24K overdue cases per day
50K waiting flow interviews - divide by 5 days
=> max 10K cases a day
Potential Limits
Think about it
Think about
The maximum scheduled-path interviews per 24 hours
is 250,000, or the number of user licenses in your org
multiplied by 200, whichever is greater.
Spring'21 Release Notes
If the flow can be triggered by record updates with
Time Source set to be based on a field value such
as dueDate, and condition requirements are met, the
scheduled path executes at that new time regardless
of whether the scheduled path already executed.
Salesforce Says…
Think about it
Schedule Triggered Flow
2
Schedule Triggered Flow
Schedule Triggered Flow vs Time-based Actions
Entry Criteria Entry Criteria
Logic
Entry Criteria
21 Sep 1:00 am
20 Sep 1:00 am 22 Sep 1:00 am
Logic
Logic
Record
Record
Record
Record
Record
Record
Record
Schedule Triggered Flow
Record
Record
Schedule Triggered Flow vs Time-based Actions
Entry Criteria
“ Time Offset “ Entry Criteria
Logic
Entry Criteria
21 Sep 1:00 am
20 Sep 1:00 am 22 Sep 1:00 am
Logic
Logic
Record
Record
Record
Record
Record
Record
Record
Schedule Triggered Flow
the Concept of Time-based Action
Record
Record
Record
Record
5 Days since last update
16 Sep 1:00 am
Entry Criteria
Time Offset
Logic
Last Modified Date
earlier than
TODAY - 5 Days
Open Cases
AND
Reminder not sent
Email Alert
to Case Owner
+
Set Reminder Flag
Every day
Retrieve number of days from
Custom metadata Type
Variant A: Time offset inside the logic
Reminder Sent ←TRUE
Set flag to send only once
Entry Criteria
Logic
Open Cases
AND
Owned by User
AND
Reminder not sent
AND
Reminder Date
is Now (or earlier)
Email Alert
to Case Owner
+
Set Reminder Flag
Every day
Variant B: Time offset in Entry Criteria
NOW() >= DF22_ReminderDate__c
Case Overdue (Checkbox) =
It Works! (With Any Object)
Up to 250K records daily
Variant A: More records processed - NO custom fields
Variant B: Only required records - BUT +2 custom fields
Advantages and Drawbacks
Drawback Advantage
Schedule Triggered Flow
Record Triggered Flow with Scheduled Path - variant
3 Case Escalation Rules
Case Escalation Rules
Entry Criteria
Time Offset
Logic
Age Over 5 Days
(=120 Hours)
Owner Type = User
AND
is NOT Closed
Notify
Case Owner
Case Escalation Rules
It Works!
Out of the Box
Works ONLY for Cases
No Limits (not aware of any)
Yay! or Nay?
Drawback Advantage
Case Escalation Rules
Case Escalation Rules
Often there is more than one approach
Each one has advantages and trade-offs
Be mindful about limits
Use Scheduled Path for low record volume and short period
Use Scheduled Flow for larger volume and longer period
Always look for Out of the Box solutions
Key Takeaways
Think about it
Thank you

Más contenido relacionado

Similar a Architect’s View On Time Based Workflows, Pawel Dobrzynski

Business continuity and disaster recovery
Business continuity and disaster recoveryBusiness continuity and disaster recovery
Business continuity and disaster recoveryAdeel Javaid
 
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법Amazon Web Services Korea
 
[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic
[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic
[DSC Europe 22] Delivering Delivery Time Prediction - Aid AhmetovicDataScienceConferenc1
 
Glc portal project user training - corporate services v2.0
Glc portal project   user training - corporate services v2.0Glc portal project   user training - corporate services v2.0
Glc portal project user training - corporate services v2.0Visoft Pte Ltd
 
Spark Summit EU talk by Sebastian Schroeder and Ralf Sigmund
Spark Summit EU talk by Sebastian Schroeder and Ralf SigmundSpark Summit EU talk by Sebastian Schroeder and Ralf Sigmund
Spark Summit EU talk by Sebastian Schroeder and Ralf SigmundSpark Summit
 
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...Flink Forward
 
Office 365 Incident Response 2019 B-Sides Orlando
Office 365 Incident Response 2019 B-Sides OrlandoOffice 365 Incident Response 2019 B-Sides Orlando
Office 365 Incident Response 2019 B-Sides OrlandoAlex Parsons
 
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupUsing Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupStratio
 
Kanban 101 - An Introduction to Planning with Little's Law
Kanban 101 - An Introduction to Planning with Little's LawKanban 101 - An Introduction to Planning with Little's Law
Kanban 101 - An Introduction to Planning with Little's LawJack Speranza
 
Optimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsOptimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsAmazon Web Services
 
Guest Presentation: Amazon Fresh
Guest Presentation: Amazon FreshGuest Presentation: Amazon Fresh
Guest Presentation: Amazon FreshAmazon Web Services
 
Bosun Monitoring Talk at LISA14
Bosun Monitoring Talk at LISA14Bosun Monitoring Talk at LISA14
Bosun Monitoring Talk at LISA14Kyle Brandt
 
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...DataWorks Summit
 
Critical Chain Project Management
Critical Chain Project ManagementCritical Chain Project Management
Critical Chain Project ManagementFred Wiersma
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloudAhmad karawash
 
Take full control over your Flow approvals - One solution to rule them all
Take full control over your Flow approvals - One solution to rule them allTake full control over your Flow approvals - One solution to rule them all
Take full control over your Flow approvals - One solution to rule them allStefan Strube
 
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...Amazon Web Services
 

Similar a Architect’s View On Time Based Workflows, Pawel Dobrzynski (20)

Amrita_Resume
Amrita_ResumeAmrita_Resume
Amrita_Resume
 
Technical Debt
Technical DebtTechnical Debt
Technical Debt
 
Business continuity and disaster recovery
Business continuity and disaster recoveryBusiness continuity and disaster recovery
Business continuity and disaster recovery
 
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
 
[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic
[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic
[DSC Europe 22] Delivering Delivery Time Prediction - Aid Ahmetovic
 
Glc portal project user training - corporate services v2.0
Glc portal project   user training - corporate services v2.0Glc portal project   user training - corporate services v2.0
Glc portal project user training - corporate services v2.0
 
Spark Summit EU talk by Sebastian Schroeder and Ralf Sigmund
Spark Summit EU talk by Sebastian Schroeder and Ralf SigmundSpark Summit EU talk by Sebastian Schroeder and Ralf Sigmund
Spark Summit EU talk by Sebastian Schroeder and Ralf Sigmund
 
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...
William Vambenepe – Google Cloud Dataflow and Flink , Stream Processing by De...
 
Technical debt
Technical debtTechnical debt
Technical debt
 
Office 365 Incident Response 2019 B-Sides Orlando
Office 365 Incident Response 2019 B-Sides OrlandoOffice 365 Incident Response 2019 B-Sides Orlando
Office 365 Incident Response 2019 B-Sides Orlando
 
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupUsing Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
 
Kanban 101 - An Introduction to Planning with Little's Law
Kanban 101 - An Introduction to Planning with Little's LawKanban 101 - An Introduction to Planning with Little's Law
Kanban 101 - An Introduction to Planning with Little's Law
 
Optimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsOptimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce Costs
 
Guest Presentation: Amazon Fresh
Guest Presentation: Amazon FreshGuest Presentation: Amazon Fresh
Guest Presentation: Amazon Fresh
 
Bosun Monitoring Talk at LISA14
Bosun Monitoring Talk at LISA14Bosun Monitoring Talk at LISA14
Bosun Monitoring Talk at LISA14
 
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...
Unify Stream and Batch Processing using Dataflow, a Portable Programmable Mod...
 
Critical Chain Project Management
Critical Chain Project ManagementCritical Chain Project Management
Critical Chain Project Management
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloud
 
Take full control over your Flow approvals - One solution to rule them all
Take full control over your Flow approvals - One solution to rule them allTake full control over your Flow approvals - One solution to rule them all
Take full control over your Flow approvals - One solution to rule them all
 
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
 

Más 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
 
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...CzechDreamin
 
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
 

Más 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
 
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
 
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
 

Último

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Último (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
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!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Architect’s View On Time Based Workflows, Pawel Dobrzynski

  • 1. Architect’s View on Time-based Workflows Pawel Dobrzynski, May 2023
  • 2. #CD2023 @CzechDreamin 2006 - Salesforce fan 2015 - PwC Salesforce Team 2016 - #packleader #dogslife 2019 - Application Architect, 11 certificates 2022 - FlowFest Contest - Top 10 Salesforce Architect Paweł Dobrzyński
  • 3. Lightning Resources want to notify the Case Owner when a Case is inactive for 5 days. Every update on the Case restarts the counter. After 5 days of inactivity an Email Alert should be sent to the Case owner. ● Closed Cases do not trigger notifications ● The counter starts after a Case is accepted from the Queue (do not send notifications to Queue members) ● The delay period (5 days) should be parametrised The Problem Notify Case Owner After 5 Days Notify Case Owner After 5 Days
  • 4. Think about possible solutions to this problem The Solution Ask the Audience Ask the Audience
  • 5. 1 Record Triggered Flow with Scheduled Path Record Triggered Flow with Scheduled Path
  • 6. Basic Concept of Time-based Workflow Entry Criteria Time Offset Deferred Action Time-based Workflow Basic Concept Case updated → Reset counter Case accepted → Start counter After 5 days → Send Email Case created and assigned to Queue
  • 7. Entry Criteria Custom Formula Field: Owner Type = IF ( ISBLANK (Owner:User.Id ), "Queue", "User") Other options: ● BEGINS( OwnerId , "005") → User ● BEGINS( OwnerId , "00G") → Queue First Dillema Recognise the moment when the Case is assigned to User
  • 8. Last Modified Date 5 Days IsClosed = FALSE AND Owner Type = User Email Alert to Case Owner Run Immediately After 5 days Variant A: Time offset defined explicitly Entry Criteria Time Offset Deferred Action
  • 9. It Works! (With Any Object) Easy to Implement Hard Coded 5 Days Period Custom X-Object Formula Field Advantages and Drawbacks Drawback Advantage Record Triggered Flow with Scheduled Path Record Triggered Flow with Scheduled Path
  • 10. Case Reminder Date 0 Hours IsClosed = FALSE AND Owner Type = User Email Alert to Case Owner Run Immediately After Threshold Variant B: Time offset defined in Custom Field LastModifiedDate + $CustomMetadata.SupportProcessParameters__mdt. InactivityThreshold.NumericValue__c Reminder Date (Date/Time) = (custom formula field) Entry Criteria Time Offset Deferred Action
  • 11. It Works! (With Any Object) Easy to Implement Parametrised 5 Days Period +2 Formula Fields Advantages and Drawbacks Drawback Advantage Record Triggered Flow with Scheduled Path - variant Record Triggered Flow with Scheduled Path - variant
  • 12. What would be the highest number of cases per day that can be smoothly processed with the mentioned solution? Assume Unlimited Edition with 1000 users Max Daily Cases Limit Think about it Think about it
  • 13. 1K Email Alerts per day per user => 1 M alerts possible per day 1K time trigger workflow resumes per hour => max 24K overdue cases per day 50K waiting flow interviews - divide by 5 days => max 10K cases a day Potential Limits Think about it Think about
  • 14. The maximum scheduled-path interviews per 24 hours is 250,000, or the number of user licenses in your org multiplied by 200, whichever is greater. Spring'21 Release Notes If the flow can be triggered by record updates with Time Source set to be based on a field value such as dueDate, and condition requirements are met, the scheduled path executes at that new time regardless of whether the scheduled path already executed. Salesforce Says… Think about it
  • 16. Schedule Triggered Flow vs Time-based Actions Entry Criteria Entry Criteria Logic Entry Criteria 21 Sep 1:00 am 20 Sep 1:00 am 22 Sep 1:00 am Logic Logic Record Record Record Record Record Record Record Schedule Triggered Flow Record Record
  • 17. Schedule Triggered Flow vs Time-based Actions Entry Criteria “ Time Offset “ Entry Criteria Logic Entry Criteria 21 Sep 1:00 am 20 Sep 1:00 am 22 Sep 1:00 am Logic Logic Record Record Record Record Record Record Record Schedule Triggered Flow the Concept of Time-based Action Record Record Record Record 5 Days since last update 16 Sep 1:00 am
  • 18. Entry Criteria Time Offset Logic Last Modified Date earlier than TODAY - 5 Days Open Cases AND Reminder not sent Email Alert to Case Owner + Set Reminder Flag Every day Retrieve number of days from Custom metadata Type Variant A: Time offset inside the logic Reminder Sent ←TRUE Set flag to send only once
  • 19. Entry Criteria Logic Open Cases AND Owned by User AND Reminder not sent AND Reminder Date is Now (or earlier) Email Alert to Case Owner + Set Reminder Flag Every day Variant B: Time offset in Entry Criteria NOW() >= DF22_ReminderDate__c Case Overdue (Checkbox) =
  • 20. It Works! (With Any Object) Up to 250K records daily Variant A: More records processed - NO custom fields Variant B: Only required records - BUT +2 custom fields Advantages and Drawbacks Drawback Advantage Schedule Triggered Flow Record Triggered Flow with Scheduled Path - variant
  • 21. 3 Case Escalation Rules Case Escalation Rules
  • 22. Entry Criteria Time Offset Logic Age Over 5 Days (=120 Hours) Owner Type = User AND is NOT Closed Notify Case Owner Case Escalation Rules
  • 23. It Works! Out of the Box Works ONLY for Cases No Limits (not aware of any) Yay! or Nay? Drawback Advantage Case Escalation Rules Case Escalation Rules
  • 24. Often there is more than one approach Each one has advantages and trade-offs Be mindful about limits Use Scheduled Path for low record volume and short period Use Scheduled Flow for larger volume and longer period Always look for Out of the Box solutions Key Takeaways Think about it