SlideShare a Scribd company logo
1 of 20
Optimizing Offline Data
Synchronization for Mobile Apps
Teodoro Alonso (Ted), salesforce.com, Technical Solutions Architect
@tgalonso
Safe harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results
expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be
deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any
statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new
functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our
operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any
litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our
relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of
our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to
larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is
included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent
fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor
Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently
available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions
based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these
forward-looking statements.
Teodoro Alonso (Ted)
Technical Solutions Architect
@tgalonso
Introduction
•By a show of hands, for those of you have implemented a mobile
application that uses Salesforce data offline?
•How many of you think that you accomplished your initial goals for
the mobile app?
•What prevented you from achieving the goals that you set for your
mobile application?
Goal
• Present a set of Good Practices and Design Patterns that
help Optimize Mobile Data Synchronization.
• Describe common pitfalls to avoid when dealing with sync
Why is Mobile Data Synchronization so difficult to
implement?
•

Too much Data to synchronize in a reasonable amount of time.
•

•

Users dread using the App

Unreliable or slow connectivity can cause:
•
•

•

Unreliable synchronizations
Synchronization that “never ends”

Complex Salesforce Data Model results in:
•

Slow or impossible queries.

•

Failed queries due to governor limits
McGraw-Hill Education Artemis Video

Artemis Movie
McGraw-Hill Education Artemis Application Goals
•

Eliminate the need to carry around a laptop on campus to access multiple
apps via browser

•

Make the sales rep more efficient while on campus and also reduce postcampus work

•

Improve data quality and completeness in Salesforce, resulting in
improved analytics

•

Implement common processes to bring new reps up to speed faster
McGraw-Hill Education Artemis Application
•

Business Use Case 1: Provide Sales Reps with a Mobile Application to
help them sell products to Campus Professors by enabling them to identify
the most important opportunities tied to different professors and allow them
to plan these meetings using a daily plan while online or offline

•

Business Use Case 2: Provide Sales Reps with a way to update the
opportunities, keep notes, create sample orders and update contact data
online and offline.

•

Business Use Case 3: Provide Sales Reps with a way to update to show
the targeted product based on the courses that the Professor teaches
opportunities online and offline.
Architecture of the Artemis
McGraw-Hill Education App
Artemis User

UIWebView
MHU, Addesses

Commands

Frontdoor.jsp

MHHE Users
SFDC URL
SessionID

Commands
SessionID

VF Pages

SessionID
OAuth 2.0
MHHE
Objects

SFDC CRM Library
SFDC CRM Library

Accounts, Contacts,
Opportunitites,
Products, Addresses,
Samples, etc.

SFDC1 Platform
Identity

Connected Apps

Access
Token

RESTframework
Sync Engine

Sync

Access/Refresh
Tokens
SFDC Rest API
SFDC1 Platform
RestKit

MHHE Objects

MHHE Objects

Artemis App
Design Pattern 1: “They don’t need all the data”
The users don’t need “all the data” and you should identify the precious little
data items that are truly required.
Characterize the user’s need for Salesforce data
•

Do ride alongs to identify the data that the user’s need in a sales call
•

•

Identify the tasks that the users do and define what tasks have the need for offline data.

Talk to their managers about what are the goals of the users and what data needs to be collected offline.
•

Orders, Proposals, Contact, Account, Opportunities account creation/update

•

For the updated records, do you need more than the owned records?
Design Pattern 1: Persona Example
Design Pattern 1: “They don’t need all the data” -cont
Synchronization Worksheet

Object
Synchronization
Data Filter

Account
To App
MHHE Mobile Sync
Flag = True

Fields

Dependency

Id
Name
Phone
Shipping Address

Address, Contact,
Case

Do a test “Data Pull” using the Data Loader to estimate the data payload size.
.
Design Pattern 2: Reduce the number of objects by
flattening the data model
Move one or two fields from a parent to a child in a lookup relationship using
formula fields to avoid having to synchronize the parent object.
Reduces the number of different objects and fields to transfer.
Reduces reference resolution post sync
Account
Id
Account Owner : Lookup (User)
...
AccountOwner Name: Formula (Owner.FirstName + ' ' +
Owner.LastName)
...

