Email variables

From Kolmisoft Wiki

Jump to: navigation, search

These variables can be used in emails:

Contents

[edit] Every email

  • <%= server_ip %> - server IP where your users should register their SIP/IAX2 devices.
  • <%= device_type %> - shows the user's primary device type. (The device is set as the primary device after user registration).
  • <%= device_username %> - shows the user's primary device username. (The device is set as the primary device after user registration).
  • <%= device_password %> - shows the user's primary device password. (The device is set as the primary device after user registration).
  • <%= login_url %> - GUI login url.
  • <%= login_username %> - user's username to login to GUI.
  • <%= username %> - same as login_username.
  • <%= first_name %> - first name of the user.
  • <%= last_name %> - last name of the user.
  • <%= full_name %> - first name and last name of the user.
  • <%= balance %> - user's balance.
  • <%= nice_balance %> - formated user's balance.
  • <%= warning_email_balance %> - amount below which user should be warned with email.
  • <%= nice_warning_email_balance %> - formated amount below which user should be warned with email.
  • <%= currency %> - default system currency's short name (USD).
  • <%= user_email %> - user's email address.
  • <%= company_email %> - company email address.
  • <%= email %> - company email address.
  • <%= company %> - company title.
  • <%= primary_device_pin %> - PIN of user's default device. The fault device is created the moment the user registers, so this variable can be used universally.
  • <%= calldate %> - used only from api request email_send.
  • <%= source %> - used only from api request email_send.
  • <%= destination %> - used only from api request email_send.
  • <%= billsec %> - used only from api request email_send.

[edit] After registration

These variables are only available to email templates which are used to send emails after user's successful registration.

  • <%= login_password %> - user's password to login to GUI.
  • <%= user_ip %> - user's IP address.

[edit] Cyberplat payment report

  • <%= currency %> - payment currency.
  • <%= amount %> - payment amount.
  • <%= date %> - payment date.
  • <%= auth_code %> - authorization code.
  • <%= transaction_id %> - payment transaction ID provided by Cyberplat.
  • <%= customer_name %> - payment customer name provided by Cyberplat.
  • <%= description %> - payment details provided by Cyberplat.

[edit] Calling Card purchase

  • <%= cc_purchase_details %> - cards list (Number, Pin, Price).

[edit] Recordings

Templates recording_new and recording_delete accept only these variables:

  • <%= calldate %> - Call date and time (when Call started).
  • <%= source %> - Source number (number only, CallerID name included).
  • <%= destination %> - Destination number.
  • <%= billsec %> - Call duration.
  • <%= full_name %> - first name and last name of the user.

[edit] CDR Export

Templates cdr_export_success and cdr_export_error accept only these variables:

  • <%= current_date %> - current date (when CDR Export was executed).
  • <%= date_from %> - Date 'From', specified in Last Calls filter.
  • <%= date_till %> - Date 'Till', specified in Last Calls filter.
  • <%= archive_size %> - size of CDR archive (tgz).
  • <%= search_user_username %> - username to login of the user who was selected in search filter.
  • <%= search_user_fullname %> - first name and last name of the user who was selected in search filter.
  • <%= search_reseller_username %> - username to login of the reseller who was selected in search filter.
  • <%= search_reseller_fullname %> - first name and last name of the reseller who was selected in search filter.
  • <%= search_device_description %> - description of the device which was selected in search filter.
  • <%= search_device_username %> - username of the device which was selected in search filter.

[edit] Provider Deviation Observers

  • <%= lcr_name %> - Observed LCR name.
  • <%= lcr_id %> - Observed LCR id.
  • <%= provider_name %> - Main Provider.
  • <%= asr_deviation %> - tolerated ASR deviation.
  • <%= acd_deviation %> - tolerated ACD deviation.
  • <%= changed_providers %> - comma separated list of changed Privders in a Deviation Observer.



[edit] Example

This template:

 Hello, <%=full_name%>
 <br><br>
 Your balance in MOR has fallen below <%= nice_warning_email_balance %> <%= currency %> and now is <%= nice_balance %> <%= currency %>.
 <br>
 Please login to <%= login_url %> and replenish it.
 <br><br>
 Yours sincerely,
 <br>
 KOLMISOFT

will result in an email similar to this:

 Hello, John Smith

 Your balance in MOR has fallen below 10.00 USD and now is 5.67 USD.
 Please login to http://your_site/billing and replenish it.

 Yours sincerely,
 KOLMISOFT



[edit] Illegal usage

You will get an error when you try to use non-existent variables.

Also, you cannot use something like this: <%= "www.kolmisoft.com" %>



[edit] See also

Personal tools

Try MOR

Try M2