The template engine allows you to define and use data conversion rules (templates) during the rate upload process. There are two methods of template-based data processing and, accordingly, two types of templates.
Import data into PortaBilling (upload)
Such a template (called an upload template) is defined via a user-friendly rate upload wizard during the first upload of rates from a tariff with a specific format.
The Rate upload wizard provides:
- Rate upload with visual results review at each successive step
- Rate change analysis
- Automatic creation of new destinations
- Prefix assignment to destination groups
- Rate update notifications
- Definition of changes to apply to the data before entering it into the database
- Saving all of the steps performed as a template associated with this tariff that can be used later on during subsequent rate uploads
When rate data is being uploaded into a tariff, the template engine parses the input file according to its type, locates the data inside the file, converts it into an internal representation according to the specification predefined during the first upload applies post-processing rules and then writes the data to the database.
Export data from PortaBilling (download)
Such a template (called a download template) defines:
- The output data format
- How the data is to be processed before being downloaded into the file
- How the data should be arranged in the output file
When data processing takes place, the template engine extracts data from the database, converts it into the specified format, applies post-processing rules, and then creates a file of the specified type, entering the data in the appropriate places in the file.