User
Id
...
FirstName
LastName
...
Design Pattern 3: Let Salesforce help Sync Objects
• Add the Mobile_Sync_Flag to the objects to be synchronized. Can be a
Formula field or Set by batch Apex processes (Preferred).
•

Sync those records WHERE Mobile_Sync_Flag = true

•

Much more simple query

• This technique can also be used to do Pseudo-OR id queries:
•

For example, if we can to pull all the Addresses for all the Contacts OR Accounts already
downloaded to the Mobile App. We can specify the following WHERE clause:
((MHHE_Contact_Flag__c = true AND Contact__r.MHHE_Mobile_Sync_Flag__c = true) OR
(MHHE_Account_Flag__c = true AND Account__r.MHHE_Mobile_Sync_Flag__c = true))
Design Anti-Pattern 1: The User Knows How to
Resolve Conflicts
• Pop a modal dialog and ask the user to resolve Synchronization Conflicts.
• Stops the sync completion
• Potentially error prone user interface.
• Does the user have the knowledge to make the correct choices?
• This Anti-Pattern results in a complex user interface with the potential for
corrupt data.
Design Pattern 4: Take the Last Version Unless
Salesforce Says Otherwise
• Identify all the objects that will have bidirectional synchronization
• Determines the potential conflict objects
• Will a Last Modified Record Strategy work for all cases?
•

If so, implement this strategy.

•

Assumes that the field value verification can be done locally (Mobile or Salesforce)

• Do you need Salesforce to verify the fields in the mobile originated record?
•

Implement a “Before Insert” “Before Update” trigger in Salesforce that identifies the
incoming Mobile records and verifies and cleanses the fields as necessary

•

Have the Mobile re-Read the Upserted records to insure that it has the cleansed fields
Conclusion
Don’t just push data to a mobile just because they might need it someday.
Carefully select the objects and records that the user absolutely requires
Determine the sync direction for the objects and decide on what to do for
bidirectional sync conflicts.
Simplify the data you send to a mobile to speed up processing post download
Only pull the fields that you need from an object or their parent object
Don’t allocate all the synchronization work on the client
Leverage Salesforce formula fields and batch processes to preselect the
data to be synchronized.
Ted Alonso

Steve Deren

Technical Solutions Architect,
@tgalonso

Senior Technical Consultant
Offline Data Sync for Mobile Apps

More Related Content

What's hot

IBM Forms Experience Builder - Web Form Apps for Marketers
IBM Forms Experience Builder - Web Form Apps for MarketersIBM Forms Experience Builder - Web Form Apps for Marketers
IBM Forms Experience Builder - Web Form Apps for Marketersmlech23
 
Office Share Point Server 2007 Product Guide
Office Share Point Server 2007 Product GuideOffice Share Point Server 2007 Product Guide
Office Share Point Server 2007 Product GuideUGAIA
 
KanhaSoft Web & Mobile Portfolio
KanhaSoft Web & Mobile PortfolioKanhaSoft Web & Mobile Portfolio
KanhaSoft Web & Mobile PortfolioPradeep Thomas
 
Share Point Ax
Share Point AxShare Point Ax
Share Point AxPeter1020
 
Expert Hour: Salesforce integration tools - why, what & how?
Expert Hour:  Salesforce integration tools - why, what & how?Expert Hour:  Salesforce integration tools - why, what & how?
Expert Hour: Salesforce integration tools - why, what & how?Geraldine Gray
 
Horton, kathy SFDC Consultant resume
Horton, kathy SFDC Consultant resumeHorton, kathy SFDC Consultant resume
Horton, kathy SFDC Consultant resumeKathy Horton
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudJohn Stevenson
 
Ad402 create self-service apps in minutes with ibm forms experience builder
Ad402   create self-service apps in minutes with ibm forms experience builderAd402   create self-service apps in minutes with ibm forms experience builder
Ad402 create self-service apps in minutes with ibm forms experience buildermlech23
 
IBM Forms Experience Builder v8.6
IBM Forms Experience Builder v8.6IBM Forms Experience Builder v8.6
IBM Forms Experience Builder v8.6mlech23
 
Salesforce Platform Keynote - Dreamforce 2012 - 9/18
Salesforce Platform Keynote - Dreamforce 2012 - 9/18Salesforce Platform Keynote - Dreamforce 2012 - 9/18
Salesforce Platform Keynote - Dreamforce 2012 - 9/18Salesforce Partners
 
