Placeholders for the Subscription entity

The following placeholders are used for the Subscription entity.

PlaceholderDescription
subscription.idThe subscription ID

subscription.name

The subscription name
subscription.statusThe subscription status
subscription.start_dateThe activation date of a subscription
subscription.expiration_dateThe expiration date of a subscription
subscription.auto_renewalBoolean; the Auto-renew option of a subscription is activated (see Auto-renewing a subscription)
subscription.auto_renewal_disabledBoolean; the Disable the Auto-renew option option of a subscription is activated
subscription.auto_renewal.wasBoolean; the previous status of the Auto-renew option of a subscription — regarding a created manual operation. For details, see Manual operations
subscription.plan_auto_renewal_disabledBoolean; the Disable the Auto-renew option option of the linked plan is activated
subscription.days_left

The number of days until the expiration date of a subscription

subscription.days_passed

The number of days passed since the expiration date of a subscription

subscription.trialBoolean; a subscription is trial
subscription.accountThe name of an account ordered a subscription
subscription.account.idThe ID of an account ordered a subscription
subscription.plan_classThe name of the linked service term (see Managing service terms)
subscription.plan

General information about the linked plan: ID, name, description, status, service term ID (data will be separated by ";")

subscription.plan_period

General information about the linked plan period: duration, trial, setup fee, recurring fee/month, transfer fee, renewal fee, etc. (data will be separated by ";")

subscription.resourcesDetailed information about every resource of a subscription. See Placeholders for the Subscription Resource entity
subscription.billing_typeThe billing type of a subscription
subscription.billing_dayThe day of the month set as the billing day for a subscription
subscription.billing_day_dateThe date of the nearest billing day of a subscription (dd/mm/yyyy)
subscription.billing_day_chargeThe total amount of charges in the Open status that will be closed or blocked on the billing day caused the notification event to occur. Only subscriptions with Auto-renew point (days) = 0 are counted. Applied to monthly billing types
subscription.payment_model

The payment model: prepay or postpay.

To display information about a subscription with the specified payment model:

  • If subscription.payment_model == 'postpay', displays information about a postpaid subscription only.
  • If subscription.payment_model == 'prepay', displays information about a prepaid subscription only.
'notification_settings'For subscription to Microsoft services, see an example in 'first_subscription'
subscription.renew_payment_amountThe numeric amount of funds required to renew a subscription
subscription.renew_payment_amount_currencyThe amount of funds with the currency units required to renew a subscription
subscription.renewal_amountThe amount of funds in the reseller currency required to renew a Subscription. The placeholder can be used to display the amount with the reseller currency units {{ subscription.renewal_amount | format_as_currency }}
subscription.renewal_amount_in_original_currencyThe amount of funds in the plan currency with the plan currency units required to renew a subscription. Does not require format_as_currency
subscription.renewal_payment.receipt_url

A link to download the receipt. This link is used in a notification about the expiration of a subscription

'first_subscription'

A placeholder for an email template to determine whether it is the first subscription to Microsoft services for an account. If a Microsoft subscription is the first one, all necessary data can be sent to a customer, for example, the login and password of the created Microsoft account. Otherwise, any alternative information can be sent using the {% else %} instruction (see possible examples below). Subscriptions based on the Office365 and MicrosoftCspProducts plugins are counted for an account together.

A fragment of the notification template for a subscription based on the Office365 plugin:

<strong>Login</strong>:
{{subscription['notification_settings']['office365']['login']}}<br />
{% if subscription['notification_settings']['office365']['first_subscription']
%}
<strong>Password</strong>:
{{subscription['notification_settings']['office365']['password']}} {% else %}
<strong>Password</strong>: current password for your Microsoft account. {% endif
%}


A fragment of the notification template for a subscription based on the MicrosoftCspProducts plugin:

{% if
subscription['notification_settings']['microsoft_csp_products']['first_subscription']
%} <strong>Your login</strong>:
{{subscription['notification_settings']['microsoft_csp_products']['login']}}<br />
<strong>Temporary password</strong>:
{{subscription['notification_settings']['microsoft_csp_products']['password']}}<br />
{% else %} Use your current login and password for the Microsoft account.<br />
{% endif %}

For more information about the notifications configuration for subscriptions to Microsoft services, see Services. Operator Guide.

