Scheduled offline caching

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Scheduled Offline Caching Considerations before Implementation

    Scheduled offline caching allows field technicians to receive timely updates to their offline data cache based on their work schedules. This functionality relies on the Agent Schedule plugin, which must be activated to enable configuration and scheduling of offline downloads.

    Show full answer Show less

    Key Features

    • Plugin Activation: Activate the Agent Schedule plugin [com.snc.agentschedule] to start using scheduled offline caching.
    • Work Schedules: Create work schedules for agents or technicians using the Agent Work Schedules [agentworkschedule] table to facilitate automatic offline cache updates.
    • Background Jobs: Scheduled jobs generate offline payloads based on the Agent Daily Schedules [agentdailyschedule] and can be tracked in the Events [sysevent] table.
    • System Properties: Configure key properties in the System Properties [sysproperties] table to manage scheduling and reminders for offline downloads.

    Key Outcomes

    By implementing scheduled offline caching, users can expect:

    • Automated updates to offline data, enhancing field service efficiency.
    • Notifications and reminders for maintaining up-to-date caches.
    • Management of payload sizes and refresh frequencies to optimize performance.

    Configure offline caching so your field technicians can receive scheduled updates to their offline data cache. Scheduled downloads are based on the user's work schedule.

    Activate the Agent Schedule plugin

    To enable and configure scheduled offline caching, the Agent Schedule plugin [com.snc.agent_schedule] must be activated. For details on plugin activation, see Activate a plugin.

    Create work schedules for offline caching

    For mobile clients other than Mobile Agent, ensure that an entry in Offline download schedule (sys_sg_offline_download_schedule) exists for the client type, for example, Request. This entry specifies the table that has the offline download schedules for the agents or technicians. Mobile uses the schedule from this table for scheduling offline cache generation. To populate schedules for each user, a scheduler script can be used like in Field Service Mobile.

    For Mobile Agent, the entry is created when the plugin is activated. After activating the plugin, you must create work schedules for the agents or technicians to enable users to automatically receive scheduled offline caches. This can be done directly through the Agent Work Schedules [agent_work_schedule] table. For more information on how to create schedules through this table, see Create a work schedule for an agent or technician.

    Based on the records from the Agent Work Schedules table, your instance runs background scheduled jobs that create schedules in the Agent Daily Schedules [agent_daily_schedule] table. Within these schedules, agents will receive a silent push sometime throughout their scheduled day.

    The offline payloads that your instance generates are based on the times recorded in the Agent Daily Schedules. These can be found in the Events [sysevent] table. Use the records in the Event table to track these payloads, and info about when they are created and when they are sent to the agents.

    Scheduled Jobs associated with offline caching

    These scheduled jobs are automatically scheduled for only users who enable background downloading on their app. For information on how users can enable this feature, see Offline mode for mobile.

    Populate Agents Daily Schedule Table
    This job runs once daily for all users with background downloading set to true.
    Scheduled Download of Offline Payload
    This job creates an event for the first payload of the day in the [mobile_offline_payload_gen_queue] table.

    Offline scheduling system properties

    Use the following properties on the System Properties [sys_properties] table to configure scheduled offline caching.

    Table 1. Offline scheduling system properties
    Property Description
    glide.sg.offline.scheduled_download.enabled

    Enables scheduled downloading for all Mobile Agent app users.

    glide.sg.offline.scheduled_download.cachesync_offset Determines when your instance starts payload generation prior to schedule. Value determines how many minutes before the user schedule payload generation begins.
    Note:
    Be sure not to set the value of this property earlier than your Mobile Offline Scheduling job is runs. Doing so will prevent offline payloads from being generated.
    glide.sg.offline.scheduled_download.reminder_offset Determines when your instance sends your users a daily reminder to manually download a cache. The instance sends this reminder only when there is no cache or the cache is expired. Value determines how many minutes before a user schedule your instance sends this reminder.
    glide.sg.offline_payload.refresh_frequency Determines refreshTimestamp frequency of payloads. Value represents this frequency in minutes The default value is 480.
    glide.sg.offline.attachment.max_total_bytes Determines the maximum size allocated for all attachments in a cache. Value is represented in Megabytes (MB). The maximum value is 2048 MB.

    For information on more offline related system properties, see, Configure offline mode behavior.