Using Placeholders for Event Handlers
Placeholders can automatically replace specific information (such as customer address, order details, subscription status, etc.). Each type of notification has its own set of Placeholders that aren't available to other notification types. Placeholders allow extracting information from the database and putting it into a notification message.
The following table includes the list of Events and corresponding Placeholders that can be used in the Query parameter of the Event Handler.
The following operations with Placeholders are supported for the Query parameter:
>
<
>=
<=
=
!=
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 the certain entities (using the id, key, or name) from the massive of entities. For example, to exclude sending messages about order creation, which includes the Plan with the id = 2000000, use the following rule:
order.plans_ids exclude? 2000000)
and (for example, to exclude several entities from the massive:
(product_ids exclude? 34650) and (product_ids exclude? 34702)
)- or. For several
or
afterand
, 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
)
Event | Placeholder | Description | Type | Example |
---|---|---|---|---|
For all Events | owner.status | Status of the user with the Owner access rights | string | owner.status = "active" |
owner.country | Owner address: two-letter ISO code ISO 3166-1 alpha-2 of the country | string | owner.country = "BY" | |
owner.city | Owner address: city | string | owner.city = "Minsk" | |
current_date | Current date | date | current_date | |
Account credit hold is coming Account changed Account created Financial blocking threshold was changed Account manager changed Low balance Closing documents generated Create instance Reset instance password | account.balance | Current value of the Account Balance (see Viewing the List of Charges) | number | account.balance = 1000 |
account.balance.was | Previous value of the Account Balance (see Viewing the List of Charges) Can be used only for the Low balance Event. | number | account.balance.was = 100 | |
account.city | Account address: city | string | account.city = "Minsk" | |
account.class_id | Account Class ID (see Account Classes) | integer | account.class_id = 1 | |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "manual" | |
account.country | Account address: two-letter ISO code ISO 3166-1 alpha-2 of the country | string | account.country = "BY" | |
account.financial_blocking_threshold | The limit, within which the Account balance can be negative without moving the Account to the Credit hold status during the Subzero period | number | account.financial_blocking_threshold = 100 | |
account.has_endless_trial_subscriptions | Indication that the Account has at least one commercial Subscription with the endless period | boolean | account.has_endless_trial_subscriptions = true | |
account.has_manager | Indication that the Account is linked to a Manager | boolean | account.has_manager = true | |
account.regular_sending |
| boolean | account.regular_sending = true | |
account.status | Current status of the Account | string | account.status = "inactive" | |
account.status.was | Previous status of the Account Can be used only for the Account changed Event. | string | account.status.was = "inactive" | |
account.subscription_credit_limit | Value of the subscription credit limit of the Account | number | account.subscription_credit_limit = 100 | |
account.type_id | Account Type ID | integer | account.type_id = 1 | |
account.type_key | Account Type key | string | account.type_key = "business" | |
account.owner_reset_password_url | One-time link to set the Account Owner password Can be used only for the Account created Event. | string | account.owner_reset_password_url = "http://example.com/password/edit?reset_password_token=1q2w3e" | |
Invoice closed The Invoice was approved | invoice.status | Invoice status | string | invoice.status = "open" |
invoice.has_attached | Indication that a third-party invoice is attached to a Payment for an approved postpaid Invoice with external management (see Managing Invoices for the Postpay model by a third-party ERP system) | boolean | invoice.has_attached = true | |
account.type.key | Account Type key | string | account.type_key = "business" | |
Manual Operation | operation.id | Manual Operation ID (see Manual Operations) | integer | operation.id = 1 |
operation.status | Manual Operation status | string | operation.status = "approval_required" operation.status = "declined" | |
operation.type | Manual Operation type | string | operation.type = "postpay_subscription_verify" operation.type = "manual_provisioning_plugin_application_install" operation.type = "manual_provisioning_plugin_application_update" | |
product.id | Product ID | integer | product.id = 1 | |
product.name | Product name | string | product.name = "ESET" | |
product_category.id | Product Category ID | integer | product_category.id = 1 | |
plan.id | Plan ID | integer | plan.id = 1 | |
plan_category.key | Plan Category ID | string | plan_category.key = "default" | |
subscription.id | Subscription ID | integer | subscription.id = 1 | |
subscription.status.was | Subscription status (previous) | string | subscription.status.was="installing" | |
subscription.status | Subscription status (current) | string | subscription.status.was="active" | |
account.type_key | Account Type key (see Account Types) | string | account.type_key = "personal" | |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "default" | |
User invitation | - | - | - | - |
Payment has been received | account.type_key | Account Type key (see Account Types) | string | account.type_key = "business" |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "manual" | |
account.billing_day | Billing day (see Managing Service Terms). The billing day can be set from 1 to 31 that specifies the day of the month. If the month does not include the specified number, the Invoice will be created on the last day of that month | integer | account.billing_day = 30 | |
account.financial_blocking_threshold | integer | account.financial_blocking_threshold = 100 | ||
account.balance | Current value of the Account Balance (see Viewing the List of Charges) | integer | account.balance = 1000 | |
account.status | Current Account status | string | account.status = "inactive" | |
account.country | Account address: two-letter ISO code ISO 3166-1 alpha-2 of the country | string | account.country = "BY" | |
account.city | Account address: city | string | account.city = "Minsk" | |
payment.total | Payment amount | integer | payment.total = 100 | |
payment.status | Payment status | string | payment.status = "completed" | |
Password reset request Verify email | user.id | User ID | integer | user.id = 1 |
Manager password reset request | manager.id | Manager ID | integer | manager.id = 1 |
Before subscription expiration After subscription expiration After subscription switched from trial to no-trial Subscription changed Credit limit for postpaid subscription was changed Credit limit for postpaid subscription is approaching | account.balance | Current value of the Account Balance (see Viewing the List of Charges) | number | account.balance = 1000 |
account.status | Current Account status | string | account.status = "inactive" | |
account.type_key | Account Type key (see Account Types) | string | account.type_key = "business" | |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "manual" | |
account.financial_blocking_threshold | The limit, within which the Account balance can be negative without moving the Account to the Credit hold status during the Subzero period | number | account.financial_blocking_threshold = 100 | |
account.subscription_credit_limit | Value of the subscription credit limit of the Account | number | account.subscription_credit_limit = 100 | |
account.country | Account address: two-letter ISO code ISO 3166-1 alpha-2 of the country | string | account.country = "BY" | |
account.city | Account address: city | string | account.city = "Minsk" | |
plan.auto_renewal_disabled | The Disable the Auto-renew option option of the linked Plan is active: true or false | boolean | plan.auto_renewal_disabled = false | |
plan.id | Plan ID | integer | plan.id = 1 | |
plan.status | Plan status | string | plan.status = "completed" | |
plan_period.duration_value | Plan period duration | integer | plan_period.duration_value = 30 | |
plan_period.duration_type | Units of the Plan period (year, month, day) | string | plan_period.duration_type = "months" | |
plan_period.trial | Plan period is trial: true or false. The true and false values should have quotation marks. | string ("boolean") | plan_period.trial = "false" | |
plan_period.setup_fee | Fee for installing the Subscription to the Plan period | number | plan_period.setup_fee = 100 | |
plan_period.recurring_fee | Monthly fee for the Subscription to the Plan period | number | plan_period.recurring_fee = 100 | |
plan_period.renewal_fee | Fee for renewing the Subscription to the Plan period | number | plan_period.renewal_fee = 100 | |
plan_category.key | Plan Category key (see Managing Plan Categories) | string | plan_category.key = "streaming" | |
plan_category.id | Plan Category ID | integer | plan_category.id= 1 | |
subscription.id | Subscription ID | integer | subscription.id = 1 | |
subscription.csp | The Subscription belongs to Microsoft CSP program: true or false | boolean | subscription.csp = true | |
subscription.individual_price | The Subscription is ordered at the individual prices (see Ordering a Subscription at the individual prices): true or false | boolean | subscription.individual_price = true | |
subscription.status | Subscription status (current) | string | subscription.status = "active" | |
subscription.status.was | Subscription status (previous) The Placeholder is not supported for the Credit limit for postpaid subscription was changed and Credit limit for postpaid subscription is approaching Events. | string | subscription.status.was="installing" | |
subscription.auto_renewal | The Auto-renew option of the Subscription is active: true or false | boolean | subscription.auto_renewal = true | |
subscription.auto_renewal_disabled | The Disable the Auto-renew option option of the Subscription is active: true or false | boolean | subscription.auto_renewal_disabled = false | |
subscription.days_left | Number of days before expiration day of the Subscription | integer | subscription.days_left = 7 | |
subscription.days_passed | Number of days after creation day of the Subscription | integer | subscription.days_passed = 15 | |
subscription.plan_class | Service Term name (see Managing Service Terms) | string | subscription.plan_class = "default" | |
subscription.payment_model | Payment model: prepay or postpay For the After subscription switched from trial to non-trial Event, only | string | subscription.payment_model = "postpay" | |
subscription_postpay.current_debt | Subscription debt that is calculated as the total amount of all blocked Charges for the Subscription for the current Billing period | number | subscription_postpay.current_debt = 100 | |
subscription_postpay.credit_limit | Value of the subscription debt, above which the postpaid Subscription will be stopped | number | subscription_postpay.credit_limit = 100 | |
product.id | Product ID (see Editing general information about the Plan) | integer | product.id = 1 | |
product.name | Product name (see Editing general information about the Plan) | integer | product.name = "Default" | |
order.type | Order type (for the list of possible types, see Managing an Order) The Placeholder is not supported for the Credit limit for postpaid subscription was changed and Credit limit for postpaid subscription is approaching Events. | string | order.type = "RenewalOrder" | |
Order changed Order created Resend the order | order.id | Order ID The Placeholder is not supported for the Order changed, Order created Events. | integer | order.id = 1 |
order.plans_ids | IDs of ordered plans | integer | order.type = "SalesOrder" and (order.plans_ids include? 2000030) | |
order.status | Current status of the Order | string | order.status = "waiting for payment" | |
order.status.was | Previous status of the Order The Placeholder is not supported for the Order created Event. | string | order.status.was = "provisioning" | |
order.total | Total amount of Order | integer | order.total = 100 | |
order.type | Order type (for the list of possible types, see Managing an Order) | string | order.type = "RenewalOrder" | |
order.renewal_point | The Placeholder is deprecated. In the current version of the platform, See also order.renewal_is_positive. Whether the value in the Auto-renew point (days) field is set on the Subscription's details page (see Viewing and updating Subscription's details): true or false | boolean | order.renewal_point = true | |
order.renewal_is_positive | Whether the Subscription is auto-renewed before the expiration day (see Viewing and updating Subscription's details):
| boolean | order.renewal_is_positive = true | |
subscription.status | Subscription status | string | subscription.status = "active" | |
product.id | Product ID included in the Order (see Viewing Order Details) | integer | product.id = 1 | |
product.name | Product name included in the Order (see Viewing Order Details) | integer | product.name = "Default" | |
subscription.payment_model | Payment model: prepay or postpay | string | subscription.payment_model = "postpay" | |
plan_category.key | Plan category key | string | plan_category.key = "Default" | |
Resend the order | order.days_passed | Number of days passed after creating the Order | integer | order.days_passed = 5 |
Guaranteed payment created Guaranteed payment changed | account.type_id | Account Type ID (see Account Types) | integer | account.type_id = 1 |
account.type_key | Account Type key | string | account.type_key = "business" | |
account.class_id | Account Class ID (see Account Classes) | integer | account.class_id = 1 | |
account.class_key | Account Class key | string | account.class_key = "manual" | |
guaranteed_payment.status.was | Previous status of the Guaranteed Payment (see Managing Guaranteed Payments) Can be used only for the Guaranteed payment changed Event. | string | guaranteed_payment.status.was = "provided" | |
guaranteed_payment.status | Current status of the Guaranteed Payment | string | guaranteed_payment.status = "revoked" | |
guaranteed_payment.days_left | Number of days before the expiration date of a Guaranteed Payment | integer | guaranteed_payment.days_left = 1 | |
Billing day is coming | billing_day | Billing day date (see Creating a Service Term) | integer | billing_day = 5 |
billing_day_left | Number of days left to the Billing day that caused the Notification event occurring (see Creating an Event Handler) On the Billing day, which caused the Notification event occurring, the Placeholder will return an amount of days left to the next Billing day | integer | billing_day_left = 7 | |
billing_day_open_charges_amount | Total amount of Charges in the Open status that will be closed or blocked on the Billing day that caused the Notification event occurring. Only Subscriptions with the Auto-renew point (days) = 0 are counted. If there are no open Charges, preliminary generation of the Charges for the next Billing period is used for calculation | number | billing_day_open_charges_amount = 120.1 | |
plan_ids | List of the Plan IDs with active Subscriptions of the Account | array(int) | plan_ids include? 200023 | |
product_ids | List of the Products IDs with active Subscriptions of the Account | array(int) | product_ids include? 100022 | |
product_names | List of the Products names with active Subscriptions of the Account | array(str) | product_names include? "Default" | |
monthly_billing | Indication that the Account has active Subscriptions with the CSP monthly, Monthly Commitment, ESET solutions for ISP (Monthly), G Suite, Pay in full, and Non-refund billing types, to which the Billing day that caused a Notification event occurring is applicable | boolean | monthly_billing = true | |
account.type_key | Account Type key (see Account Types) | string | account.type_key = "personal" | |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "default" | |
account.balance | Available Account Balance | number | account.balance = 58.5 | |
account.financial_blocking_threshold | The limit, within which the Account balance can be negative without moving the Account to the Credit hold status during the Subzero period | number | account.financial_blocking_threshold = 10000 | |
subscription.expiration_date | Subscription expiration date | date DD.MM.YYYY | 01.01.2019 | |
subscription.payment_model | Payment model: prepay or postpay | string | subscription.payment_model = "postpay" | |
Payment due date is coming | payment.days_left | Number of days prior to Payment due date, when the Notification is sent | integer | payment.days_left = 5 |
Billing day for manager's subscriptions has come (former Billing day has come) | billing_day | The date of the billing day when the Event occurs | integer | billing_day = 5 |
subscriptions_plan_category_keys | Plan category keys that are used for the check whether the Manager has at least one Account with a Subscription in any status except Deleted within the specified Plan categories | array | subscriptions_plan_category_keys include? "azure" | |
subscriptions_statuses | Subscription statuses that are used for the check whether the Manager has at least one Account with a Subscription in any specified status | array | subscriptions_statuses include? "active" | |
Joined payment created Resend the joined payment | account.class_id | Account Class ID (see Account Classes) | integer | account.class_id = 1 |
account.class_key | Account Class key (see Account Classes) | string | account.class_key = "manual" | |
payment.days_passed | Number of days passed after creating the joined Payment Can be used only for the Resend the joined payment Event. | integer | payment.days_passed = 5 | |
Billing day for account's subscription has come | billing_day_passed | Number of days passed after the Billing day to trigger the Event for the previous Billing period The
| integer | billing_day_passed = 5 |
plan_category_key | Key of a Plan category of a Subscription to trigger the Event | string | plan_category_key = "azure" | |
subscription_status | Status of a Subscription to trigger the Event | string | subscription_status = "active' | |
account_class_key | Key of an Account class required for an Account to trigger the Event | string | account_class_key = "default" | |
Correction approved | correction.approved_manager_id | List of IDs of Managers who approved a Correction to trigger the Event | integer | correction.approved_manager_id = 221 |