subscription.cspAn array of the account subscriptions within the Microsoft CSP program
subscriptionsAn array of the account subscriptions
subscriptions[].billing_typeThe billing type of a subscription from an array
subscriptions[].billing_dayThe day of the month set as the billing day for a subscription from an array
subscriptions[].billing_day_dateThe date of the nearest billing day of a subscription from an array (dd/mm/yyyy)
subscriptions[].billing_day_chargeThe total amount of charges in the Open status that will be closed or blocked on the billing day caused the notification event to occur. Only subscriptions from an array with Auto-renew point (days) = 0 are counted. Applied to monthly billing types
subscriptions[].payment_model

An array of the account subscriptions with the specified payment model:

  • If subscriptions[].payment_model = "postpay", the array includes postpaid subscriptions only.
  • If subscriptions[].payment_model = "prepay", the array includes prepaid subscriptions only.

subscription_postpay.credit_limit

The value of the subscription debt above which a postpaid subscription will be blocked:

subscription.credit_limit

subscription_postpay.current_debt

The current consumption for a subscription calculated as on the subscription details page (see Viewing and updating subscription's details):

  • For the Monthly Prolongation, Monthly Commitment, and Pay as you go (external) billing types, the current debt equals the total amount of charges in the Blocked and New statuses of a subscription only for the current billing period.
  • For other billing types, the current debt equals the total amount of all charges in the Blocked and New statuses of a subscription.

subscription.current_debt

The total amount of all blocked charges of a subscription for the current billing period

subscription.responsible_managers_by_product_id[PRODUCT_ID]['KEY_MANAGER_ROLE']['email']}The email of a responsible manager (см. Managing responsible managers) by the product ID and manager role key
subscription.responsible_managers_by_product_id[PRODUCT_ID]['KEY_MANAGER_ROLE']['name']The name of a responsible manager (см. Managing responsible managers) by the product ID and manager role key
subscription['resources'][RESOURCE_PRIORITY].included

The quantity of a resource with the RESOURCE_PRIORITY priority included in a subscription (for more information about the resource priority, see Plan Resources)

The quantity of the main resource of a subscription:

subscription['resources'][0].included | plus: subscription['resources'][0].additional

Inserting detailed information about every resource of a subscription: see Placeholders for the Subscription Resource entity

subscription['resources'][RESOURCE_PRIORITY].additional

The additional quantity of a resource with the RESOURCE_PRIORITY priority ordered for a subscription (for more information about the resource priority, see Plan Resources)

The quantity of the main resource of a subscription:

subscription['resources'][0].included | plus: subscription['resources'][0].additional

Inserting detailed information about every resource of a subscription: see Placeholders for the Subscription Resource entity

subscription.application_attributes.'plugin_slug'.'attribute_key'

The placeholder returns the value of an additional attribute by the given key (see Viewing details about an application instance) for a subscription based on the plugin defined by plugin_slug:

plugin_slugPlugin name
office365Office365
microsoft_csp_productsMicrosoftCspProducts
vendor_serviceVendor Service Plugin (VSP)
manual_provisioningManual Provisioning

PlaceholderDescription
subscription.application_attributes.office365.user_manualSubscription activation instruction

subscription.application_attributes.vendor_service.user_manual
subscription.application_attributes.microsoft_csp_products.user_manual
subscription.application_attributes.vendor_service.external_idSubscription External ID
subscription.last_billing_period_closed_charges_amountThe amount of charges in the Closed status for a subscription for the previous billing period. The amount is equal to the amount of charges for this subscription in an invoice for the previous billing period
subscription.budget_amount_with_currencyThe spending budget for a subscription, including the reseller currency sign (event handlers Spending budget for a period is approaching and Spending budget has been reached)
subscription.budget_periodThe spending budget period (event handlers Spending budget for a period is approaching and Spending budget has been reached) — in the default language of the Customer Control Panel (see Managing language settings). Example: month
subscription.budget_notification_ thresholdThe spending budget percentage to send a Spending budget for a period is approaching notification
subscription.recipients.emailsThe recipients of a notification about the subscription consumption, regarding the spending budget and notification threshold (event handlers Spending budget for a period is approaching and Spending budget has been reached)
subscription.last_billing_period_start_day

Comparative spending of an account for two last billing periods and weekly spending dynamics by resource (or resource category) of a subscription. Only for a notification template of a Billing day for account's subscription has come event handler. For details, see the code examples in Creating an event handler.

