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 to extract information from the database and put into a notification message.

EventPlaceholderDescriptionTypeExample

For all events

owner.status

Status of the user with the Owner access rightsstringowner.status = "active"

owner.country

Owner address: two-letter ISO code ISO 3166-1 alpha-2 of the countrystringowner.country = "BY"

owner.city

Owner address: citystringowner.city = "Minsk"
current_dateCurrent datedatecurrent_date

Account changed

Low balance

Create instance

Reset instance password

account.type_idAccount Type IDintegeraccount.type_id = 1
account.type_keyAccount Type keystringaccount.type_key = "business"
account.class_idAccount Class ID (see Account Classes)integeraccount.class_id = 1
account.class_keyAccount Class key (see Account Classes)stringaccount.class_key = "manual"
account.billing_day

The billing day is set in the Plan Class (see Managing Plan Classes).

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

integeraccount.billing_day = 30
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

integeraccount.financial_blocking_threshold = 100
account.balance

Current value of the Account Balance (see Viewing the List of Charges)

integeraccount.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

integeraccount.balance.was = 100
account.statusCurrent Account status: active, inactive, deletedstringaccount.status = "inactive"
account.status.was

Previous Account status: active, inactive, deleted.

Can be used only for the Account changed event

stringaccount.status.was = "inactive"
account.countryAccount address: two-letter ISO code ISO 3166-1 alpha-2 of the countrystringaccount.country = "BY"
account.cityAccount address: citystringaccount.city = "Minsk"
Low balanceaccount.regular_sending

This parameter is used to configure sending SMS notification about the low Account Balance:

  • If "account.regular_sending = true", then notification is sent only during billing process.
  • If "account.regular_sending = false", then notification is sent only when the balance changed.
  • Else, when regular_sending doesn't specify, notification is sent in all cases: during billing processes as well as when the balance changed.
boolean"account.regular_sending = true"
account.has_endless_trial_subscriptions

This parameter is used to choose the subscription type, to which the SMS notifications will be sent (trial / no-trial subscription).

If "account.has_endless_trial_subscriptions = true", the notification about low balance is sent only to customers with at least one non-trial endless subscription.
Notification about low balance isn't sent to customers with non-trial subscription with expiration date and trial subscription.

boolean"account.has_endless_trial_subscriptions = true"

Invoice closed

invoice.statusInvoice statusstringinvoice.status = "open"

Manual Operation

operation.idManual operation ID (see Manual Operations)integeroperation.id = 1
operation.statusManual operation statusstringoperation.status = "approval_required"
product.idProduct IDintegerproduct.id = 1
product.nameProduct namestringproduct.name = "ESET"
product_category.idProduct Category IDintegerproduct_category.id = 1
plan.idPlan IDintegerplan.id = 1
plan_category.keyPlan Category ID
stringplan_category.key = "default"
subscription.idSubscription IDintegersubscription.id = 1
subscription.status.wasSubscription status (previous)
stringsubscription.status.was="installing"
subscription.statusSubscription status (current)
stringsubscription.status.was="active"
account.type_keyAccount Type key (see Account Types)stringaccount.type_key = "personal"
account.class_keyAccount Class key (see Account Classes)
stringaccount.class_key = "default"

User invitation

----

Payment has been received

account.type_keyAccount Type key (see Account Types)stringaccount.type_key = "business"
account.class_keyAccount Class key (see Account Classes)stringaccount.class_key = "manual"
account.billing_day

The billing day is set in the Plan Class (see Managing Plan Classes).

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

integeraccount.billing_day = 30
account.financial_blocking_threshold

integeraccount.financial_blocking_threshold = 100
account.balanceCurrent value of the Account Balance (see Viewing the List of Charges)integeraccount.balance = 1000
account.statusCurrent Account statusstringaccount.status = "inactive"
account.countryAccount address: two-letter ISO code ISO 3166-1 alpha-2 of the countrystringaccount.country = "Belarus"
account.cityAccount address: citystringaccount.city = "Minsk"
payment.totalPayment amountintegerpayment.total = 100
payment.status

Payment status

stringpayment.status = "completed"

Password reset request

Verify email

user.idUser IDintegeruser.id = 1

Before subscription expiration

After subscription expiration

After subscription switched from trial to non-trial

Subscription changed

account.type_key

Account Type key (see Account Types)