Reshape your digital transformation strategy using low code platforms
Reshape your digital transformation strategy using low code platformsReshape your digital transformation strategy using low code platforms
Reshape your digital transformation strategy using low code platformsEnterprise Bot
 
Salesforce didyouknow
Salesforce didyouknowSalesforce didyouknow
Salesforce didyouknowChris Cranis
 
Business model innovation in the cloud v1
Business model innovation in the cloud v1Business model innovation in the cloud v1
Business model innovation in the cloud v1Michael Netzley, Ph.D.
 
How to Solve the Biggest Problems with Salesforce Training
How to Solve the Biggest Problems with Salesforce TrainingHow to Solve the Biggest Problems with Salesforce Training
How to Solve the Biggest Problems with Salesforce Trainingbrainiate
 
8 rules of consolidation
8 rules of consolidation8 rules of consolidation
8 rules of consolidationPim Piepers
 
Appirio Lead Generation presentation on Salesforce
Appirio Lead Generation presentation on SalesforceAppirio Lead Generation presentation on Salesforce
Appirio Lead Generation presentation on SalesforceHemant Mishra
 
Recruitment Application full SRS developed in Salesforce.com
Recruitment Application full SRS developed in Salesforce.comRecruitment Application full SRS developed in Salesforce.com
Recruitment Application full SRS developed in Salesforce.comRavi Gupta
 

What's hot (20)

IBM Forms Experience Builder - Web Form Apps for Marketers
IBM Forms Experience Builder - Web Form Apps for MarketersIBM Forms Experience Builder - Web Form Apps for Marketers
IBM Forms Experience Builder - Web Form Apps for Marketers
 
Office Share Point Server 2007 Product Guide
Office Share Point Server 2007 Product GuideOffice Share Point Server 2007 Product Guide
Office Share Point Server 2007 Product Guide
 
KanhaSoft Web & Mobile Portfolio
KanhaSoft Web & Mobile PortfolioKanhaSoft Web & Mobile Portfolio
KanhaSoft Web & Mobile Portfolio
 
Share Point Ax
Share Point AxShare Point Ax
Share Point Ax
 
Expert Hour: Salesforce integration tools - why, what & how?
Expert Hour:  Salesforce integration tools - why, what & how?Expert Hour:  Salesforce integration tools - why, what & how?
Expert Hour: Salesforce integration tools - why, what & how?
 
Horton, kathy SFDC Consultant resume
Horton, kathy SFDC Consultant resumeHorton, kathy SFDC Consultant resume
Horton, kathy SFDC Consultant resume
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App Cloud
 
Ad402 create self-service apps in minutes with ibm forms experience builder
Ad402   create self-service apps in minutes with ibm forms experience builderAd402   create self-service apps in minutes with ibm forms experience builder
Ad402 create self-service apps in minutes with ibm forms experience builder
 
IBM Forms Experience Builder v8.6
IBM Forms Experience Builder v8.6IBM Forms Experience Builder v8.6
IBM Forms Experience Builder v8.6
 
Salesforce Platform Keynote - Dreamforce 2012 - 9/18
Salesforce Platform Keynote - Dreamforce 2012 - 9/18Salesforce Platform Keynote - Dreamforce 2012 - 9/18
Salesforce Platform Keynote - Dreamforce 2012 - 9/18
 
Reshape your digital transformation strategy using low code platforms
Reshape your digital transformation strategy using low code platformsReshape your digital transformation strategy using low code platforms
Reshape your digital transformation strategy using low code platforms
 
Salesforce didyouknow
Salesforce didyouknowSalesforce didyouknow
Salesforce didyouknow
 
Business model innovation in the cloud v1
Business model innovation in the cloud v1Business model innovation in the cloud v1
Business model innovation in the cloud v1
 
AA4_finalReport
AA4_finalReportAA4_finalReport
AA4_finalReport
 
Alert framework2021
Alert framework2021Alert framework2021
Alert framework2021
 
Salesforce overview
Salesforce overviewSalesforce overview
Salesforce overview
 
How to Solve the Biggest Problems with Salesforce Training
How to Solve the Biggest Problems with Salesforce TrainingHow to Solve the Biggest Problems with Salesforce Training
How to Solve the Biggest Problems with Salesforce Training
 