Placeholders linked to resource categories (Microsoft Azure)Placeholders linked to resources (VMware vCloud Director)

subscription.decorated_steps

subscription.max_totals_sum_weekly

subscription.min_totals_sum_weekly

subscription.resource_categories

subscription.resources_total_by_weeks

subscription.decorated_steps_by_resource_name

subscription.max_totals_sum_weekly_by_resource_name

subscription.min_totals_sum_weekly_by_resource_name

subscription.resource_names

subscription.resources_total_by_weeks_and_resource_name

The rest of the placeholders can be used with both resource categories and resources.

subscription.last_billing_period_end_day
subscription.last_billing_period_year
subscription.last_billing_period_month
subscription.last_billing_period_amount_with_currency
subscription.last_billing_period_amount
subscription.pre_last_billing_period_amount
subscription.pre_last_billing_period_amount_with_currency
subscription.pre_last_billing_period_month
subscription.pre_last_billing_period_year
subscription.change_in_periods
subscription.resource_categories
subscription.resource_names
subscription.decorated_steps
subscription.decorated_steps_by_resource_name
subscription.resources_total_by_weeks
subscription.resources_total_by_weeks_and_resource_name
subscription.max_totals_sum_weekly
subscription.max_totals_sum_weekly_by_resource_name
subscription.min_totals_sum_weekly
subscription.min_totals_sum_weekly_by_resource_name
subscription.sales_order.totalThe amount of the sales order of a subscription in the reseller currency. The placeholder can be used to display the amount with the reseller currency units {{ subscription.sales_order.total | format_as_currency }}
subscription.sales_order.total_in_original_currencyThe amount of the sales order of a subscription in the plan currency with the plan currency units. Does not require format_as_currency
subscription.sales_order.charges

The list of charges in the sales order of a subscription. The placeholder is used with the charge placeholders (see Placeholders for the Order and Charge entities) for events about an order and events Subscription changed and VSP subscription created

<div> SO </div>
  <div>Subscription sales order total: {{ subscription.sales_order.total }}</div>
  <div>Subscription sales order total in original currency: {{ subscription.sales_order.total_in_original_currency }}</div>
  <table>
    <tr>
      <td>Description</td>
      <td>Unit price</td>
      <td>Unit price in original currency</td>
      <td>Quantity</td>
      <td>Discount amount</td>
      <td>Discount amount in original currency</td>
      <td>Period</td>
      <td>Amount</td>
      <td>Amount in original currency</td>
      <td>Operate from</td>
      <td>Operate to</td>
      <td>Resource name</td>
    </tr>
{% for charge in subscription.sales_order.charges %}
    <tr>
      <td>{{ charge.description }}</td>
      <td>{{ charge.unit_price }}</td>
      <td>{{ charge.unit_price_in_original_currency }}</td>
      <td>{{ charge.quantity }}</td>
      <td>{{ charge.discount_amount }}</td>
      <td>{{ charge.discount_amount_in_original_currency }}</td>
      <td>{{ charge.period }}</td>
      <td>{{ charge.amount }}</td>
      <td>{{ charge.amount_in_original_currency }}</td>
      <td>{{ charge.operate_from }}</td>
      <td>{{ charge.operate_to }}</td>
      <td>{{ charge.resource_name }}</td>
    </tr>
{% endfor %}
  </table>
subscription.last_change_order.totalThe amount of the latest change order of a subscription in the reseller currency. The placeholder can be used to display the amount with the reseller currency units {{ subscription.last_change_order.total | format_as_currency }}
subscription.last_change_order.total_in_original_currencyThe amount of the latest change order of a subscription in the plan currency with the plan currency units. Does not require format_as_currency
subscription.last_change_order.charges

The list of charges in the sales order of a subscription. The placeholder is used with the charge placeholders (see Placeholders for the Order and Charge entities) for events about an order and events Subscription changed and VSP subscription changed

