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

A status of the user with Owner access rights.stringowner.status = "active"

owner.country

An owner address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.stringowner.country = "BY"

owner.city

An owner address: a city.stringowner.city = "Minsk"
current_dateA current date.datecurrent_date





Account changed

Low balance

Create instance

Reset instance password

account.type_idAn ID of the account type.integeraccount.type_id = 1
account.type_keyA key that is used to refer to the account.stringaccount.type_key = "business"
account.class_idAn ID of the account class (see Account Classes).integeraccount.class_id = 1
account.class_keyA key that is used to refer to the account class (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.credit_limit

A maximum amount of the credit that a customer can use for ordering services without topping up. The credit limit can be set manually or by default (see Account Classes).

integeraccount.credit_limit = 100
account.balanceA current value of the Account Balance (see Viewing the List of Charges).integeraccount.balance = 1000
account.balance.wasA previous value of the Account Balance (see Viewing the List of Charges).integeraccount.balance.was = 100
account.statusA current account status: active, inactive, deleted.stringaccount.status = "inactive"
account.status.wasA previous account status: active, inactive, deleted.stringaccount.status.was = "inactive"
account.countryAn account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.stringaccount.country = "BY"
account.cityAn account address: a city.stringaccount.city = "Minsk"
Low balanceaccount.regular_sending

This parameter is used to configure sending SMS notification about a 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.statusAn invoice status.stringinvoice.status = "open"

Manual Operation

operation.idAn ID of manual operation (see Manual Operations).integeroperation.id = 1
operation.statusStatus of the Manual operationstringoperation.status = "approval_required"

User invitation

----






Payment has been received

account.type_keyA key that is used to refer to the account type (see Account Types).stringaccount.type_key = "business"
account.class_keyA key that is used to refer to the account class (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.credit_limit

integeraccount.credit_limit = 100
account.balanceA current value of the Account Balance (see Viewing the List of Charges).integeraccount.balance = 1000
account.balance.wasA previous value of the Account Balance (see Viewing the List of Charges).integeraccount.balance.was = 100
account.statusCurrent Account statusstringaccount.status = "inactive"
account.status.wasPrevious Account statusstringaccount.status.was = "inactive"
account.countryAn account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the countrystringaccount.country = "Belarus"
account.cityAn account address: a city.stringaccount.city = "Minsk"
payment.totalAn amount of the payment.integerpayment.total = 100
payment.status

Payment status

stringpayment.status = "completed"

Password reset request

Verify email

user.idA unique identification number of the userintegeruser.id = 1











Before subscription expiration

After subscription expiration

After subscription switched from trial to non-trial

Subscription changed

account.type_key

A key that is used to refer to the account type (see Account Types).

stringaccount.type_key = "business"
account.class_keyA key that is used to refer to the account class (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.credit_limit

The maximum amount of the credit that a customer can use for ordering services without topping up. The credit limit can be set manually or by default (see Account Classes).

integeraccount.credit_limit = 100
account.balanceA current value of the Account Balance (see Viewing the List of Charges).integeraccount.balance = 1000
account.balance.wasA previous value of the Account Balance (see Viewing the List of Charges).integeraccount.balance.was = 100
account.statusCurrent Account statusstringaccount.status = "inactive"
account.status.wasPrevious Account statusstringaccount.status.was = "inactive"
account.countryAn account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.stringaccount.country = "Belarus"
account.cityAn account address: a city.stringaccount.city = "Minsk"
plan.idA plan ID.integerplan.id = 1
plan.status

Plan status

stringplan.status = "completed"
plan_category.key

A key that is used to refer to the plan category (see Managing Plan Categories).

stringplan_category.key = "streaming"
plan_period.duration_valueA 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 no.booleanplan_period.trial = "false"
plan_period.setup_fee

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

integerplan_period.setup_fee = 100
plan_period.recurring_feeA value of monthly fee for the resource. This type of fee is used if the customer has to pay for the resource each month to renew the subscription.integerplan_period.recurring_fee = 100
plan_period.renewal_feeA value of fee, which the subscriber has to pay to renew the resource.integerplan_period.renewal_fee = 100
subscription.idAn subscription ID .integersubscription.id = 1
subscription.status

A current subscription status:

stringsubscription.status = "active"
subscription.status.wasA previous subscription status.stringsubscription.status.was="installing"
subscription.auto_renewalIf the auto renewal option is active: true or false.booleansubscription.auto_renewal = "true"
subscription.days_leftA number of days before expiration day of the subscription.integersubscription.days_left = 7
subscription.days_passedA number of days after creation day of the subscription.integersubscription.days_passed = 15
subscription.plan_class

An plan class ID (see Managing Plan Classes).

integersubscription.plan_class = 1
subscription.trial.status

A placeholder (boolean) for tracking the status (trial / no-trial) of the plan period, which is used for the "Subscription is changed" event. 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"

product.id

ID of the Plan Product, for which the Subscription exists (see Editing general information about the Plan)

integerproduct.id = 1
product.nameName of the Plan Product, for which the Subscription exists (see Editing general information about the Plan)integerproduct.name = "Default"


Order changed

Order created

order.idAn ID of the order.integerorder.id = 1
order.plans_idsID of ordered plans.integerorder.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 order.stringorder.status.was = "provisioning"
order.totalA total amount of order.integerorder.total = 100
order.type

Order type

stringorder.type = "RenewalOrder"
order.renewal_point

If 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.idID of the Plan Product, for which the Subscription exists, that is included in the Order (see Viewing Order's Details)integerproduct.id = 1
product.nameName of the Plan Product, for which the Subscription exists, that is included in the Order (see Viewing Order's Details)integerproduct.name = "Default"


Guaranteed payment created

Guaranteed payment changed

account.type_idAn ID of the account type (see Account Types).integeraccount.type_id = 1
account.type_keyA key that is used to refer to the account type (see Account Types).stringaccount.type_key = "business"
account.class_idAn ID of the account class (see Account Classes).integeraccount.class_id = 1
account.class_key

A key that is used to refer to the account class (see Account Classes).

stringaccount.class_key = "manual"
guaranteed_payment.status.wasA previous status of the guaranteed payment (see Managing Guaranteed Payments).stringguaranteed_payment.status.was = "provided"
guaranteed_payment.statusA current status of the guaranteed payment (see Managing Guaranteed Payments).stringguaranteed_payment.status = "revoked"
Billing day is comingbilling_dayA date of the Billing day (see Creating a Plan Class)integerbilling_day = 5
billing_day_left

a 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_amountA sum 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_idsArray of the Plans of the Account active Subscriptionsarray(int)plan_ids = [200023, 200024]
product_idsAn array of the Products IDs of the Plans, for which the active Subscriptions existarray(int)product_ids = [100022, 100023]
product_names

An array of the Products names of the Plans, for which the active Subscriptions exist

array(str)product_names include? "Default"
monthly_billingAn indication 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_keyA key of the Account type (see Account Types)stringaccount.type_key = "personal"
account.class_keyA key of the Account class (see Account Classes)stringaccount.class_key = "default"
account.balanceAvailable Account balancenumberaccount.balance = 58.5
account.credit_limitCredit limit of the Accountnumberaccount.credit_limit = 10000