8 rules of consolidation
8 rules of consolidation8 rules of consolidation
8 rules of consolidation
 
Appirio Lead Generation presentation on Salesforce
Appirio Lead Generation presentation on SalesforceAppirio Lead Generation presentation on Salesforce
Appirio Lead Generation presentation on Salesforce
 
Recruitment Application full SRS developed in Salesforce.com
Recruitment Application full SRS developed in Salesforce.comRecruitment Application full SRS developed in Salesforce.com
Recruitment Application full SRS developed in Salesforce.com
 

Viewers also liked

Gasteizko irteera 2A - MELI
Gasteizko irteera 2A - MELIGasteizko irteera 2A - MELI
Gasteizko irteera 2A - MELIarbelar
 
Lyserødlørdag 2012
Lyserødlørdag 2012Lyserødlørdag 2012
Lyserødlørdag 2012Merethe Kepp
 
Maude’s life in pictures final-as PDF
Maude’s life in pictures final-as PDFMaude’s life in pictures final-as PDF
Maude’s life in pictures final-as PDFCatherine McLean
 
PROJECT FINAL PRESENTATION
PROJECT FINAL PRESENTATIONPROJECT FINAL PRESENTATION
PROJECT FINAL PRESENTATIONAntoine Fournier
 
Question Focus Recognition in Question Answering Systems
Question Focus Recognition in Question  Answering Systems Question Focus Recognition in Question  Answering Systems
Question Focus Recognition in Question Answering Systems Waheeb Ahmed
 
Gasteizko irteera 2B MARRUBI
Gasteizko irteera 2B MARRUBIGasteizko irteera 2B MARRUBI
Gasteizko irteera 2B MARRUBIarbelar
 
Коммуникации органов власти Алтайского края с населением (монография)
Коммуникации органов власти Алтайского края с населением (монография)Коммуникации органов власти Алтайского края с населением (монография)
Коммуникации органов власти Алтайского края с населением (монография)prasu1995
 
Oracle SPARC T5 M5 - Il parere di IDC
Oracle SPARC T5 M5 - Il parere di IDCOracle SPARC T5 M5 - Il parere di IDC
Oracle SPARC T5 M5 - Il parere di IDCFrancesco Del Buono
 
Инструмент для кладки кирпича
Инструмент для кладки кирпичаИнструмент для кладки кирпича
Инструмент для кладки кирпичаAl Maks
 
未來的工作在哪裡
未來的工作在哪裡未來的工作在哪裡
未來的工作在哪裡rita710
 
щебень
щебеньщебень
щебеньAl Maks
 
「開放式領導」第一章 掌控還管用嗎?
「開放式領導」第一章 掌控還管用嗎?「開放式領導」第一章 掌控還管用嗎?
「開放式領導」第一章 掌控還管用嗎?Douny Yang
 

Viewers also liked (20)

Contemporary issues 04 09-2014
Contemporary issues 04 09-2014Contemporary issues 04 09-2014
Contemporary issues 04 09-2014
 
Gasteizko irteera 2A - MELI
Gasteizko irteera 2A - MELIGasteizko irteera 2A - MELI
Gasteizko irteera 2A - MELI
 
Flyer
Flyer Flyer
Flyer
 
Lyserødlørdag 2012
Lyserødlørdag 2012Lyserødlørdag 2012
Lyserødlørdag 2012
 
Maude’s life in pictures final-as PDF
Maude’s life in pictures final-as PDFMaude’s life in pictures final-as PDF
Maude’s life in pictures final-as PDF
 
Oracle 11G- PLSQL
Oracle 11G- PLSQLOracle 11G- PLSQL
Oracle 11G- PLSQL
 
PROJECT FINAL PRESENTATION
PROJECT FINAL PRESENTATIONPROJECT FINAL PRESENTATION
PROJECT FINAL PRESENTATION
 
Question Focus Recognition in Question Answering Systems
Question Focus Recognition in Question  Answering Systems Question Focus Recognition in Question  Answering Systems
Question Focus Recognition in Question Answering Systems
 
Gasteizko irteera 2B MARRUBI
Gasteizko irteera 2B MARRUBIGasteizko irteera 2B MARRUBI
Gasteizko irteera 2B MARRUBI
 
