In any software, there are limits as to how much data can be stored. For Youreka customers, data storage needs to be managed in both the Salesforce Org as well as on the field users’ devices to maintain maximum performance of the Youreka App. Failure to manage data will result in User dissatisfaction and even the inability to complete Forms. If devices are bogged down with too much data, Synching and Prepping For Offline can take an exceedingly long time, or even timeout. Within Salesforce, it is essential to plan for data archival so that the Org does not exceed its storage limits. If storage is nearing limits, Platform Teams may start to see row locks in custom code or audits may reveal that Youreka data is consuming an unusual amount of space.
Luckily, we have created a series of Best Practices for Data Storage to help keep our customers out of trouble. These guidelines will help you manage and limit the data you are pushing to users' devices for offline work and will also help you manage your form data within Salesforce.
Just in Time Form Creation
Youreka offers flexibility when it comes to the creation of Forms, and when it should be done. We recommend that Forms not be created too far in advance from when the work will actually be done. When Forms are created too far in advance, they will take up storage space in your Salesforce org and potentially clog the User’s device with Forms they will not work on for weeks or months. Forms created too far in advance may also end up having “stale data” in Linked Sections with inherited records. Once a Form is created, the inherited records in a linked section will not refresh from SF into the Form. Lastly, too many unlocked Forms can cause issues in nightly batch jobs that Youreka runs. One function of the batch job is to update unlocked Forms with data that may have been updated in Salesforce during the previous 24 hours. The Youreka batch can run for an exceedingly long time and even encounter row locks if there are too many unlocked Forms to update.
Having a lot of Forms on a device can slow down the User’s mobile performance and cause confusion if the User isn’t sure what Forms to work on that day. Here are some better approaches to Form Creation:
- Ad-Hoc Forms
Allow your Users to create the Forms they need “on the fly.” This means the User is responsible for creating their Forms at the time they are needed. - Automated Form Creation
Custom Salesforce automation can be used to determine when to create Forms. For example, if there is an associated Work Order, the Status of the Work Order or the Start Date of the Work Order can drive automation of the Form creation. Flows or Apex can use the Status or a Start Date as the trigger to create Forms, so that Forms are created very close to the time of the work being done.
Form Lifecycle
Each Form has a Lifecycle that is defined by parameters set at the Form Template level. The Lifecycle is defined by the Form Status - New, In Progress, Submitted, Locked, and Archived. A Form moves from New to In Progress, then Submitted based on the User’s actions. But moving a Form from Submitted to Locked, and Locked to Archived, can be controlled within the Template, and will apply to all the Forms that were created with that Template.
It’s critical to have a strategy to move Forms from Submitted to Locked to save your mobile Users and your Salesforce org from avoidable performance issues. Not defining this part of the Form Lifecycle can impact performance for the mobile User, and negatively impact storage and performance in the SF org. Forms in a Submitted status remain on the Users’ devices, and can cause a pile up of Forms that impact mobile performance as well as make it hard to navigate the mobile app.
Locking a form automatically removes the Form from the User’s device and it also moves the Form to a read-only state. If User’s Forms stay unlocked in Submitted status, they will remain mobile available, and will clog up the User’s device with unnecessary data that could impact performance.
Moving Forms from Locked to Archived will help save storage in Salesforce itself. When a Form is Archived, all of the Answers for the Form are compressed to a few fields. This reduces the storage consumed by the Form immensely, as the bulk of data consumption is from the Form’s Answers. The Form can still be viewed by Salesforce Users, but the Answers are no longer stored as individual records. However, with the click of a button, the Archived Form can be restored to its Locked version, or even unlocked to be editable again. Archiving merely compresses all the Answers in the Form into a single string and deletes the Answer records. Unarchiving a Form will restore all the Answer records and enable editing again.
Stale or Abandoned Forms
Sometimes Forms are created and never Submitted, either accidentally or perhaps due to change in scope. Regardless of the reason, it can be helpful to have a repeatable process to review what could be considered Stale, Abandoned, or Aging Forms to determine if a clean up is needed. Too many Stale or Abandoned Forms can negatively impact both the Users mobile performance as well as data storage in Salesforce.
Business rules and logic will need to be applied when performing analysis for Stale Forms. For example, in some cases a Form in New status and created more than one month ago may be considered Stale, because the Forms are expected to be Submitted on the same day they are created. In other cases, the Form might be expected to be in New status for up to 3 weeks before it moves to In Progress. Other examples of Stale Forms might be Forms created Ad-Hoc by the User, but never completed or Forms associated to a Work Order that has since been cancelled..
Consider creating a set of Reports in Salesforce that will summarize Form Status and Age, so that analysis can be performed to determine if clean up is needed. Engage your Business Partners to determine what can and cannot be deleted, and if any new business processes can be developed to help avoid Stale Forms.
Salesforce Data Storage
Monitoring the Data Storage usage in your SF org is a healthy habit. Specifically, keep an eye on the following:
- Answers object
When it comes to Youreka specific data storage, the Answers object will normally consume more data than other Youreka objects. If the Answers object data storage is growing faster than expected, make sure you have an Form Archival process in place. Archiving will compress a Form’s Answers into a single record while still allowing the Forms to be viewed in SF. - Other Objects used by Mobile Settings
Monitor the volume of data as it pertains to Mobile Cards and Offline Object priming. If the number of records that are in the SF org is too large to sync to a User’s device, use selective queries/filters to minimize the records being pushed to devices.
Mobile Settings
Optimizing Users’ mobile performance includes applying selective queries to objects needed when working in the Youreka Mobile App. This is necessary for several reasons:
- It allows for custom filtering based on User Profiles.
- It limits the data being pushed to the device, syncing on what is needed for that work day.
- It filters records being prepped for Offline Use.
Primary Object Filtering is to be used when Mobile Cards are enabled for a Mobile Setting. If no filter is added, the User will have all records they have access to synced to their device. The sheer number of records could cause the sync to time out and impede performance in the mobile app. Add a filter that uses a selective query - for example, filtering on Status, Scheduled Start Date, or another indexed field on the object.
The same logic should be applied when configuring Objects for Offline. Prepping records for an entire object might slow down the prep time or even cause the prep to timeout. Use selective queries to narrow down the number of records being prepped. Make sure to only prep data needed for the User to complete work that day, Audit the Objects being prepped to make sure you are only prepping data that is needed for Lookups within the Forms.
Need more help establishing Data Storage Best Practices?
Contact your CSM and/or TAM
Comments
0 comments
Please sign in to leave a comment.