Template parameters

Link copied to clipboard

Template type

Link copied to clipboard

The template type defines the intended use of the template:

  • Whether it is used to generate invoices (based on a standard or a custom invoice template) or to export data from PortaBilling.
  • What kind of data is involved (invoice data or tariff data, etc.).

Template media

Link copied to clipboard

This defines the file format to be processed, for example .csv (Comma-Separated Values), .xls (Microsoft Excel), or a printable form (a specific HTML, which might be converted into a .pdf file).

Template time zone

Link copied to clipboard

Normally, when people specify a point in time, they name the day of the week, the month, the year, the hour and the minute, and, optionally, even the seconds as well. However, in order to be absolutely precise, this definition must also include the time zone.

Let’s assume that your vendor sends you a data file that contains his new rates and for each rate, the date on which it becomes effective. This is fine; but is 01-May-2019 00:00 in the Pacific Standard time zone, or in the Central European one? Obviously, time zone misinterpretation can render the rest of the data invalid. In most cases, specific time zones are not included in the date itself, but are instead defined externally.

For example, your vendor might tell you that all of the given times are in Eastern Standard Time. Or, there might be a note in the file that says this. In any case, the template engine needs to know which time zone is to be used. This is specified in the Template time zone parameter. If the parameter is set to “Auto,” it means that the time zone of the user who performs the upload is used. This is convenient when you work with your own tariffs, but is not usually acceptable when you upload tariffs from vendors.

If the date includes a time zone (for example, 2019-04-10 12:00:00 Australia/Sydney,) the time zone takes precedence over the template’s time zone. However, make sure that the time zone specified is both supported and unambiguous. For example, EST could mean Eastern Standard Time in both the US (GMT -5) and Australia (GMT +10) – quite a big difference!

Media parameters

Link copied to clipboard

Media parameters define the data layout within the file, (e.g., which separator is used in .csv files) where the data for individual components must be located in the file, and whether they are present at all.

Media parameters

You can manage media attributes for rate download templates in the .csv file format. The following options are available:

  • CSV delimiter is a character used to separate independent data in a file. The default delimiter is a comma; you can select another delimiter from the list or define your own delimiter as the Other field value.
  • CSV text qualifier is a wrapper used to identify the field within the file. The default text qualifier is double quotes. You can select another available text qualifier from the list or define your own in the Other field.

Here is an example of the output file that matches this template.

Output file

The file structure for .xls files is fixed and not editable.

On this page