Коммуникации органов власти Алтайского края с населением (монография)
Коммуникации органов власти Алтайского края с населением (монография)Коммуникации органов власти Алтайского края с населением (монография)
Коммуникации органов власти Алтайского края с населением (монография)
 
Kemahiran Komunikasi
Kemahiran KomunikasiKemahiran Komunikasi
Kemahiran Komunikasi
 
Daftarhadir&nilai statistik1314
Daftarhadir&nilai statistik1314Daftarhadir&nilai statistik1314
Daftarhadir&nilai statistik1314
 
Oracle SPARC T5 M5 - Il parere di IDC
Oracle SPARC T5 M5 - Il parere di IDCOracle SPARC T5 M5 - Il parere di IDC
Oracle SPARC T5 M5 - Il parere di IDC
 
Инструмент для кладки кирпича
Инструмент для кладки кирпичаИнструмент для кладки кирпича
Инструмент для кладки кирпича
 
未來的工作在哪裡
未來的工作在哪裡未來的工作在哪裡
未來的工作在哪裡
 
щебень
щебеньщебень
щебень
 
「開放式領導」第一章 掌控還管用嗎?
「開放式領導」第一章 掌控還管用嗎?「開放式領導」第一章 掌控還管用嗎?
「開放式領導」第一章 掌控還管用嗎?
 
Los sustantivos
Los sustantivosLos sustantivos
Los sustantivos
 
An approach for knowledge-driven product, process and resource mappings for a...
An approach for knowledge-driven product, process and resource mappings for a...An approach for knowledge-driven product, process and resource mappings for a...
An approach for knowledge-driven product, process and resource mappings for a...
 
Facebook Stats
Facebook StatsFacebook Stats
Facebook Stats
 

Similar to Offline Data Sync for Mobile Apps

Salesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeSalesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeJames Ward
 
Communities & Dreamforce Key Takeaways
Communities & Dreamforce Key TakeawaysCommunities & Dreamforce Key Takeaways
Communities & Dreamforce Key TakeawaysMagnet 360
 
Salesforce.com Mobile Dev Week Chicago DUG
Salesforce.com Mobile Dev Week Chicago DUGSalesforce.com Mobile Dev Week Chicago DUG
Salesforce.com Mobile Dev Week Chicago DUGTom Gersic
 
Platform session 1 Innovation on the salesforce platform - speed vs control
Platform session 1 Innovation on the salesforce platform - speed vs controlPlatform session 1 Innovation on the salesforce platform - speed vs control
Platform session 1 Innovation on the salesforce platform - speed vs controlSalesforce - Sweden, Denmark, Norway
 
Dreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesDreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesVincent Spehner
 
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Shell Black
 
Salesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroSalesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroJames Ward
 
Innovation Showcase: Top Public Sector Apps Built on Salesforce App Cloud
Innovation Showcase: Top Public Sector Apps Built on Salesforce App CloudInnovation Showcase: Top Public Sector Apps Built on Salesforce App Cloud
Innovation Showcase: Top Public Sector Apps Built on Salesforce App CloudDreamforce
 
Scaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudScaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudSalesforce Developers
 
Champion Productivity with Service Cloud
Champion Productivity with Service CloudChampion Productivity with Service Cloud
Champion Productivity with Service CloudSalesforce Admins
 
Mobile AppExchange in the Field Great Apps at Work
Mobile AppExchange in the Field Great Apps at WorkMobile AppExchange in the Field Great Apps at Work
Mobile AppExchange in the Field Great Apps at Workdreamforce2006
 
Modev presentation
Modev presentationModev presentation
Modev presentationRyan Upton
 
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)Salesforce Partners
 
Developers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformDevelopers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformJohn Stevenson
 
AppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowAppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowCodeScience
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce IntegrationJoshua Hoskins
 
Faster In The Cloud
Faster In The CloudFaster In The Cloud
Faster In The CloudPeter Coffee
 
Turbocharging AppExchange
Turbocharging AppExchangeTurbocharging AppExchange
Turbocharging AppExchangedreamforce2006
 
Developer Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformDeveloper Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformSalesforce Deutschland
 
Process Automation Showdown Session 2
Process Automation Showdown Session 2Process Automation Showdown Session 2
Process Automation Showdown Session 2Michael Gill
 

