Click Create. The New Notification Event Handlers page is displayed.
Since the event handler is delegated to all downstream resellers, it must be unique. That means that the set of the event, notification template type, notification template, and query parameters must differ from any other event handler of the current reseller and all its downstream resellers.
In the Event list, select the event for the notification. For the full list of events, see the table below.
In the Notification template type list, select one of the following ways to send a notification message: SMS, Email, or Client Panel.
In the Notification template list, select a template that will be used to create a notification message (see Creating a notification template). You can search a notification template in the list by part of its ID or name.
To configure sending messages at a certain time:
Clear the checkbox. The
In the
In the Query field, enter the request and condition of the event handler. Use placeholders if necessary (see Using placeholders for event handlers).
The following operations with placeholders are available for the query:
>
<
>=
<=
=
!=
include? (for example, order.type = "SalesOrder" and (order.plans_ids include? 2000030)) — the event handler works if the plan with id =2000030 is included in the order)
exclude? (to exclude certain entities (using an id, key, or name) from the massive of entities. For example, to exclude sending messages about the order creation for a plan with the id = 2000000, use the following rule: order.plans_ids exclude? 2000000)
and
or. For several or after and, use additional parentheses: order.type = "RenewalOrder" and order.renewal_is_positive = true and subscription.payment_model = "prepay" and ((order.plans_ids include? 293827) or (order.plans_ids include? 293824) or (order.plans_ids include? 294340))
% (for example, 30% of the financial blocking threshold: account.financial_blocking_threshold % 30)
This query is used for all active subscriptions that expire after 10 days:
subscription.days_left = 10 AND subscription.status = "active"
Click Create. The new event handler will be created and displayed in the list of event handlers of the current reseller and all its downstream resellers (see Viewing the list of event handlers).
List of events
Event
Description
Account credit hold is coming
Occurs when the account balance becomes equal to or less than the defined part (1~99%) of the financial blocking threshold but not less than the financial blocking threshold. Requires the proper Query.
For example, the account credit hold is coming event will occur when the account balance becomes less than 35% of the financial blocking threshold:
Before account's postpaid subscriptions expiration
Occurs daily for accounts with at least one postpaid subscription in the Active status with an expiration date that matches the Query. The customer receives one notification for all eligible subscriptions expiring in a specified number of days, as opposed to separate notifications Before subscription expiration for each subscription.
Requires the proper configuration of the Query field using before_subscriptions_expirations include?.
before_subscriptions_expirations include? 3 or before_subscriptions_expirations include? 1
The notification template supports displaying extended information about each account's subscription that expires in a specified number of days, including:
The subscription name.
The subscription expiration date.
The subscription auto-renewal status.
A preliminary renewal cost.
The quantity of the main resource.
A button to go to the subscription details page.
A button to go to the last renewal or switch plan order details page.
The report with daily consumptions of pay-as-you-go subscriptions is ready
The event occurs when the consumption report generation is completed (successfully or with an error). To separate notifications for monthly and one-time reports, as well as by report status, use the Query. For more information about reports, see Reports in the Customer Control Panel Guide.
Correction approved
Occurs when a manager approves a correction via the Operator Control Panel (see Approving a correction) or API (see Update a Reseller's Correction status). Optionally, the manager ID can be specified as the Query. A notification is sent to the account Owner's email.
Invoice closed
Occurs on the billing day, when an invoice is generated (see Managing invoices). It is also used for manual sending an invoice to an email (see Resending an invoice)
Occurs only for subscriptions within the Postpay model in the specified in the Query number of days after a payment gets the Expired status (see Using placeholders for event handlers). If no conditions are specified in Query, the event occurs on the day when a payment gets the Expired status.
An email notification includes an attachment:
If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
Payment has been changed (previously — Payment has been received)
Occurs when a payment changes its status. An email notification includes an attachment:
Prepay: a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
Postpay:
If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
To send notifications several days before the payment due date, use the following condition in Query:
payment.days_left = N
where N is the number of days before the payment due date.
To send notifications on the latest date for completing a payment (the payment due date), use the following condition in Query:
payment.days_left = 0
If you leave Query empty, notifications will be sent every day.
An email notification includes an attachment:
If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
Occurs on the day after the billing day, when the platform closes a postpaid Invoice and creates the related payment. An email notification includes an attached PDF receipt for the postpaid payment. The PDF receipt is generated for accounts that have as the default payment method an active payment method based on the CheckCash plugin only (see Viewing and updating account type's details).
Occurs when an email with instructions on how to reset the manager's password for the Operator Control Panel is requested (see Resetting a forgotten manager's password).
On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to the manager who changed their the MFA status.
Leave the Query field empty.
MFA setting has been changed on the Reseller's side
Occurs when the Mandatory use setting is changed in the MFA settings of the reseller (see Manager settings).
On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to every manager of the reseller.
Leave the Query field empty.
Before subscription expiration
Occurs daily for all the subscriptions that are not linked to renewal orders in the Waiting for provisioning or Provisioning statuses. Requires the proper configuration of the Query field.
After subscription expiration
Occurs daily for all the subscriptions. Requires the configuration of the Query field.
After subscription switched from trial to no-trial
Occurs when a subscription is switched from a trial to a paid period both within the Prepay and Postpay models.
Subscription changed
Occurs when:
The subscription status is changed to:
Active.
Deleted, excluding the case of automatic or manual deletion of a subscription with Ordered status.
Stopped (excluding the case of the administrative hold of the account).
Delivered.
Graced.
Waiting for manual approve.
Stopping failed.
Installation failed.
Activation failed.
Renewing failed.
Updating failed.
A subscription is switched from a trial to a paid period.
Occurs when a new order is created (Creating an order) including manual and automatic renewing of a subscription.
To avoid sending to customers invoices to pay for prolong orders created on the billing day for automatic paying from the account balance, see Prolonging a subscription), it is necessary to exclude subscriptions with Auto-renew point (days) = 0 from the Order created and Order changed events. To do that, for these events, in the Query field, use the following expression: order.type = "ProlongOrder" AND order.renewal_is_positive = true. As a result, the events will occur for subscriptions with Auto-renew point (days) > 0 only.
Occurs in the specified number of days before the expiration date of a guaranteed payment.
Days left to pay
Occurs daily for all the subscriptions. Requires the configuration of the Query field.
Phone verification
Occurs after clicking the Receive a verification code button at the SMS Verification step during the full registration of an account (see Full registration).
Billing day is coming
Occurs on a daily basis for each unique billing day. This event is used to inform the account Owner by email about the sum that is required at the account balance on the billing day in order to prevent the subscriptions from stopping. If an account has a subscription with the Pay as you go billing type, the notification contains the information that the required sum may change (see Pay as you go. Charges generation). The email additionally contains the link to the Top-up Balance page (see Balance topping up). Managers authorized in the Operator Control Panel can also follow the link and log in to the Customer Control Panel within the same reseller if they do not have another session in their browser with authorization in the Customer Control Panel.
This event handler requires the setting of the Query.
If the query is not set, then the event handler is triggered in every possible situation.
For example, if an account has three subscriptions with any billing type with three different billing days, the account Owner will receive three email notifications a day.
Existence of the subscriptions with the determined payment model. You can set this parameter using the subscription.payment_model placeholder:
If subscription.payment_model = "postpay", the notification is sent for postpaid subscriptions only.
If subscription.payment_model = "prepay", the notification is sent for prepaid subscriptions only.
Existence of the subscriptions with the determined billing types. You can set this parameter using the monthly_billing placeholder. To send notifications only to the Owners of the accounts that have the subscriptions with monthly billing types (CSP monthly, Monthly Commitment), add the following expression in the Query field:
monthly_billing = "true"
The number of days left to the billing day that caused the notification event to occur. You can set this parameter by using the billing_day_left placeholder. To send notifications a defined amount of days prior to each unique billing day, add the following expression in the Query field:
billing_day_left = {amount of days prior to each unique billing day}
You can additionally set the following parameters:
The date of the billing day. You can set this parameter by using the billing_day placeholder.
The total amount of charges in the Open status that will be closed or blocked on the billing day that caused the notification event to occur. Only subscriptions with Auto-renew point (days) = 0 are included. If there are no open charges, preliminary generation of the charges for the next billing period is used for calculation. You can set this parameter by using the billing_day_open_charges_amount placeholder.
The IDs of the plans of the account active subscriptions. You can set this parameter by using the plan_ids placeholder.
The IDs of the products of the account active subscriptions. You can set this parameter by using the product_ids placeholder.
The account type key. You can set this parameter by using the account.type_key placeholder.
The account class key. You can set this parameter by using the account.class_key placeholder.
The available account balance. You can set this parameter by using the account.balance placeholder.
The financial blocking threshold. You can set this parameter by using the account.financial_blocking_threshold placeholder.
For example:
billing_day = 1 and billing_day_left = 28 and account.type_key = "personal" and account.class_key = "default" and account.financial_blocking_threshold = 0 and monthly_billing = true and (plan_ids include? 1420) and (product_ids include? 498)
If you want to add several conditions that should be fulfilled simultaneously, use the and operator: billing_day = 1 and billing_day_left = 28. In this case, a notification is sent 28 days prior to the billing day only for the subscriptions with the billing day set on the 1st day of each month. In total, one notification a month is sent to each unique account Owner.
If you want to add several conditions, only one of which should be fulfilled at a time, use the or operator: billing_day = 1 or billing_day = 5. In this example, one notification for each subscription with the unique billing day is sent each day of the billing period for subscriptions, if the billing day is set on the 1st or the 5th day of each month. In total, two notifications a day are sent to each unique account Owner.
Use parentheses () to group and to combine conditions: (billing_day = 1 or billing_day = 2) and (billing_day_left = 3 or billing_day_left = 4). In this case:
One notification is sent 23 days prior to the billing day for the subscriptions with the billing day set on 1st day of each month.
One notification is sent 24 days prior to the billing day for the subscriptions with the billing day set on 1st day of each month.
One notification is sent 23 days prior to the billing day for the subscriptions with the billing day set on 2nd day of each month.
One notification is sent 24 days prior to the billing day for the subscriptions with the billing day set on 2nd day of each month.
In total, 4 notifications a month are sent to each unique account Owner.
Also, you can use math operators + and -, comparison operators > <, or invert a placeholder and its value (1 = billing_day).
To make a table with subscriptions that are about to expire, use the following placeholders:
next_billing_period_start_day — the first day of the next billing period with reference to the billing day triggered the event.
next_billing_period_end_day — the last day of the next billing period with reference to the billing day triggered the event.
Billing day for manager's subscriptions has come (former Billing day has come)
Occurs after running the billing process and closing charges for every manager in the following cases:
A manager has at least one account with a subscription in any status except Deleted, and the subscription billing day is the day of running the billing process.
The conditions specified in the Query field are satisfied.
On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to the proper manager email.
Billing day for account's subscription has come
Occurs after running the billing process and closing charges for every account if all of the following conditions are satisfied:
An account has at least one subscription with the billing day equal to the day of running the billing process.
This subscription has charges in the Closed status for the previous billing period.
The sum of all these charges is greater than 0.
The conditions specified in the Query field are satisfied.
The event occurs independently for every subscription of an account.
On the New Notification Template page, in the Additional Settings group, in the To field, it is possible to use the {{owner.email}} placeholder to send a notification to the Owner of an account.
For the event, a particular preformatted notification template can be used: with data per resource category — for Microsoft Azure Plan and Microsoft Azure subscriptions, and with data per resource — for VMware vCloud Director subscriptions:
The notification template supports displaying the following information:
Spend Dynamics:
Costs for the last completed billing period (up to 11 digits) with the reseller currency units. Negative cost are displayed as 0.
Year and month of the last completed billing period.
Costs for the second-to-last completed billing period (up to 11 digits) with the reseller currency units. Negative cost are displayed as 0.
Year and month of the second-to-last completed billing period.
Percentage of the growth rate calculated as follows:
( (Last Billing period - Second-to-last Billing period) / Second-to-last Billing period ) × 100
The red color is used for positive growth rate, green — for a negative one, grey — for zero growth rate.
The growth rate for negative costs is set as follows:
-100% if only the last billing period has negative costs.
100% if only the second-to-last billing period has negative costs.
0% if both last and second-to-last billing periods have negative costs.
The Spend Dynamics block is not displayed if there is no data for the last or second-to-last completed billing periods.
Cost structure in the past billing period:
Line chart:
Every part of the chart represents a resource (resource category) consumed in the last completed billing period.
Every part of the chart has its color.
The chart parts are sorted from most to least, including negative costs.
The maximum number of the parts is 5. Other resources (resource categories) are grouped and displayed as others.
Legend:
The legend displays the part names and their percentage. Negative costs are displayed as 0%.
The maximum number of the parts is 3.
The part names are sorted from most to least.
Next to the part names, their colors used in the chart are displayed.
Table:
The table includes the following columns:
The part colors used in the chart.
Resource (resource category).
Cost, <the reseller currency units> — the quantity of the resource (resource category) consumed in the last completed billing period.
The rows are sorted by cost, from most to least, including negative costs.
Last month weekly cost dynamic — bar chart:
Every part of a bar represents a resource (resource category) consumed in the last completed billing period.
The maximum number of the parts is 5. Other resources (resource categories) are grouped and displayed as others.
The part colors match the line chart.
Hight of a bar represents the amount of the resource (resource category) consumed weekly in the last completed billing period, including negative costs.
Explore more analytics — link to the Analytics page in the Customer Control Panel (see -Subscription analytics) for a subscription triggered the event, with the predefined filters:
Granularity — daily or monthly.
Period — depending on the granularity:
Daily — current or previous billing period.
Monthly — 3, 6, or 12 billing periods.
All costs are displayed in accordance with the reseller currency settings (see Viewing the list of currencies). The names of months are displayed in the default language of the Operator Control Panel (see Managing language settings), and the rest of the text is specified manually.
By default, a link to the Analytics section in the Customer Control Panel https://{domain}/client/analytics displays monthly consumption data for all account subscriptions for the last 3 periods.
Other filtering of consumption data is performed using the filter query parameters and the following template:
Query parameter
Required/Optional
Target
Description
filter[details]
Required
Granularity
Possible values:
monthly.
daily.
filter[billing-period]
Required
Period type
Possible values:
For monthly granularity:3-period, 6-period, 12-period, custom-billing, custom-calendar.
For actual daily expenses of a PAYG subscription: current, previous, custom-billing, custom-calendar.
For upcoming daily expenses of a PAYG subscription: current, previous, current_and_previous.
filter[period][gteq] and filter[period][lteq]
Optional
Period from and to
Format: YYYY-MM, and for custom-calendar — YYYY-MM-DD.
If the values are not specified or only one parameter and its value are specified, the period is determined automatically by the values of filter[billing-period] and filter[details], as well as the current server time.
filter[subscription_id]
Optional
Subscription
Subscription ID.
If the parameter is missing, the subscription filter is not set.
filter[expenses]
Optional
Type of PAYG subscription daily expenses
Possible values:
actual.
upcoming.
For example, the upcoming daily expenses for a subscription with ID 1234 for the current period: https://{domain}/client/analytics?filter[details]=daily&filter[billing-period]=current&filter[subscription_id]=1234&filter[expenses]=upcoming
Net cost has been changed
Occurs when the net cost has been changed at the current reseller level (see Viewing the price list).
Leave the Query field empty when creating this event handler.
The platform collects information about net cost changing once per 24 hours at night. Only the plans, for which the net cost has been changed from 00:00:00 to 23:59:59 on the previous day, are included. For example, if the information is collected at 2:00 a.m. on July, 30, only the plans for which the net cost has been changed from 00:00:00 to 23:59:59 on July, 29, are included.
Credit limit for postpaid subscription was changed
Occurs for accounts with postpaid subscriptions that are not deleted in the following cases:
On the account details page, the subscription credit limit was changed for the account with Postpay as the default payment model (see Viewing and updating account's details).
On the account details page, the Use from the account class switch state was changed, and that caused changing the subscription credit limit for the account (see Viewing and updating account's details).
On the subscription details page, the Use from the account settings switch state was changed and that caused changing the subscription credit limit for the subscription (see Viewing and updating subscription's details).
On the account details page, the account class was changed for the account, and the Use from the account class switch is turned On,and that caused changing the subscription credit limit for the account (see Viewing and updating account's details).
The event occurs for changes via API and the Operator Control Panel.
Credit limit for postpaid subscription is approaching
Occurs when the current debt becomes greater than the defined part (1~99%) of the subscription credit limit, regardless of the subscription status. Requires the proper Query. Occurs only once.
For example, the Credit limit for a postpaid subscription is approaching event will occur when the current debt for a postpaid subscription becomes greater than 70% of the subscription credit limit:
It is triggered by an API method (see Send notifications on Closing documents). The event is used for sending notifications to accounts of a reseller on closing documents for the selected period. The closing documents are available for downloading via the link in the notification and viewing in the Customer Control Panel (see Managing Closing documents). The Closing documents section of the Customer Control Panel is displayed for an account if the corresponding system settings are applied (see General system settings). Notifications are sent on closing documents in the New status only. After notifications are set, the closing documents get the Sent status.
Occurs in the specified number of days after the day when the order was created for orders in the Waiting for payment status and payments linked to one order only (the payments are not joined, see Joining payments for the Prepay model).
Resend the joined payment
Occurs in the specified number of days after the day when the joined payment was created. For payments in the Waiting for payment status only.
Spending budget for a period is approaching
If an account set the spending budget notification threshold for a subscription with the Pay as you go billing type, the event occurs when the subscription consumption (the total amount of charges in the Blocked status) for the selected period reached or exceeded the threshold, but remains less than the budget. The query for an event handler is not required.
Spending budget has been reached
If an account set the spending budget for a subscription with the Pay as you go billing type, the event occurs when the subscription consumption (the total amount of charges in the Blocked status) for the selected period reached or exceeded the budget. The query for an event handler is not required.
Unexpected consumption increase detection
Occurs when the consumption change in day-to-day comparison for a subscription with the Pay as you go billing type reaches or exceeds a threshold. If two thresholds are set, the event occurs when the consumption change equals or exceeds both. The thresholds are set in the system settings and applied to all subscriptions (see Monitoring consumption anomalies for PAYG subscriptions in General system settings).
By default, a link to the Analytics section in the Customer Control Panel https://{domain}/client/analytics displays monthly consumption data for all account subscriptions for the last 3 periods.
Other filtering of consumption data is performed using the filter query parameters and the following template:
Query parameter
Required/Optional
Target
Description
filter[details]
Required
Granularity
Possible values:
monthly.
daily.
filter[billing-period]
Required
Period type
Possible values:
For monthly granularity:3-period, 6-period, 12-period, custom-billing, custom-calendar.
For actual daily expenses of a PAYG subscription: current, previous, custom-billing, custom-calendar.
For upcoming daily expenses of a PAYG subscription: current, previous, current_and_previous.
filter[period][gteq] and filter[period][lteq]
Optional
Period from and to
Format: YYYY-MM, and for custom-calendar — YYYY-MM-DD.
If the values are not specified or only one parameter and its value are specified, the period is determined automatically by the values of filter[billing-period] and filter[details], as well as the current server time.
filter[subscription_id]
Optional
Subscription
Subscription ID.
If the parameter is missing, the subscription filter is not set.
filter[expenses]
Optional
Type of PAYG subscription daily expenses
Possible values:
actual.
upcoming.
For example, the upcoming daily expenses for a subscription with ID 1234 for the current period: https://{domain}/client/analytics?filter[details]=daily&filter[billing-period]=current&filter[subscription_id]=1234&filter[expenses]=upcoming
Paid amount has been received from external system
Occurs when an API method is called to complete a payment by its document_id number (see Complete payment by document ID) if the conditions specified in the Query field are met. In particular, by comparing the paid amount and the payment amount in the platform, the previous and current payment statuses in the platform, you can set up notifications for managers about overpayment, partial or repeat payment because, in these cases, a correction is created and must be manually confirmed.
Request to reset the password after the user creation
Occurs when the user's password has been reset, in the case when the user was created in the Operator Control Panel (see Creating a user).
Update CSP net costs
Occurs daily for all the subscriptions. Requires the configuration of the Query field.
The file with prices changes its status from Future to Current.
Request for creating bill was sent
Occurs if the manual operation for receipt generating was created.
Bill on balance replenishment is ready
Occurs if the receipt for balance top-up was created manually.
The accounting period was closed
Occurs when 1C sends a request to ActivePlatform to reconcile the account balance in 1C and ActivePlatform to close the accounting period.
Create instance
Occurs when a new CloudServer server is created (see Создание Сервера).
Reset instance password
When a password for a CloudServer server is reset. Password reset is possible only using the user interface of the CloudServer control panel.
Data processing for Azure Plan subscriptions completed
Occurs for the Microsoft CSP Products plugin on the level of the reseller with the Office365 plugin integration settings and application template. Occurs after processing the detailed resource consumption data for all Microsoft Azure Plan subscriptions of a reseller in two days after closing the invoices. The Query for an event handler should not be specified. As the recipient, only an existing email of a manager can be specified without any placeholders. See also Configuring notifications for the Microsoft Azure Plan service.
AppSource Activation Link Generated
A new subscription to the Microsoft AppSource service gets the Installing status and is waiting for activation on the vendor side. To activate it, a customer needs to follow a link from a notification (see Microsoft AppSource. Operator Guide).
Occurs when a subscription to a plan based on the Vendor Service Plugin (VSP) achanges its status from Updating to Active, after the quantity of subscription resources was changed.
VSP subscription created
Occurs when a subscription to a plan based on the Vendor Service Plugin (VSP) changes its status from Installing to Active.