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.
Event | Placeholder | Description | Type | Example |
---|---|---|---|---|
For all events | owner.status | A status of the user with Owner access rights. | string | owner.status = "active" |
owner.country | An owner address: a two-letter ISO code ISO 3166-1 alpha-2 of the country. | string | owner.country = "BY" | |
owner.city | An owner address: a city. | string | owner.city = "Minsk" | |
current_date | A current date. | date | current_date | |
Account changed Low balance Create instance Reset instance password | account.type_id | An ID of the account type. | integer | account.type_id = 1 |
account.type_key | A key that is used to refer to the account. | string | account.type_key = "business" | |
account.class_id | An ID of the account class (see Account Classes). | integer | account.class_id = 1 | |
account.class_key | A key that is used to refer to the account class (see Account Classes). | string | account.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. | integer | account.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 | integer | account.financial_blocking_threshold = 100 | |
account.balance | A current value of the Account Balance (see Viewing the List of Charges). | integer | account.balance = 1000 | |
account.balance.was | A previous value of the Account Balance (see Viewing the List of Charges). Can be used only for the Low balance event. | integer | account.balance.was = 100 | |
account.status | A current account status: active, inactive, deleted. | string | account.status = "inactive" | |
account.status.was | A previous account status: active, inactive, deleted. Can be used only for the Account changed event. | string | account.status.was = "inactive" | |
account.country | An account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the country. | string | account.country = "BY" | |
account.city | An account address: a city. | string | account.city = "Minsk" | |
Low balance | account.regular_sending | This parameter is used to configure sending SMS notification about a low account balance:
| 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; | boolean | "account.has_endless_trial_subscriptions = true" | |
Invoice closed | invoice.status | An invoice status. | string | invoice.status = "open" |
Manual Operation | operation.id | An ID of manual operation (see Manual Operations). | integer | operation.id = 1 |
operation.status | Status of the Manual operation | string | operation.status = "approval_required" | |
User invitation | - | - | - | - |
Payment has been received | account.type_key | A key that is used to refer to the account type (see Account Types). | string | account.type_key = "business" |
account.class_key | A key that is used to refer to the account class (see Account Classes). | string | account.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. | integer | account.billing_day = 30 | |
account.financial_blocking_threshold | integer | account.financial_blocking_threshold = 100 | ||
account.balance | A 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 | An account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the country | string | account.country = "Belarus" | |
account.city | An account address: a city. | string | account.city = "Minsk" | |
payment.total | An amount of the payment. | integer | payment.total = 100 | |
payment.status | Payment status | string | payment.status = "completed" | |
Password reset request Verify email | user.id | A unique identification number of the user | integer | user.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). | string | account.type_key = "business" |
account.class_key | A key that is used to refer to the account class (see Account Classes). | string | account.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. | integer | account.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 | integer | account.financial_blocking_threshold = 100 | |
account.balance | A 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 | An account's address: a two-letter ISO code ISO 3166-1 alpha-2 of the country. | string | account.country = "Belarus" | |
account.city | An account address: a city. | string | account.city = "Minsk" | |
plan.id | A plan ID. | integer | plan.id = 1 | |
plan.status | Plan status | string | plan.status = "completed" | |
plan_category.key | A key that is used to refer to the plan category (see Managing Plan Categories). | string | plan_category.key = "streaming" | |
plan_period.duration_value | A duration of the subscription for the plan. | 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: yes or no. | boolean | plan_period.trial = "false" | |
plan_period.setup_fee | A price of the resource installation. It is used for one-time payment. | integer | plan_period.setup_fee = 100 | |
plan_period.recurring_fee | A 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. | integer | plan_period.recurring_fee = 100 | |
plan_period.renewal_fee | A value of fee, which the subscriber has to pay to renew the resource. | integer | plan_period.renewal_fee = 100 | |
subscription.id | An subscription ID . | integer | subscription.id = 1 | |
subscription.status | A current subscription status: | string | subscription.status = "active" | |
subscription.status.was | A previous subscription status. | string | subscription.status.was="installing" | |
subscription.auto_renewal | If the auto renewal option is active: true or false. | boolean | subscription.auto_renewal = "true" | |
subscription.days_left | A number of days before expiration day of the subscription. | integer | subscription.days_left = 7 | |
subscription.days_passed | A number of days after creation day of the subscription. | integer | subscription.days_passed = 15 | |
subscription.plan_class | An plan class ID (see Managing Plan Classes). | integer | subscription.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" | |
subscription.renewal_amount | The amount of funds that is required for topping up the Account Balance to renew a Subscription in the automatic mode | number | subscription.renewal_amount = 123.4 | |
product.id | ID of the Plan Product, for which the Subscription exists (see Editing general information about the Plan) | integer | product.id = 1 | |
product.name | Name of the Plan Product, for which the Subscription exists (see Editing general information about the Plan) | integer | product.name = "Default" | |
Order changed Order created | order.id | An ID of the order. | integer | order.id = 1 |
order.plans_ids | ID 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. | string | order.status.was = "provisioning" | |
order.total | A total amount of order. | integer | order.total = 100 | |
order.type | Order type | string | order.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. | boolean | order.renewal_point = "true" | |
product.id | ID of the Plan Product, for which the Subscription exists, that is included in the Order (see Viewing Order Details) | integer | product.id = 1 | |
product.name | Name of the Plan Product, for which the Subscription exists, that is included in the Order (see Viewing Order Details) | integer | product.name = "Default" | |
Guaranteed payment created Guaranteed payment changed | account.type_id | An ID of the account type (see Account Types). | integer | account.type_id = 1 |
account.type_key | A key that is used to refer to the account type (see Account Types). | string | account.type_key = "business" | |
account.class_id | An ID of the account class (see Account Classes). | integer | account.class_id = 1 | |
account.class_key | A key that is used to refer to the account class (see Account Classes). | string | account.class_key = "manual" | |
guaranteed_payment.status.was | A previous status of the Guaranteed Payment (see Managing Guaranteed Payments). | string | guaranteed_payment.status.was = "provided" | |
guaranteed_payment.status | A current status of the Guaranteed Payment (see Managing Guaranteed Payments). | string | guaranteed_payment.status = "revoked" | |
Guaranteed payment will expire | guaranteed_payment.days_left | A number of days before the expiration date of a Guaranteed Payment | integer | guaranteed_payment.days_left = 1 |
Billing day is coming | billing_day | A date of the Billing day (see Creating a Plan Class) | integer | billing_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 | integer | billing_day_left = 7 | |
billing_day_open_charges_amount | A 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 occurring | number | billing_day_open_charges_amount = 120.1 | |
plan_ids | Array of the Plans of the Account active Subscriptions | array(int) | plan_ids = [200023, 200024] | |
product_ids | An array of the Products IDs of the Plans, for which the active Subscriptions exist | array(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_billing | An 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 applicable | boolean | monthly_billing = "true" | |
account.type_key | A key of the Account type (see Account Types) | string | account.type_key = "personal" | |
account.class_key | A key of the Account class (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 | |
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 |
Credit hold threshold was changed Account credit hold is coming | 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 |
Credit limit for postpaid subscription was changed | subscription_postpay.credit_limit | The value of the subscription debt, above which the postpaid Subscription will be stopped | integer | subscription_postpay.credit_limit = 100 |
Credit limit for postpaid subscription is approaching | subscription_postpay.current_debt | The Subscription debt that is calculated as the total amount of all blocked Charges for the Subscription for the current Billing period | integer | subscription_postpay.current_debt = 100 |
Billing day has come | previous_billing_period_start_day | The start day of the previous Billing period with respect to the Billing period for which the Event is occurred | date DD.MM.YYYY | 01.01.2019 |
previous_billing_period_end_day | The end day of the previous Billing period with respect to the Billing period for which the Event is occurred | date DD.MM.YYYY | 01.01.2019 | |
manager_accounts | Accounts of the Manager | object | ||
manager_accounts[].id | Account ID | integer | 220001 | |
manager_accounts[].primary_name | Account primary name | string | ACME Inc. | |
manager_accounts[].type_key | Account type key | string | Personal | |
manager_accounts[].class_key | Account class key | string | Default | |
manager_accounts[].balance | Account Balance | number | 58.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 | number | 10000 | |
manager_accounts[].subscriptions[] | Subscriptions of the Account | array | ||
manager_accounts[].subscriptions[].id | Subscription ID | integer | 320001 | |
manager_accounts[].subscriptions[].name | Subscription name | string | Microsoft Azure | |
manager_accounts[].subscriptions[].payment_model | Payment model: prepay or postpay | string | postpay | |
manager_accounts[].subscriptions[].payment_model_parameters[] | Postpaid Subscription parameters (payment_model = postpay).
| 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 | string | azure | |
manager_accounts[]. subscriptions[].closed_charges_amount | The amount of closed Charges for the Subscription for the previous Billing period | number | 12000.15 |