Digitalizing Customer Experience in Four Weeks with Dutch Railways

Dutch Railways (Nederlandse Spoorwegen [NS]) is the foremost passenger railway operator in the Netherlands. Since its founding in 1938, NS has been a reliable resource for commuters and passengers in the Netherlands. In 2019, NS trains carried an average of 750,000 unique passengers on 1.3 million rides every single day, generating revenues of €3.2 billion. Additionally, NS is one of the largest employers in the Netherlands with approximately 20,000 employees in 2019.

However, facing the COVID pandemic, NS faced the issue of heavily decreased ridership and had to quickly assuage the concerns of their passenger base. Ivo Sturm, Mendix MVP, and Jitze de Groote, Mendix Developer from First Technology, a Mendix Trusted Partner, outlined NS’ journey at Mendix World 2021.

Meeting evolving demands

During the early parts of the COVID pandemic, NS’ ridership dropped to 10% of the previous year’s levels. On top of that, social distancing mandated less crowded trains to maintain passenger safety.

Decline in passengers

Prior to the pandemic, NS didn’t have a seat reservation system, necessary to ensuring passengers could be seated in a distanced manner. Complicating the task, NS’ existing crowd indicators were based on historical data, and “we needed capacity, the capacity on a specific train of the timetable, and we needed the availability of the train on that specific moment,” said De Groote. In other words, the mission statement was to create “a digital solution [that] enables the passenger to make the journey as safe and pleasant as possible.”

The team faced several other challenges. Due to the fluidity of public health guidelines during the pandemic, NS was seeing regulatory changes roughly every two weeks, which meant that both the app and the project needed to afford for constant change. Further, because of the critical nature of NS services, the team needed to architect for as much uptime as possible and afford for the likelihood of a customer base of up to a million users. Finally, any releases needed to have high accessibility standards to ensure that all passengers would be served.

This new customer experience needed to be released as quickly as possible. With the MVP slated to be usable in just four weeks, the teams at NS and First got to work.

Planning the route

Because of the importance of the project, the project team was quite large, with developers from First working alongside subject experts from NS’ communication, data, reporting, IT, and business teams.

To ensure productivity and efficiency, the team started with a design sprint. A design sprint would usually be a full five days, but, according to Sturm, “we did it in a pressure cooker kind of format with the Dutch Railways in two days only.” The first two days were design sessions with stakeholders and subject experts, with development beginning on day 3.

 

Starting development so early on such a large project could create myriad pitfalls, but the teams put several accelerators in place to help keep things running smoothly:

  • Mandates: Sturm said, “We need mandates from business, IT, and communications to make the right decisions and to make sure that we could meet the speed that we need.” Those early, high-level mandates allowed the development team to keep forging ahead.
  • Daily standups: The teams met twice daily to track progress and tasks. Those standups allowed for free and frequent communication.
  • Transparency: The daily standups also enabled a sense of transparency, critical for a large, cross-functional team.
  • Scrum Board: The teams relied on freely available scrum boards outlining tasks, alignment, and dependencies.

Finally, the teams integrated critical tasks, such as infrastructure, testing, and UX/UI, into the entire lifespan of the project, rather than at the end, ensuring what was built met NS’ high standards for quality and security without sacrificing speed.

A real-time digital customer experience

NS’ new customer portal, known as NS Treinwijzer (TrainWise) acts as a travel planner. Customers can enter the app and see real-time schedules and availability, informed by data from a planner API. Already available in the NS IT ecosystem, the API provides data to communicate open seats and bicycle spots for any given train. Customers can make a reservation and can then receive notifications about updates, schedule changes, and cancellations.

Due to the scale of NS’ customer base, the team decided to roll out the new customer portal on a five-part, community-based scale.

 

The first pilot consisted of 8,000 participants, and, as De Groote noted, “it really helped us as a team with finding functional bugs and also potential performance bottlenecks.” Participants were incentivized to give feedback with gifts of free coffee or a first-class upgrade on a future trip.

pilot community

