Calendar collapsed behavior dispatcher workspaceNote : Group / Territory are used interchangeably and they both mean the same in the context of this article What is collapsed mode ? With the default behavior dispatcher workspace fetches all the groups and resources belonging to those groups as the page loads. With this approach if a particular dispatcher has 100+ groups and 1000+ resources in those groups all this data is fetched as soon as page loads. This may cause the databroker that fetches the data to take a long time and sometimes even to timeout completely. This causes the application to never move past the loading state.In order to avoid this we introduced collapse mode. This mode only fetches the first group and first X resources within that group. (X = number of resources controlled via sn_fsm_disp_wrkspc.dispatcher_workspace.calendar_resources_page_size, default 15)This also means that we are able to now load all the other groups that the dispatcher dispatches across their group, but they are in a "collapsed" fashion and need expanding in order to load resources within them.This leads to an enhancement in usability where earlier a dispatcher had to click "Show more" multiple times to even get to the group that they actually want to dispatch where as now its possible with only 1 click as all groups are visible to dispatcher. Version availability Instance version: Xanadu Scoped application version: FSM Configurable Dispatcher Workspace, version 26 and onwards Upgrade customers / Existing installations This is a behavior change in a way the dispatcher workspace is used currently hence we turn it on for new installations of the application but it is off for upgrade customersIn order to turn this behavior on for upgrade customer we need to create a boolean system property "sn_fsm_disp_wrkspc.calendarCollapsedBehavior" in FSM Configurable Dispatcher Workspace scope and set it to true Behavior changes with examples of collapsed mode: Initial loadDate changeResource filterSearch resourcesLoad more resources OperationNon-Collapse modeCollapse modeInitial page load We have 3 groups present on the calendar and we load data for all 3 groups with all agents within the group for upto 15 resources (controlled via system property) We have 3 groups present and all three are loaded on page with the first group expanded but the others loaded as collapsed. The first group contains X resources (controlled via system property) and we show a load more beyond that per group levelOn expanding the next group, the resources + events in that particular group will be fetched from backend Date changeOn date change we lose all expanded groups and we reset back to loading first X resources across all groupsOn date change we lose all the expanded groups for that date and we reset back to the first group and expand it and load first X resources in that groupResource filter When agents across different groups are selected in resource filter we group them under a common header of "Agents" When agents across different groups are selected in resource filter we show them in their own groups Search resourcesThe search resources in calendar behavior same as resource filter where we show everything under a common headerThe search resources in calendar behavior same as resource filter where we group resources in their own groupsLoad more resources Beyond the page size we show a load more at the bottom of the calendar that loads next 15 resources across all groups and not just the current group Beyond the page size we show a load more inside every group. Page size is controlled via sn_fsm_disp_wrkspc.dispatcher_workspace.calendar_resources_page_size, default 15 system property When we have only selected 1 group in the group filter for collapse mode we fall back to the load more behavior of non - collapse mode and we can leverage infinite scrolling there. Refer screenshot below : Benefits of collapse mode Better performanceEasily getting to the group you want with 1 click instead of hitting load more multiple times Performance tests with collapse mode (Territory data model + Work for optimization) Following was the total data on the instance that was used to test performance: Types of data in the systemNumber of recordsWork order tasks5.9 millionUsers1.5 millionWork, Break, Training events8.5 millionTime-off events9.8 million Total data actually loaded on dispatcher workspace on page load: 25 territories selected as default for dispatcher, with each territory containing 60+ technicians.Default view when loading the page is the "Day" viewPage load, brings in 30 technicians from the first territory along with the technician's work schedules, work order tasks and break / time-off / training eventsSince territory contains more than 30 technicians a "load more" is present inside the territoryLoad more operation will loads the next set of 30 technicians along with their schedules, events, tasks etcEach technician has 3 to 5 work order tasks assigned for the day (visible on the calendar)1 training event2 breaks1 time off event Based on this load, following was the total time taken for the given scenarios in Xanadu Please note that without the collapse mode property on, with this amount of data load, the page wont even load and be stuck on spinning wheel