Galina Savochkina, chief developer of the center of competence of corporate systems of the IT Directorate of the ICD
Today we will talk about how we worked on the automation of the service “Personal offers for ICD clients - with an increased cashback from partner companies”.
Service purpose
Business set us the task - to implement a software product with an individual approach to each client as part of the loyalty program. After about 2 months of development and about 2.5 months of testing in the mobile bank of the Moscow Credit Bank, a new tab “Personal Offers” in the section “Privileges” became available to its customers - individuals. Here, based on the transactional activity of clients on ruble cards, shares were collected to receive cashback for purchases from partners that are offered by the aggregator company Svitkard LLC. For each client, the actual stocks were selected specifically for him in order to obtain the maximum reward for purchases. Here are collected offers from hypermarkets, shops, pharmacies, gas stations, online stores, cafes, etc. Among the project partners were retailers Perekrestok-online, Utkonos, METRO, Leonardo, Kari, pharmacies "36.6", "Stolichki" and "Gorzdrav", gas station "ESA" and many others. In these and other networks, a cashback of 3% to 15% for all purchases will be available for ICD customers, and for the first purchases from certain partners, customers have already been able (and whoever has not done so, can still) return up to 25% of the payment amount .
To display current shares, bank customers must have the latest version of the MKB Mobile mobile application.
This description is not intended to provide detailed comprehensive information on the technical features of the development of this functionality, however, some basic principles of interaction will be considered in order to share experience in developing such complex systems. It is about organizing interaction with a third-party company, while it is very important to comply with the principles of data transfer security, regulations for working with customer data, to ensure trouble-free operation and to minimize the possibility of technical failures and disruptions to the overall system performance.
Development process
The project to develop a new loyalty program has undergone a thorough approval process, since the ICD is always responsible for the safety of its customers and maintaining loyalty on their part. It was necessary to think over the process of exchanging files with customer transactions with an external organization - Svitkard LLC. Of course, all data is transmitted over a secure channel and in anonymized format.
File Sharing with Svitkard LLC
For quick and convenient interaction between the ICD and the aggregator software environment, it was decided to use the JSON format for exchange. Like many other text formats, JSON is easy to read by people, the format is considered to be independent of the language and can be used with almost any programming environment. This is very convenient from the point of view of implementation - it is enough to discuss a set of fields with a partner and there is no need to additionally coordinate separators and other additional parameters, which often complicates the interaction when exchanging text files.
A special SFTP channel was configured for exchange between the parties. Data is encrypted by the transmitting side (ICD or aggregator, because two-way exchange is configured). A regular exchange of files has been implemented, containing the list of ICD clients in anonymized form and separately encrypted card transactions. Information is exchanged once a day: such a periodicity for the task of calculating cashback is enough, because data for an already closed day is transmitted, and accrual of cashback is done once a month.
The types of files for exchange were agreed upon - from ICD: a list of customers, a list of transactions in an anonymous format with a unique identifier within the bank. From Svitkard LLC: a list of partner organizations, shares indicating the size of the cashback (3%, 5%, 15%, 25%, etc.), conditions for charging (for the first purchase, for any purchase), validity periods stocks (within a month, for another period of time), points of action of stocks, i.e., specific stores, gas stations, etc. with an address.
Once a month, depending on the transactions made, the aggregator organization sends in JSON format a list of customers with reference to the unique identifier of the stock (the identifier is set by Svitkard LLC). That is, the list of shares and their number is dynamic and is determined by many factors: the activity of the customer using ICD cards, the demand for certain services. The loyalty program, first of all, is aimed at increasing the amount of turnover on MKB cards with partners of banks. Perhaps the most important file in the exchange is a file with the amounts of accrued cashback for ICD clients. Amounts are calculated on the side of the aggregator, depending on whether the client’s operations are suitable for the terms of the shares, whether he uses a mobile bank and ruble MKD cards.
Also, information about MKB Mobile users is transmitted from ICD: customers who do not use the application or use currency cards for their purchases are not able to receive an increased cashback. Such a requirement was put forward by the business and has its own reasons: attracting additional users of the mobile bank and using the national currency.
A fairly fast data transfer channel was set up, because the offers were selected for all existing customers of the bank, so in fact a huge array of data is transferred in JSON files. Automatic archiving of the transmitted data, saving to an electronic archive, protecting files from incomplete copying via SFTP, verification of the checksum for the transmitted data was developed.
Server part of the interaction system
As with most modern modules of interaction between third-party organizations, the “Client-Server” architecture was implemented for the “Personal Offers” project. In this case, in addition to the server part, there is also interaction with the aggregator (Svitkard LLC). The main server part of the program is implemented in PL / SQL in development environments for the Oracle database. Modern versions of Oracle allow you to quickly and flexibly process data in JSON format using the built-in functionality: using JSON _table, nested path, i.e. there is no need to work with JSON files as text files, and it becomes possible to use a new data object along with the same XML files All aspects of the principles of processing the format by Oracle JSON versions above the twelfth can be obtained from open sources - in the version descriptions, which is very convenient and does not require additional software costs for implementation. The client part was created by the developers of the ICD mobile bank, a user-friendly interface is provided, and the principles of speed of displaying and updating information are observed. This will be described in more detail in another section of the system description.
So, the server side of the program. Actually, the "core" in which the basic operations of the system are performed, namely, downloading a file from a network folder to Oracle database tables in the CLOB format (by predefined services using cryptographic protection, files are transferred from an SFTP server to the ICD internal network resource), JSON parsing -files, saving the contents of the file already broken down by the fields of the database tables of the bank.
Data on offers and promotions for customers is downloaded a few days before the end of the month in automatic mode, the appearance of the information displayed in the mobile application in the test version is additionally controlled - the text is converted to HTML format for optimal user experience. The file from the partner is formed taking into account the fact that the text should be formatted for stocks in a certain style, and thematic pictures are available for clarity for each stock.
In the middle of the month, cashback is accrued for customers according to the data received from Svitkard LLC: debiting is made from a special account opened for the bank’s partner, while the information received from the partner is checked for correctness automatically using a number of test cases (implemented in PL / SQL ) If the information is correct, closed card accounts are cut off, since there is no way to charge a cashback. Accuracy of accruals is additionally controlled by accounting staff, for whom a special functionality is implemented in the ICD program for back office employees — reports and reference books for verification. If all requirements are met, the accounting officer confirms the correctness of charges and confirms the formation of postings. Postings are uploaded to the processing side and SMS messages of the form are sent to customers:
MKB: 05/17/19 you have been credited with cashback from purchases from partners of the bank 545.41 RUB on the card * 1111. The balance of 1445.96 RUB. Details
mkb.ru/m
Accordingly, if the client prefers push notifications, an alert will be sent to him. It all depends on the settings of ICD Mobile.
To store large amounts of data on stocks by each client, the partitioning by month for the duration of the stock was applied to the information tables in Oracle, and indexing was optimally thought out. This allows you to quickly receive and display data, despite the fact that they are individual for each client and contain media information.
Client part in a mobile bank
Data received by the server side via PL / SQL is stored in a database and transmitted to the client side through stored procedures. An interaction format was agreed upon in advance with the developers of the mobile bank (in the C # development environment): return the cursor with the data on the client to them to display the shares on the user's page. Transfer the network location of media files - for the design of each action, also implemented the transfer immediately, taking into account the formatting of HTML for each page of the action. Before activating new promotions for a client by a mobile bank, caching is performed on the night of the first day of the month.
Thanks to the optimally organized interaction structure, each ICD client instantly sees a list for himself on his page of “Personal Offers”. Despite the fact that the lists are individual for each client, the system works quickly, for which thanks to our qualified Oracle DBMS database administrators, well, I, as a developer of the server side of the system, also try to always think about performance))
The interaction of departments in the development and operation of the system
This project encompassed several departments at once: the back-office software development department — for implementing cryptographic protection of data and transferring SFTP files to the ICD internal resource via the channel — from the aggregator; development group and automation on bank cards. Actually, the implementation of the server side of the program - downloading files, parsing files, displaying stocks and media content for clients, crediting a cashback grouped by customer cards, debiting from a special account and returning balances to the account of Svitkard LLC if transfer is impossible due to closing the account of the client to whom the cashback was credited, sending information to the customers phone. From the client side of the mobile bank - displaying data returned by the server.
The developers on the aggregator side also showed themselves on a positive side, corrected all the discrepancies that occurred with the transfer format, corrected the set of fields several times for more convenient data exchange, agreed on the interaction rules, and set up the frequency of data transfer. In addition, the aggregator company is very loyal to the bank's customers: in case, for some reason, the client considers that he was not mistakenly credited with a cashback. There were very few complaints during the test period, and they were mainly related to the fact that the client did not see a message about the cashback accrual or misunderstood the accrual conditions, for example, paid with a currency card, considered that the cashback should come to him immediately after purchase on the action (and it is charged in the middle of the month), etc. From the clients, including from the bank's employees, fairly positive reviews were received about this proposal. This loyalty program offers virtually unlimited opportunities to receive cashback for purchases, for example, on New Year's holidays, we were pleased to see how customers who spent about 50 thousand rubles at Rive Gauche on cosmetics received their honest 5 thousand rubles cashback, etc. e. 10% on all purchases. And this is immediately in the money on the card account, not bonuses.
Summarize
In the fall of 2018, a new tab “Personal Offers” in the “Privileges” section became available in the MKB Mobile mobile bank; it was more widely distributed among the bank's customers already in 2019. Currently, many customers using the ICD mobile bank have discovered an increased cashback for individual shares - from 3 to 25%, while money is credited stably in the middle of the month regardless of the account balance and immediately, i.e. there is no need to transfer points in money, choose compensation categories, etc.
After checking the charges and the functioning of the mobile bank on test circuits, testing was launched on a productive basis for a limited circle of people - on a test group of ICD employees who went shopping and made test purchases. All possible shortcomings and wishes were taken into account, and in the fall of 2018, all ICD customers who did not even have a mobile bank connected before, received personal offers on shares from partner organizations. That is, any client of the Moscow Credit Bank, if it connects the Mobile Bank for the first time, sees that the IBC has already taken care of individual offers for it.
In the current version of the company, with which interaction is organized through the aggregator,
from the following categories:
- food, supermarkets;
- Gas station;
- cafes and restaurants;
- pharmacies;
- online stores;
- the medicine;
- entertainment;
- clothes and shoes.
Among the partners who are ready to charge cashback, there are such large companies as 5 Karmanov, METRO, Pharmacy 36.6, Leonardo, VICHY, Toy.ru, Gorzdrav, Hotel COSMOS, Kari, Utkonos, Rybolov Discount, SOHO, Line, Burger King, Detsky Mir, Kozlovitsa and many others. And if, for example, you already buy something from our partners, why not get income from it, say, in 10% or even 25%? Tempting, isn't it?
Time does not stand still, and now the number of partners in the "Personal Offers" stocks is constantly growing. Now each ICD client can earn money on their purchases and choose convenient personal offers for themselves, the main thing is to keep up to date and do not forget to use the bank’s mobile application. Now the time passes when people were afraid to constantly use cards for their purchases and more trusted in cash. After all, it is obvious that a refund is beneficial to both banks and shops - and, of course, to bank customers. The cashback has much more advantages than, for example, the same discounts and bonus coupons that oblige you to come to the store again until the accrued points have burned out, because it’s psychologically more pleasant for the user not just to buy a product for a smaller amount, but to get money back. And if many banks offer to get a cashback for a specific category of services or goods that can be used more in some months and less in another, then personal offers from MKB allow you to choose for yourself the price advantage for the service that is needed right now , while the categories and offers are enough to make this choice.