stringaccount.type_key = "business"
account.class_keyAccount Class key (see Account Classes)
stringaccount.class_key = "manual"
account.billing_day

The billing day is set in the Plan Class (see Managing Plan Classes).

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

integeraccount.billing_day = 30
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

integeraccount.financial_blocking_threshold = 100
account.balanceCurrent value of the Account Balance (see Viewing the List of Charges)integeraccount.balance = 1000
account.statusCurrent Account statusstringaccount.status = "inactive"
account.countryAccount address: two-letter ISO code ISO 3166-1 alpha-2 of the country.stringaccount.country = "Belarus"
account.cityAccount address: citystringaccount.city = "Minsk"
plan.idPlan IDintegerplan.id = 1
plan.status

Plan status

stringplan.status = "completed"
plan_category.key

Plan Category key (see Managing Plan Categories)

stringplan_category.key = "streaming"
plan_period.duration_value

Duration of the subscription for the Plan

integerplan_period.duration_value = 30
plan_period.duration_typeUnits of the Plan period (year, month, day)stringplan_period.duration_type = "months"
plan_period.trialPlan period is trial: yes or nobooleanplan_period.trial = "false"
plan_period.setup_fee

Price of the resource installation. It is used for one-time payment

integerplan_period.setup_fee = 100
plan_period.recurring_feeMonthly fee for the resource. This type of fee is used if the customer has to pay for the resource each month to renew the subscriptionintegerplan_period.recurring_fee = 100
plan_period.renewal_feeFee for renewing the resourceintegerplan_period.renewal_fee = 100
subscription.idSubscription IDintegersubscription.id = 1
subscription.status

Subscription status (current)

stringsubscription.status = "active"
subscription.status.wasSubscription status (previous)
stringsubscription.status.was="installing"
subscription.auto_renewalIf the auto renewal option is active: true or falsebooleansubscription.auto_renewal = "true"
subscription.days_leftNumber of days before expiration day of the subscriptionintegersubscription.days_left = 7
subscription.days_passedNumber of days after creation day of the subscriptionintegersubscription.days_passed = 15
subscription.plan_class

Plan Class ID (see Managing Plan Classes)

integersubscription.plan_class = 1
subscription.trial.status

Plan period status (trial / no-trial). You can add this placeholder to the event handler for the "Subscription is changed" event (for example, «subscription.trial = false»). In this case, if the Plan period is changed from trial to no-trial, the notifications will be sent

string

subscription.trial.status = "trial"

subscription.trial.status = "no-trial"

subscription.renewal_amountThe amount of funds that is required for topping up the Account Balance to renew a Subscription in the automatic modenumbersubscription.renewal_amount = 123.4
product.id

Product ID (see Editing general information about the Plan)

integerproduct.id = 1
product.nameProduct name (see Editing general information about the Plan)integerproduct.name = "Default"

Order changed


Order created

order.idOrder IDintegerorder.id = 1
order.plans_idsIDs of ordered plansintegerorder.type = "SalesOrder" and (order.plans_ids include? 2000030)
order.status

Current status of the Order

stringorder.status = "waiting for payment"
order.status.wasPrevious status of the Orderstringorder.status.was = "provisioning"
order.totalTotal amount of Orderintegerorder.total = 100
order.type

Order type

stringorder.type = "RenewalOrder"
order.renewal_point

Whether the value in the "Renew point (days)" field is set on the subscription's details page (see Viewing and updating Subscription's details): true or false

booleanorder.renewal_point = "true"
product.idProduct ID included in the Order (see Viewing Order Details)integerproduct.id = 1
product.nameProduct name included in the Order (see Viewing Order Details)integerproduct.name = "Default"

Guaranteed payment created


Guaranteed payment changed

account.type_idAccount Type ID (see Account Types)integeraccount.type_id = 1
account.type_keyAccount Type key (see Account Types)stringaccount.type_key = "business"
account.class_idAccount Class ID (see Account Classes)integeraccount.class_id = 1
account.class_key

Account Class key (see Account Classes)

stringaccount.class_key = "manual"
guaranteed_payment.status.wasPrevious status of the Guaranteed Payment (see Managing Guaranteed Payments)stringguaranteed_payment.status.was = "provided"
guaranteed_payment.statusCurrent status of the Guaranteed Payment (see Managing Guaranteed Payments)stringguaranteed_payment.status = "revoked"
Guaranteed payment will expireguaranteed_payment.days_leftNumber of days before the expiration date of a Guaranteed Paymentintegerguaranteed_payment.days_left = 1
Billing day is comingbilling_dayBilling day date (see Creating a Plan Class)integerbilling_day = 5
billing_day_left

