Companies want to know whether the customer liked the product or service, and what can be improved. Some interviewed consumers immediately after purchasing the service, whether they liked the taxi ride or delivery from the online store. It turns out the moment cut about the quality of service, but very common. Especially if there were no excesses. The service is rendered, the taxi driver got his five points, what else do you need?
For comprehensive testing attract mystery shoppers with pre-prepared scripts, questionnaires, voice recorders or special applications. But everything can be forgotten; a person with a voice recorder and a learned script can be easily deceived. In addition, finding and hiring these people costs money.
There is a nuance: our customer - S7 Airlines, and the service itself - the flight - is stretched in time. In principle, airfare in this regard, the service is not at all unique. Any transportation, journey, delivery also consist of several stages occurring one after another. And in each of these situations it is impossible to hope that the client will remember all the details and be able to tell about them in detail after the fact. We need something simple and in the moment before the person has yet forgotten.
')

This is how our application appeared for S7 Airlines passengers for
iOS and
Android , who want to help airlines become better. To do this, just download the application on your smartphone and go through all the polls that will appear there. Below we will describe in more detail how we determine whom to ask when, and at what moment.
How do users get the app
They receive a letter or sms with an invitation to become a secret passenger with a direct link to the application. Link made using
Deep Link technology. Due to this, when clicking on a link from a smartphone, the system determines for itself what kind of device it is - IOS or Android. Depending on this, the user is redirected to the App Store or Google Play to download the application. This link also contains the ticket number and the last name of the passenger. After installing the application, the user automatically logs in to the application with the data received from the deep link.
Thanks to this technology, the device already has all the necessary data for authorization. The ticket number and surname are forwarded from the link to the app.
Deep Link: server side and mobile development
When creating a survey, the server generates a short link, a deep link, with which the user will go to the appropriate app store and will be able to open the application with this link inside. The server part accepts the ticket number or reservation number and the last name of the passenger. A survey is generated on this basis. Information for the survey is in the database and set in advance. To create a poll, the server polls:
- flight schedule service to understand the time of departure and arrival
- booking service to understand what additional services the passenger has purchased,
- booking base to determine where the ticket was purchased.
All this information is compiled, and a large questionnaire is made.
To implement the deep link we used the technology
Firebase Dynamic Links . It provides a REST service for generating links, and also Sdk for handling links in a mobile application. Links are generated in two ways:
- manually via firebase console
- via Firebase deep link API, if you need to dynamically generate parameters for a deep link on your server. Since it is unstable, every second we try to generate a link, and if it does not work out, wait a second, and then resume attempts.
Attention, bug
During the development of the IOS application, there was a bug related to authorization. In Firebase IOS SDK from version 4.0.4 to version 4.8.1, when installing an application from the AppStore, the wrong bundle_id link came to some devices: // google / link /? Dismiss = 1 & is_weak_match = 1. Because of this, the user did not start authorization in the application. The problem was solved by updating the version of the Firebase framework.
After generating the link, we advise you to immediately verify the correctness of the transition scheme via deeplink, adding the GET parameter d = 1 to the end of the deep link. So you can check the correctness of the work deep link for mobile devices or browser.

What are we going to ask about?
According to the reservation number, the ticket and flight data are pulled out of the system, when and by which flight the passenger flies and which “package of services” has bought. After that, a questionnaire is created,
- tied to the services used by the passenger. (If the fare is with baggage, it means that it will be checked in. We are interested to learn about all the stages, so we will add a block of questions about the delivery and receipt of baggage to the person with baggage.)
- and by the time this service is provided - when and what to ask this passenger.
The diagram shows the general logic of how we link the opening of the question blocks to the “life cycle” of a flight:
The entire configuration of questions is downloaded along with the application as a single JSON file and is expanded into columns. Questions on later flight tapas are blocked so that the passenger does not answer all questions in advance.
As we inform, it is time to respondThe passenger passes the questionnaire before the flight, on the plane and after landing. We remind each block with local notifications. Pushes cannot be used, because most of the time the application will work in offline mode. Time is calculated from the time zone where the passenger is located; we take the information from the phone. All completed surveys are stored on the device and sent when connected to the network.
Routing in response processThe first section of questions appears the day before the flight - these are issues related to the purchase of tickets. Last - comes at the airport of arrival.
We build a graph of questions, within which there are transitions depending on the answers, and we can skip the next block of questions. For example, a passenger is asked: “Have they offered you food?”. And if not, then we will not ask how much he liked what was eaten, but let us move on to the question of drinks.
For this, additional connections are set up on the server, which we have learned to read and build on the client.
Before takeoff, we calculate the range of time for which the flight will take place. For this, local notification is used, which is calculated automatically. For each section ("At the airport of departure", "On Board", "At the airport of arrival") there is a range of times when it is active and valid. For this time range, we calculate when it is better to show the notification. For example, the “On the Plane” block of questions turns on an hour after takeoff, based on the fact that the passenger has already reached for the phone to play or read. Let at the same time and the survey will take place.
After arrival, we send a notification where we offer to send answers. A person can refuse or go through some of the answers later, so we send another notification with a reminder. The message is sent only in the daytime (from 10 to 18), taking into account the user's time zone, in order not to wake anyone up and not to angry. Then we cache all the responses and send the JSON file to the server.

Data analysis
Then all the answers are uploaded to the database. The customer can build queries and receive analytics, distributed over time. For example, how much the passengers liked the service at Domodedovo or how the passengers rate the service on a particular flight. This is a tool that will allow you to quickly receive feedback and trace patterns when there are enough answers for the relevant sample.
Results and plans
We solved two important tasks:- We learned how to quickly collect reliable data online due to the fact that we can interrogate passengers in a digital format at the exact moment when the event occurs.
- Got the opportunity to segment passengers and ask them only those questions that are relevant to them. We interview everyone, but we adjust the survey so that all the questions in it already take into account the passenger’s experience, the composition of his booking, the class of the flight, etc.
And then what are your plans?- Self Registration
Users who have an active booking with S7 Airlines flight will be able to independently log in to the application without an invitation by email. To do this, just enter the ticket number and the passenger's name at the authorization stage.
- Bonuses for answers
In the future, a system of remuneration for completed surveys is planned. What it will be, the company still keeps a secret. As they say, stay tuned.
- Dynamic adjustment to changes in the flight
Questions will not only be generated for each passenger, but also adapt to the changes. For example, in cases where the flight was delayed or the passenger was late for the plane, we will move questions to the new departure time.