Similar to Offline Data Sync for Mobile Apps (20)

Salesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeSalesforce Campus Tour - Declarative
Salesforce Campus Tour - Declarative
 
Communities & Dreamforce Key Takeaways
Communities & Dreamforce Key TakeawaysCommunities & Dreamforce Key Takeaways
Communities & Dreamforce Key Takeaways
 
Salesforce.com Mobile Dev Week Chicago DUG
Salesforce.com Mobile Dev Week Chicago DUGSalesforce.com Mobile Dev Week Chicago DUG
Salesforce.com Mobile Dev Week Chicago DUG
 
Platform session 1 Innovation on the salesforce platform - speed vs control
Platform session 1 Innovation on the salesforce platform - speed vs controlPlatform session 1 Innovation on the salesforce platform - speed vs control
Platform session 1 Innovation on the salesforce platform - speed vs control
 
Dreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesDreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use cases
 
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
 
Salesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroSalesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer Intro
 
Innovation Showcase: Top Public Sector Apps Built on Salesforce App Cloud
Innovation Showcase: Top Public Sector Apps Built on Salesforce App CloudInnovation Showcase: Top Public Sector Apps Built on Salesforce App Cloud
Innovation Showcase: Top Public Sector Apps Built on Salesforce App Cloud
 
Scaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudScaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing Cloud
 
Champion Productivity with Service Cloud
Champion Productivity with Service CloudChampion Productivity with Service Cloud
Champion Productivity with Service Cloud
 
Mobile AppExchange in the Field Great Apps at Work
Mobile AppExchange in the Field Great Apps at WorkMobile AppExchange in the Field Great Apps at Work
Mobile AppExchange in the Field Great Apps at Work
 
Modev presentation
Modev presentationModev presentation
Modev presentation
 
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)
An ISVs Guide to Building Creative, Next-Gen Apps (October 15, 2014)
 
Developers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformDevelopers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 Platform
 
AppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowAppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should Know
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Faster In The Cloud
Faster In The CloudFaster In The Cloud
Faster In The Cloud
 
Turbocharging AppExchange
Turbocharging AppExchangeTurbocharging AppExchange
Turbocharging AppExchange
 
Developer Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformDeveloper Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 Platform
 
Process Automation Showdown Session 2
Process Automation Showdown Session 2Process Automation Showdown Session 2
Process Automation Showdown Session 2
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
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
 
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
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
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
 
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
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
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
 

