Smart Contract Development for Contact Center Sofware
Qubicles serves as a decentralized market of labor resources for the contact center industry. Qubicles software is aimed to connect agents and employees from all around the world.
The industry mainly concentrated on transmitting and storing the huge amount of data, therefore, blockchain technology integration has significant impact on the system work and maintenance.
Qubicles project overview
Before Blaize stepped in, Qubicles had already had a working software solution. Our main task was to translate its main business logic into one compound and complex smart contract.
Thanks to coherent work with the client and thorough analysis of the project’s needs, Telos blockchain was chosen as the best framework for implementing such a smart contract. Mainly due to client’s preferences and expectations as well as Blaize developers reach experience of working with EOSIO dev tools.
Read our analysis of the main frameworks for blockchain development in this article
It is worth mentioning that in this case, the prolonged discovery phase was required, as long as we had to take into account every single process within the software. Only after this, we could prepare a thoughtful requirement specification for processes where Qubicles system interacts with Telos blockchain and smart contracts.
Solution Blaize proposed
After conducting a detailed research on use-cases and preparing business analysis Blaize experts proposed the following solution: to cover business processes of Qubicles system with smart contracts interactions within Telos blockchain ecosystem.
Blaize established further subtasks for Qubicles project implementation:
- prepare requirements set for blockchain interactions;
- development of smart contract’s internal classes hierarchy;
- dev and test environment preparation;
- QBE token integration;
- main business-logic implementation;
- functionality development for QU
- NFT minter integration
- unit tests coverage
Project Architecture
Smart contracts development has become an almost inseparable part of blockchain based projects. Due to the high security level and variety of functions it can perform, smart contracts programming requires a very qualified coder with a core specialization in blockchain technology.
Blaize programmers have enough technical skills and experience to perform a smart contract development of any kind. In terms of Qubicles case, our blockchain engineers decided to transfer a broad software functionality into one smart contract.
As long as Telos blockchain was chosen as a platform for hosting those smart contracts, a strong knowledge of C++ language for programming was required.
In order to implement this development, we needed to use EOSIO dev tools kit due to its total compatibility with Telos blockchain.
Development process
Qubicles smart contract’s development was performed in several steps. Those are following:
- Create the environment for existing Qubicles QBE token integration.
- Development of the inner balances for token usage within Qubicles so that the users can provide the money into the system just once. It helped to omit redundant interaction with a variety of system contracts for users.
- Implementation of dates & timing system. This helps to track the employee work shifts and watch the worker’s occupancy during the day. Thus, the technology helps to optimize work schedules and get a higher rate of query processing.
- Development of a job request functionality for the Employer.
- Development of the resource definition insurance for the Agent.
- Development of the Job Offer functionalities:
- application to a chosen position;
- functionality to match the work timelines;
- ability to track the working hours of the employees according to the previously created dates & timing system;
- ability to close the job;
- funding the job by the Employer;
Additionally, we had to implement the two functionalities for getting regular rewards from the Agent. The first one is meant to reward just for tracked hours (like a part-time shift). The second one deals with full payment for the job. Then, we established multisig actions for Job closing and payments resolving between the Agent, the Employer and Qubicles system.
- Preparation of the test environment. Then, covering 100% of the developed functionality with unit tests.
- Presenting the demo of working core functionality for Employer – Agent relationship to the client.
Additional development parts:
- Development of functionality for Qubicles University (QU). The ability to register a course by a Trainer, to set a fee for the course attendance, charge an Agent for attendance, track the progress of the course.
- Integration of Marble standard of NFT minter for minting custom NFTs for special events (with rewards in QBE or without them) and for QU courses finishing.
Every stage included unit-tests coverage.
Challenges we faced
The main obstacle in this use case was the preparation of the development environment.
In further explanation, there was an absence of needed dependencies in the dev package that are necessary for building test environments out of a box. So, we had to compile the project from the EOS source code and only then cover it with tests. This led to additional hours spent for devops.
The other difficulty was to create thoughtful and user-friendly data structures convenient for information storage. Moreover, those data storage have to be easily accessible yet, at the same time, highly secured.
Due to system diversity and complexity of the smart contract, covering the whole contract functionality with unit tests was an uneasy task, as well. As long as Blaize engineers had to think out every step network users’ may perform, writing and covering the whole logic with unit tests was quite time consuming yet necessary for proper functioning.
Result
As a finished solution, we got one complex Qubicles smart-contract layer (with a list of functionalities and C++ classes) with an integrated QBE token contract. In addition, we have integrated the NFT-minter contract – Marble NFT standard for Telos.
Consequently, we have the first contact center software empowered by blockchain technology represented by Qubicles.
If you think of integrating blockchain to your business Blaize engineers will be glad to help. Contact us to discuss your idea now!