The second step added the ability to reserve bicycle spots. “With this functionality, we could add more than 500 daily users day by day, enlarging the user base, and also giving us some more time to do performance testing and A/B testing,” related De Groote. Once the team was confident in the app’s performance, the third step was to release and communicate out to the general public.

promoting your apps

Step four was a focus on accessibility. The Mendix platform allowed an easy translation of the app into English for international and non-native customers. The team further used Web Content Accessibility Guidelines as a hierarchy on page colors and numbers, “so, this way, we were very easily recognizable for customers,” said De Groote. The team also partnered with the Eye Association Netherlands (Oogvereniging) to test the experience using screen readers. De Groote noted, “I can say that our application is usable with just a screen-reader and with your eyes closed, which is pretty cool.”

Finally, NS rolled out a promotion campaign, including social media, to build awareness and community around the new experience.

Even with a compressed timeline and huge expectations, the new application performed well at every step and provided both the development team and NS passengers with a revitalized experience and peace of mind.

Lessons learned

Because the NS project so heavily emphasized user interface and performance needs, the team at First tried some new approaches and ways of working.

For this project, the team used a “Nanoflow unless…” approach. De Groote described, “When you use a Nanoflow or Javascript action, you do everything client-side, and you will not bother the database and the runtime instances.” For NS, this can be seen in the train station search. All stations are retrieved at the start of the user session and a Javascript algorithm within the client helps autocomplete the search. This saves a lot of database interactions and increases performance.

Nanoflows

NS and First also implemented a data retention policy, meaning that their operational system saves just a few days of data at any given time. This makes data tables smaller and better-performing. This approach also ensures GDPR compliance.

To further improve performance, the team implemented a Content Management System (CMS) from the onset of the project. The CMS allowed the application to retrieve all dynamic content at the beginning of the session. On top of that, a CMS allowed for flexibility. “We needed to release sometimes before we knew the definitive content on that page,” De Groote said. “Now we were able to do that.”

Another tip is to save large XML strings as files, rather than as cells within data files. “Every second, we have to process multiple big XML strings of thousands of lines,” De Groote described. “When you store this in one data table, in one cell, it’s not going to be performing.” However, storing these strings in files and retrieving them on demand saves database interactions.

Save big XML strings as a file

Optimizing the workflow

The team also implemented a Mendix tool called Application Performance Diagnostics, which helped focus the group on the right pain points from the start. Sturm described, “What it tells you is one piece of logic is actually slow, but it also tells you how many times it got hit or it got used…so that you know the impact.”

application performance diagnostics

NS and First also embraced an agile methodology, including feature toggles. This allowed different development teams to work on different parts of the application without needing both sides to be ready at the same time. This idea was also used in A/B testing for different groups of customers, allowing for better insights into customer behaviors and the success of the application.

To cut down on database retrieves in any particular user session, the team also relied on a denormalized data model. Sturm described a normal relational data model, “It would be a registration. It could have many trips and each trip could have many legs as well, but obviously, those are separate objects.” With this in mind, the team combined many different databases into one flat table. This not only cuts down on the amount of data but also the number of retrieves needed for a customer, thus greatly improving performance.

data models

Finally, the team relied on queuing for notification management. As an example, when a customer registers on the application, they’ll receive a confirmation email but that happens in the background, separate from the user instance. Because of NS’ size, they needed a multi-instance application server setup, made possible by Mendix 9.

Protecting the community with a new digital experience

When the COVID lockdown hit the Netherlands, NS had to quickly find a way to assist customers in the new world. With an initial release in just 4 weeks, they were able to quickly meet this challenge and help customers get to where they need to be, whether work or home.

Presently, 260,000 users use Treinwijzer monthly, with 30,000 new registrations and 5,500 e-mails every single day. Overall train usage is still recovering from the pandemic, but NS is set up with a fresh, scalable solution that will be able to meet their needs for the foreseeable future. Looking back at the mission statement of making passengers feel safe, Sturm reflected, “If we look at where we are now with Treinwijzer, it’s a high-performing application.”