Offline Data Sync for Mobile Apps

  • 1. Optimizing Offline Data Synchronization for Mobile Apps Teodoro Alonso (Ted), salesforce.com, Technical Solutions Architect @tgalonso
  • 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Teodoro Alonso (Ted) Technical Solutions Architect @tgalonso
  • 4. Introduction •By a show of hands, for those of you have implemented a mobile application that uses Salesforce data offline? •How many of you think that you accomplished your initial goals for the mobile app? •What prevented you from achieving the goals that you set for your mobile application?
  • 5. Goal • Present a set of Good Practices and Design Patterns that help Optimize Mobile Data Synchronization. • Describe common pitfalls to avoid when dealing with sync
  • 6. Why is Mobile Data Synchronization so difficult to implement? • Too much Data to synchronize in a reasonable amount of time. • • Users dread using the App Unreliable or slow connectivity can cause: • • • Unreliable synchronizations Synchronization that “never ends” Complex Salesforce Data Model results in: • Slow or impossible queries. • Failed queries due to governor limits
  • 7. McGraw-Hill Education Artemis Video Artemis Movie
  • 8. McGraw-Hill Education Artemis Application Goals • Eliminate the need to carry around a laptop on campus to access multiple apps via browser • Make the sales rep more efficient while on campus and also reduce postcampus work • Improve data quality and completeness in Salesforce, resulting in improved analytics • Implement common processes to bring new reps up to speed faster
  • 9. McGraw-Hill Education Artemis Application • Business Use Case 1: Provide Sales Reps with a Mobile Application to help them sell products to Campus Professors by enabling them to identify the most important opportunities tied to different professors and allow them to plan these meetings using a daily plan while online or offline • Business Use Case 2: Provide Sales Reps with a way to update the opportunities, keep notes, create sample orders and update contact data online and offline. • Business Use Case 3: Provide Sales Reps with a way to update to show the targeted product based on the courses that the Professor teaches opportunities online and offline.
  • 10. Architecture of the Artemis McGraw-Hill Education App Artemis User UIWebView MHU, Addesses Commands Frontdoor.jsp MHHE Users SFDC URL SessionID Commands SessionID VF Pages SessionID OAuth 2.0 MHHE Objects SFDC CRM Library SFDC CRM Library Accounts, Contacts, Opportunitites, Products, Addresses, Samples, etc. SFDC1 Platform Identity Connected Apps Access Token RESTframework Sync Engine Sync Access/Refresh Tokens SFDC Rest API SFDC1 Platform RestKit MHHE Objects MHHE Objects Artemis App
  • 11. Design Pattern 1: “They don’t need all the data” The users don’t need “all the data” and you should identify the precious little data items that are truly required. Characterize the user’s need for Salesforce data • Do ride alongs to identify the data that the user’s need in a sales call • • Identify the tasks that the users do and define what tasks have the need for offline data. Talk to their managers about what are the goals of the users and what data needs to be collected offline. • Orders, Proposals, Contact, Account, Opportunities account creation/update • For the updated records, do you need more than the owned records?
  • 12. Design Pattern 1: Persona Example
  • 13. Design Pattern 1: “They don’t need all the data” -cont Synchronization Worksheet Object Synchronization Data Filter Account To App MHHE Mobile Sync Flag = True Fields Dependency Id Name Phone Shipping Address Address, Contact, Case Do a test “Data Pull” using the Data Loader to estimate the data payload size. .
  • 14. Design Pattern 2: Reduce the number of objects by flattening the data model Move one or two fields from a parent to a child in a lookup relationship using formula fields to avoid having to synchronize the parent object. Reduces the number of different objects and fields to transfer. Reduces reference resolution post sync Account Id Account Owner : Lookup (User) ... AccountOwner Name: Formula (Owner.FirstName + ' ' + Owner.LastName) ... User Id ... FirstName LastName ...
  • 15. Design Pattern 3: Let Salesforce help Sync Objects • Add the Mobile_Sync_Flag to the objects to be synchronized. Can be a Formula field or Set by batch Apex processes (Preferred). • Sync those records WHERE Mobile_Sync_Flag = true • Much more simple query • This technique can also be used to do Pseudo-OR id queries: • For example, if we can to pull all the Addresses for all the Contacts OR Accounts already downloaded to the Mobile App. We can specify the following WHERE clause: ((MHHE_Contact_Flag__c = true AND Contact__r.MHHE_Mobile_Sync_Flag__c = true) OR (MHHE_Account_Flag__c = true AND Account__r.MHHE_Mobile_Sync_Flag__c = true))
  • 16. Design Anti-Pattern 1: The User Knows How to Resolve Conflicts • Pop a modal dialog and ask the user to resolve Synchronization Conflicts. • Stops the sync completion • Potentially error prone user interface. • Does the user have the knowledge to make the correct choices? • This Anti-Pattern results in a complex user interface with the potential for corrupt data.
  • 17. Design Pattern 4: Take the Last Version Unless Salesforce Says Otherwise • Identify all the objects that will have bidirectional synchronization • Determines the potential conflict objects • Will a Last Modified Record Strategy work for all cases? • If so, implement this strategy. • Assumes that the field value verification can be done locally (Mobile or Salesforce) • Do you need Salesforce to verify the fields in the mobile originated record? • Implement a “Before Insert” “Before Update” trigger in Salesforce that identifies the incoming Mobile records and verifies and cleanses the fields as necessary • Have the Mobile re-Read the Upserted records to insure that it has the cleansed fields
  • 18. Conclusion Don’t just push data to a mobile just because they might need it someday. Carefully select the objects and records that the user absolutely requires Determine the sync direction for the objects and decide on what to do for bidirectional sync conflicts. Simplify the data you send to a mobile to speed up processing post download Only pull the fields that you need from an object or their parent object Don’t allocate all the synchronization work on the client Leverage Salesforce formula fields and batch processes to preselect the data to be synchronized.
  • 19. Ted Alonso Steve Deren Technical Solutions Architect, @tgalonso Senior Technical Consultant

Editor's Notes

  1. Describe the architecture of a Mobile App with offline storage
  2. Describe each of the fields and their purpose