Number of days left to the Billing day that caused the Notification event occuring (see Creating an Event Handler)

On the Billing day, which caused the Notification event occuring, the Placeholder will return an amount of days left to the next Billing day

integerbilling_day_left = 7
billing_day_open_charges_amountSum of the amounts of opened Charges for the active (not deleted) Subscriptions with the G-Suite, CSP monthly, Pay in Full billing types that will be closed or blocked on the Billing day that caused the Notification event occurringnumberbilling_day_open_charges_amount = 120.1
plan_idsList of the Plan IDs with active Subscriptions of the Accountarray(int)plan_ids = [200023, 200024]
product_idsList of the Products IDs with active Subscriptions of the Accountarray(int)product_ids = [100022, 100023]
product_names

List of the Products names with active Subscriptions of the Account

array(str)product_names include? "Default"
monthly_billingIndication that the Account has active Subscriptions with the G-Suite, CSP monthly, Pay in Full billing types, to which the Billing day that caused a Notification event occurring is applicablebooleanmonthly_billing = "true"
account.type_keyAccount Type key (see Account Types)stringaccount.type_key = "personal"
account.class_keyAccount Class key (see Account Classes)stringaccount.class_key = "default"
account.balanceAvailable Account Balancenumberaccount.balance = 58.5
account.financial_blocking_thresholdThe limit, within which the Account balance can be negative without moving the Account to the Credit hold status during the Subzero periodnumberaccount.financial_blocking_threshold = 10000
Payment due date is coming

payment.days_left

Number of days prior to Payment due date, when the Notification is sentinteger

payment.days_left = 5

Credit hold threshold was changed


Account credit hold is coming

account.financial_blocking_thresholdThe limit, within which the Account balance can be negative without moving the Account to the Credit hold status during the Subzero periodnumberaccount.financial_blocking_threshold = 10000
Credit limit for postpaid subscription was changedsubscription_postpay.credit_limitThe value of the subscription debt, above which the postpaid Subscription will be stoppedintegersubscription_postpay.credit_limit = 100
Credit limit for postpaid subscription is approachingsubscription_postpay.current_debtThe Subscription debt that is calculated as the total amount of all blocked Charges for the Subscription for the current Billing periodintegersubscription_postpay.current_debt = 100
Billing day has comeprevious_billing_period_start_dayThe start day of the previous Billing period with respect to the Billing period for which the Event is occurreddate DD.MM.YYYY01.01.2019
previous_billing_period_end_dayThe end day of the previous Billing period with respect to the Billing period for which the Event is occurreddate DD.MM.YYYY01.01.2019
manager_accountsAccounts of the Managerobject
manager_accounts[].idAccount IDinteger220001
manager_accounts[].primary_nameAccount primary namestringACME Inc.
manager_accounts[].type_keyAccount type keystringPersonal
manager_accounts[].class_keyAccount class keystringDefault
manager_accounts[].balanceAccount Balancenumber58.5
manager_accounts[].financial_blocking_threshold

Value of the Financial blocking threshold that is set in the Account class or redefined on the Account level

number10000
manager_accounts[].subscriptions[]Subscriptions of the Accountarray
manager_accounts[].subscriptions[].idSubscription IDinteger320001
manager_accounts[].subscriptions[].nameSubscription namestringMicrosoft Azure
manager_accounts[].subscriptions[].payment_modelPayment model: prepay or postpaystringpostpay
manager_accounts[].subscriptions[].payment_model_parameters[]

Postpaid Subscription parameters (payment_model = postpay).

  • "credit_limit" — the Subscription credit limit
  • "current_debt" — the Current debt for the Subscription.

(see Viewing and updating Subscription's details)

array

"credit_limit": 4963.0,

"current_debt": 500.11

manager_accounts[].subscriptions[].plan_category_key

Plan Category key that is used for the check whether the Account has non-deleted Subscriptions within the specified Plan Category

stringazure
manager_accounts[].
subscriptions[].closed_charges_amount
The amount of closed Charges for the Subscription for the previous Billing periodnumber12000.15