<div> CO </div>
  <div>Subscription change order total: {{ subscription.last_change_order.total }}</div>
  <div>Subscription change order total in original currency: {{ subscription.last_change_order.total_in_original_currency }}</div>
  <table>
    <tr>
      <td>Description</td>
      <td>Unit price</td>
      <td>Unit price in original currency</td>
      <td>Quantity</td>
      <td>Discount amount</td>
      <td>Discount amount in original currency</td>
      <td>Period</td>
      <td>Amount</td>
      <td>Amount in original currency</td>
      <td>Operate from</td>
      <td>Operate to</td>
      <td>Resource name</td>
    </tr>
{% for charge in subscription.last_change_order.charges %}
    <tr>
      <td>{{ charge.description }}</td>
      <td>{{ charge.unit_price }}</td>
      <td>{{ charge.unit_price_in_original_currency }}</td>
      <td>{{ charge.quantity }}</td>
      <td>{{ charge.discount_amount }}</td>
      <td>{{ charge.discount_amount_in_original_currency }}</td>
      <td>{{ charge.period }}</td>
      <td>{{ charge.amount }}</td>
      <td>{{ charge.amount_in_original_currency }}</td>
      <td>{{ charge.operate_from }}</td>
      <td>{{ charge.operate_to }}</td>
      <td>{{ charge.resource_name }}</td>
    </tr>
{% endfor %}
  </table>
subscription.last_switch_order.totalThe amount of the latest switch plan order of a subscription in the reseller currency. The placeholder can be used to display the amount with the reseller currency units {{ subscription.last_switch_order.total | format_as_currency }}
subscription.last_switch_order.total_in_original_currencyThe amount of the latest switch plan order of a subscription in the plan currency with the plan currency units. Does not require format_as_currency
subscription.last_switch_order.charges

The list of charges in the sales order of a subscription. The placeholder is used with the charge placeholders (see Placeholders for the Order and Charge entities) for events about an order and events Subscription changed and After subscription switched from trial to no-trial

  <div> CH </div>
  <div>Subscription switch_order total: {{ subscription.last_switch_order.total }}</div>
  <div>Subscription switch order total in original currency: {{ subscription.last_switch_order.total_in_original_currency }}</div>
  <table>
    <tr>
      <td>Description</td>
      <td>Unit price</td>
      <td>Unit price in original currency</td>
      <td>Quantity</td>
      <td>Discount amount</td>
      <td>Discount amount in original currency</td>
      <td>Period</td>
      <td>Amount</td>
      <td>Amount in original currency</td>
      <td>Operate from</td>
      <td>Operate to</td>
      <td>Resource name</td>
    </tr>
{% for charge in subscription.last_switch_order.charges %}
    <tr>
      <td>{{ charge.description }}</td>
      <td>{{ charge.unit_price }}</td>
      <td>{{ charge.unit_price_in_original_currency }}</td>
      <td>{{ charge.quantity }}</td>
      <td>{{ charge.discount_amount }}</td>
      <td>{{ charge.discount_amount_in_original_currency }}</td>
      <td>{{ charge.period }}</td>
      <td>{{ charge.amount }}</td>
      <td>{{ charge.amount_in_original_currency }}</td>
      <td>{{ charge.operate_from }}</td>
      <td>{{ charge.operate_to }}</td>
      <td>{{ charge.resource_name }}</td>
    </tr>
{% endfor %}
  </table>
subscription.unexpected_consumptions

The list of the dates and amounts of subscription consumption peaks for an event Unexpected consumption increase detection

{% for unexpected_consumption in subscription.unexpected_consumptions %}

<p>
  Unexpected consumption date: {{ unexpected_consumption.date | format_as_date
  }}
</p>

<p>
  Unexpected consumption amount: {{ unexpected_consumption.amount |
  format_as_currency }}
</p>

{% endfor %}
subscription.last_renew_or_switch_order.statusThe status of the latest renewal or switch plan order of a subscription
subscription.last_renew_or_switch_order.numberThe number of the latest renewal or switch plan order of a subscription


The following placeholders are available only for subscriptions to the plans based on the Vendor Service Plugin (VSP) (Event handlers VSP subscription created and VSP resources changed):

PlaceholderDescription
application.subscription_attribute_{attribute_key}

Returns the value of a subscription attribute (see Managing connector attributes) with the {attribute_key} key.

For example, application.subscription_attribute_first_password is a placeholder for a subscription attribute with the first_password key.

application.distributor_attribute_{attribute_key}

Returns the value of a distributor attribute (see Managing connector attributes) with the {attribute_key} key.

For example, application.distributor_attribute_base_url is a placeholder for a distributor attribute with the base_url key.