Distribution Channels
The Voucher Server supports distribution of Vouchers in different formats when generating a Voucher Batch via the concept of a Distribution Channel.
Distribution Channels define the type of output when configured against a Voucher Batch.
The current supported output types are:
- Browser Download
- Local Filesystem
The current supported output formats are:
- JSON
- Text (utilizing Template Toolkit formatter)
To access the Distribution Channel search page, select the Distribution Channels
menu link.
All configured Distribution Channels will be shown with standard features for searching and sorting available via the table controls.
Double clicking a row or clicking the edit icon will display the Distribution Channel details page.
Common Configuration
The following configuration is common to both output formats:
Configuration Property | Description |
---|---|
Distribution Channel Name | Identifiable name used by the Voucher Server GUI to identify Distribution Channels. |
Description | Free form description field used by the Voucher Server GUI to identify Distribution Channel configuration. |
Active | Whether or not the Distribution Channel is active and can be utilized during Voucher generation. |
Distribution Method | How generated Vouchers should be distributed when distributing a generated Voucher Batch. |
Distribution Formatter | How generated Vouchers should be formatted when output to the selected Distribution Method. |
JSON Formatter
In the above example screenshot the configured Distribution Channel Local Filesystem (JSON)
is configured as an active
distribution channel
Distribution output is as JSON formatted file, output to the /test_batch_files/
directory on the processing server.
Configuration Property | Description |
---|---|
Output Directory | Output path on the processing server to output generated Vouchers to. |
Text Formatter
In the above example screenshot the configured Distribution Channel Browser Download - Text
is configured as an active
distribution channel
Distribution output is as a text formatted file utilizing the following template:
#[% voucher_batch.identification_string %] [% voucher_batch.start_serial_number %]-[% voucher_batch.end_serial_number -%]
[% FOREACH voucher = vouchers %]
[% voucher.serial_number %],[% voucher.encrypted_hrn %],[% voucher.unencrypted_hrn -%]
[% END %]
Templates within N2VS utilize the Perl Template Toolkit library, for more information click here.
The above default template will output voucher data as follows:
#Voucher Batch Name 1-5
1,11111,11111
2,22222,22222
3,33333,33333
4,44444,44444
5,55555,5555
Configuration Property | Description |
---|---|
Distribution Format Template | The template to utilize when outputting Vouchers using the text Distribution Formatter. |