DEV Community


Posted on • Updated on

MuleSoft SmartHotDesk


SmartHotDesk is an application that will help employees return to the office by booking them a desk via a voice command and then allocate them to the right desk, next to other team members.


During the pandemic employees adapted very well to working from home and this type of working has proven itself as beneficial for both employers and employees.

Now that we slowly move back to the office we see that the new norm is here to stay as an ever increasing number of companies choose to keep this flexible type of working and allow their employees to manage on their own when they want to work from the office.

Employees going to the office from 1 to 3 days per week is quite common and this in turn has pushed SMEs to move to smaller offices, cutting the high cost of unused office space.

This transition has also changed the way desks are allocated to employees, with hotdesking replacing the old model of individual owned desks.


In this newly formed landscape, we wanted to build a quick and effective hotdesk booking system which will allow employees to book a desk with minimal effort and combine it with an intelligent algorithm that will allocate desks to them in such a way that everyone will be sitting next to his team members.

This will cut the hassle of finding and booking a desk while at the same time the smart allocation could increase productivity, as teams working on the same project will sit and work together.

Solution using MuleSoft

We've used MuleSoft API-led connectivity to build a business flow that captures the intention of the employee to book a desk and an
intelligent algorithm which runs once per day and allocates desks to employees based on the team they belong to.

The intentions are captured with the help of Alexa and processed by MuleSoft, enriched with additional info pulled from other backend systems. After the algorithm allocates the desks, the employees are notified via an email.

Challenges we ran into

One of the main challenges was to convert the office blueprint in a format that would be usable by MuleSoft.

We've chosen to model the office in a NoSQL database (MongoDB) mainly because we consider the static nature of the office entity not ideal for a classic entity-relationship database.

Accomplishments that we're proud of

Within just one month from the inception of the idea, we were able to deliver an MVP of our application with 5 main features:

  • Get, via a voice command, the members of one's team that have booked a desk for a particular day.
  • Book, via a voice command, a desk for a particular day
  • Check, via a voice command, the status of the booking and the allocated desk number if the algorithm has run for that day
  • Cancel the booking, via a voice command
  • Allocation Algorithm, assinging desk to employees next to their team members and notifying them via email

Delivering the MVP so quickly was possible by levaraging MuleSoft API-led Connectivity and reusable Assets and APIs.

What's next for SmartHotDesk

Our intention is to apply this solution to our own company and manage the hotdesking process through it.

A few additions will be required to make it even more smart and easy to use:

  • Web Portal channel for employees that don't own an Alexa device.
  • Promote the Alexa Skill to Production and link it our organization's AD.
  • Supplementary features like "Book me a desk near a printer", "Book me a meeting room with a projector" etc
  • SMS notifications


API-led View

Image description

System APIs

RESTful System API which exposes Employees, Teams and Employements from the backend system. Resources are modeled to resemble closely Workday's entities even though we just use a Database for the hackathon. When the database will be replaced with Workday, the implementation of this API will be updated to use the Workday Connector.

RESTful System API which exposes Booking Requests, Desk Availability and Bookings. A MySQL database was used as the backend.

Office Plan
RESTful System API which exposes the office plan in JSON Format. The NoSQL database Mongo DB was used as the backend.

RESTful System API which works as an Email and SMS gateway.

Process APIs

Hotdesk Request
Process API which receives a booking request, checks if the request is valid and provides a response based on the availability. Consumes the system APIs shown in the API-led view.

Desk Allocation
Process API which is triggered by the Common Scheduler and executes the allocation algorithm. Consumes the system APIs shown in the API-led view.

Experience APIs

Alexa Hotdesk Booking
Experience API consumed by Alexa, routes the intents sent by Alexa
and transforms the request before sending it to Hotdesk Request Process API. The response received from the process API is again transform to Alexa format.


Common Scheduler
Common Scheduler can trigger jobs and maintain their state and history for 30 days.
(Accelerator Provided my MuleSoft: MuleSoft Accelerators - Common Scheduler

Backend Systems

HR System

Image description

Bookings Database

Image description

Office Plan

The office blueprint is stored in MongoDB as a JSON document (you can find it the source code). For better understanding you can see the following 3D floor plans

Room 1
Image description

Room 2
Image description

Room 3
Image description

To set up a MongoDB cloud instance:
We've used MongoDB Atlas cloud service and created a new project "Smart Hotdesking" which was then deployed to AWS us-east-1 region.

This project has only one database, hotdesking, and only one user hotdeskUser. For the purpose of the hackathon we are connecting with basic authentication (username-password). No additional security measures have been applied, like IP whitelisting etc.


Developer account for Alexa:

  1. Create a new custom skill with 4 Intents Image description

Image description

  1. Update the Code (source code is provided in our public repo).

  2. Before you can test from the Test Console enable the Email Permission (this email is sent to MuleSoft to indentify the employee)
    Image description

No additional security measures have been applied for the scope of the hackathon.

Use Cases

Get Team Member's Bookings Use Case

Sequence Diagram:
Image description

Alexa Sample Dialog:
Image description

Book a Desk Use Case

Sequence Diagram:
Image description

Alexa Sample Dialog:
Image description

Check Booking Status Use Case

Sequence Diagram:
Image description

Alexa Sample Dialog:
Image description

Cancel Booking Use Case

Sequence Diagram:
Image description

Alexa Sample Dialog:
Image description

Allocation Algorithm Use Case

Sequence Diagram:
Image description

Email Notification Sample:
Image description


GitHub Repo

Top comments (0)