The plugin provides the following functionality:

  • storing information about customer product subscriptions;

  • subscription price calculation;

  • generation license file for sending it to customers;

  • reporting about money distribution over product owners.

Using the plugin implemented the BGERP Development Support System, allowing us to drive our product further.

subscription en
You can see the plugin enabled and sample configurations in Demo System.


Process Types

In configuration participate the following process types.


Represents information about product, available by subscription. Has the following parameters:

  • Product ID - unique text product identifier, used for license generation and calculation of price;

  • Price - one ore more listcount prices, value IDs must be the same as in Limit parameter of subscription.


Contains information about customer’s subscription, parameters:

  • E-Mail - email customer with the subscription’s customer;

  • Subscription - list with values equals to configured subscription’s IDs;

  • Limit - list with values of allowed subscription limit, e.g. number of concurrent connections;

  • Service Cost - money with value of Consultant' reward over of product prices;

  • Discount - money with an optional discount;

  • Cost - read-only money with month price, calculated as Products Costs for the Limit + Service Cost - Discount;

  • Date To - date end of license, placed in license file;

  • License - read-only file with generated license file, updated automatically on changing Date To.

Add Invoices tab in the type properties configuration.


Make sure the plugin is enabled in configuration.

Add in the plugin configuration the following block:


# product process params
# subscription process params
# optional user params
# optional keys


  • <privateSshKeyPath> - file path with private SSH key, used for signing license files, for example: /home/bitel/.ssh/id_rsa, the public key has to be introduced in key using App;

  • <paramProductId> - ID of Product ID parameter;

  • <paramEmailId> - ID of E-Mail parameter;

  • <paramSubscriptionId> - ID of Subscription parameter;

  • <paramLimitId> - ID of Limit parameter;

  • <paramServiceCostId> - ID of Service Cost parameter;

  • <paramDiscountId> - ID of Discount parameter;

  • <paramCostId> - ID of Cost parameter;

  • <paramDateToId> - ID of Date To parameter;

  • <paramLicId> - ID of License parameter;

  • <paramIncomingTaxPercentId> - ID of user parameter of type text with incoming payments tax, taken on account in Payments Report;

  • <maxDateToMonths> - how many months in future from the current one can be set Date To parameter value.


Add the following configuration block for each of supported subscriptions.



  • <id> - unique numeric subscription ID;

  • <title> - subscription title;

  • <paramLimitPriceId> - ID of Price parameter.

Paid Invoice Actions

The plugin supports several actions on paid invoices in a subscription process. To activate them in a subscription configuration should be added the following keys.

# optionally


  • <dateToExpression> - JEXL expression for calculating a new license Date To value, with additional context variables:

  • <emailMessageTypeId> - message type ID of type E-Mail which will be used for creation of a notification mail with a new license file, exact ID value may be replaced to 0 that will take the first message type of type E-Mail from server configuration;

  • <emailSubject> - the mail’s subject;

  • <emailTextExpression> - JEXL expression for generation the mail’s content, with additional context variables:

Here a sample of subscription configuration taken from Demo.

// PzdcDoc snippet of: 'Plugin Subscription subscription config', lines: 20 - 28

subscription:subscription.2.title=BGERP EUR
subscription:subscription.2.paid.invoice.email.subject=BGERP License
    "Dear Customer," + NEW_LINE2 + "as an attachment you will find the prolonged license."

Price Calculator

The price calculator is implemented as an open process queue with processor. The queue has to be assigned to Product process type, and have following processor in configuration:

# optionally predefined subscription value


  • <id> - unique numeric subscription ID.



process product

Product Owner is a user, becoming profit from subscriptions, using his product, has to be assigned as an process executor with role=1.


Each customer subscription is presented as a process with related Product processes with type Depend.

subscription process

An Consultant is a user, taking responsibility for the process and becoming profit in size of Service Cost parameter value. The Consultant has to be assigned as a process executor with role=0.

Subscription Cost parameter value is automatically recalculated on changing subscription, limit, related products, discount or service cost parameters.

After sending an invoice and paying that, Date To parameter has to be changed, that update License File.

subscription process license send

Subscription Payments Report

The plugin provides Subscription Payments Report, which shows how much money owns a report generating user to plugin owners.

payment report

User received amounts for a month are taken from paid invoices with payment date in the month, marked as paid by the current user. Using the report each payment receiver can determinate parts of Consultants and Owners.

Price Calculator

In open process queue customers can choose interesting subscription, products and limit and get subscription month price.

price calculator