Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added documentation for notification tags

...

OptionDescription
Notice

The action triggers the notification.

OptionDescription
AddExecuted when a package is created.
EditExecuted when a package is updated.
Post URL/EmailThe URL to post to, or the email address to email, when the notice is triggered
HTTP CodeThe HTTP Response Code returned by the URL that signifies a successful transmission.
Response ContainsSome portion of the output returned by the URL that signifies a successful transmission. This can be used separately, or in conjunction with the HTTP Code for more refined control over successful responses.
From EmailThe address to send email notifications from.
SubjectThe subject of the email notification.
HTML/TextThe HTML and Text body content for the email notification.

...

Package Option

...

Notification Tags

Service option notifications are executed when an action is performed on the service.

...

The action triggers the notification.

OptionDescription
AddExecuted when a service is created.
EditExecuted when a service is updated.
SuspendExecuted when a service is suspended.
UnsuspendExecuted when a service is unsuspended.
CancelExecuted when a service is canceled.
RenewExecuted when a service is renewed. That is, the invoice generated for the service renewal is paid.
Package ChangeExecuted when the package is changed for the service.

...

The service option notification emails allow for the following tags:

TagsDescriptionNotes

{*}

The value submitted for this custom fieldEvery custom service field or package field has a tag associated with it, this tag is labeled by the fields name represented here by *
{*_name}This is the label associated with the submitted value for fields of type select or radioThis tag is only available for radio and select fields
{*_values}This is a list of checked boxes for this field each containing the box's label and valueThis tag is only available for checkbox fields
{_action}The code of the action for which this notification is being sent 
{_package.id}The system-level service IDThe _package tag is not available for the package addition notification
{_package.description}The package's description 
{_package.module_row}The ID of the module row the package is associated with 
{_package.status}

The status of the package 
Info
titleEmail Tags

The {*_values} contains data in the following format. For a guide on using email tags in Blesta see the 'Customizing Emails' page.

 

custom_1_values = array(
    array(
         'value' => '1',
         'name' => 'Option 1'
    ),
    array(
         'value' => '2',
         'name' => 'Option 2'
    )
);
Expand
titleAdditional Tags

Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, a dump of the tags are shown below.

Code Block
titleThe {package} object
collapsetrue
stdClass Object
    (
        [id] => '94'
        [id_format] => '{num}'
        [id_value] => '92'
        [module_id] => '2'
        [name] => 'Test Universal Package'
        [description] => 'A test package for the universal module.'
        [description_html] => '<p>A test package for the Universal Module.</p>'
        [qty] => null
        [module_row] => '1'
        [module_group] => null
        [taxable] => '1'
        [single_term] => '0'
        [status] => 'active'
        [company_id] => '1'
        [prorata_day] => null
        [prorata_cutoff] => null
        [id_code] => '92'
        [email_content] => Array
            (
                [0] => stdClass Object
                    (
                        [lang] => 'en_us'
                        [html] => '<p>Welcome email for the Universal Module.</p>'
                        [text] => 'Welcome email for the Universal Module.'
                    )
            )
        [pricing] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '628'
                        [pricing_id] => '875'
                        [package_id] => '94'
                        [term] => '1'
                        [period] => 'month'
                        [price] => '2500.0000'
                        [setup_fee] => '0.0000'
                        [cancel_fee] => '0.0000'
                        [currency] => 'USD'
                    )
            )
        [meta] => stdClass Object
        [groups] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '10'
                        [name] => 'Test Universal Package Group'
                        [description] => null
                        [type] => 'standard'
                        [company_id] => '1'
                        [allow_upgrades] => '1'
                    )
            )
        [option_groups] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '26'
                        [name] => 'Test Universal Option Group'
                        [description] => 'A list of options'
                    )
            )
    )

Service Option Notifications

Service option notifications are executed when an action is performed on the service.

OptionDescription
Notice

The action triggers the notification.

OptionDescription
AddExecuted when a service is created.
EditExecuted when a service is updated.
SuspendExecuted when a service is suspended.
UnsuspendExecuted when a service is unsuspended.
CancelExecuted when a service is canceled.
RenewExecuted when a service is renewed. That is, the invoice generated for the service renewal is paid.
Package ChangeExecuted when the package is changed for the service.
Post URL/EmailThe URL to post to, or the email address to email, when the notice is triggered
HTTP CodeThe HTTP Response Code returned by the URL that signifies a successful transmission.
Response ContainsSome portion of the output returned by the URL that signifies a successful transmission. This can be used separately, or in conjunction with the HTTP Code for more refined control over successful responses.
From EmailThe address to send email notifications from.
SubjectThe subject of the email notification.
HTML/TextThe HTML and Text body content for the email notification.

Service Option Notification Tags

The service option notification emails allow for the following tags:

TagsDescriptionNotes

{*}

The value submitted for this custom fieldEvery custom service field or package field has a tag associated with it, this tag is labeled by the fields name represented here by *
{*_name}This is the label associated with the submitted value for fields of type select or radioThis tag is only available for radio and select fields
{*_values}This is a list of checked boxes for this field each containing the box's label and valueThis tag is only available for checkbox fields
{_action}The code of the action for which this notification is being sent 
{_service.id}The system-level service IDThe _service tag is not available for the service addition notification
{_service.status}The service status 
{_service.date_added}The UTC datetime stamp of the date the service was addedFormatted as "YYYY-MM-DD HH:MM:SS"
{_service.date_renews}The UTC datetime stamp of the service renew dateFormatted as "YYYY-MM-DD HH:MM:SS"
{_service.date_last_renewed}The UTC datetime stamp of the service's last renew dateFormatted as "YYYY-MM-DD HH:MM:SS"
{_service.date_suspended}The UTC datetime stamp of the date the service was suspendedFormatted as "YYYY-MM-DD HH:MM:SS"
{_service.date_canceled}The UTC datetime stamp of the date the service was canceledFormatted as "YYYY-MM-DD HH:MM:SS"
{_package.id}The system-level service ID 
{_package.description}The package's description 
{_package.module_row}The ID of the module row the package is associated with 
{_package.status}The status of the package 
{_other.*}The _other tag contains additional information, most of which is received through user inputHere * is the name of the field to access from the other tag (e.g. pricing_id)
Info
titleEmail Tags

The {*_values} contains data in the following format. For a guide on using email tags in Blesta see the 'Customizing Emails' page.

 

custom_1_values = array(
    array(
         'value' => '1',
         'name' => 'Option 1'
    ),
    array(
         'value' => '2',
         'name' => 'Option 2'
    )
);
Expand
titleAdditional Tags

Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, a dump of the tags are shown below.

 

Code Block
titleThe {service} object
collapsetrue
stdClass Object
    (
        [id] => 234
        [parent_service_id] => 
        [package_group_id] => 1
        [id_format] => PD-{num}
        [id_value] => 229
        [pricing_id] => 22
        [client_id] => 3
        [module_row_id] => 6
        [coupon_id] => 
        [qty] => 1
        [status] => in_review
        [date_added] => 2013-05-13 18:33:14
        [date_renews] => 2013-06-13 18:33:14
        [date_last_renewed] => 
        [date_suspended] => 
        [date_canceled] => 
        [id_code] => PD-229
        [fields] => Array
            (
                [0] => stdClass Object
                    (
                        [key] => cpanel_confirm_password
                        [value] => password
                        [serialized] => 0
                        [encrypted] => 1
                    )
                [1] => stdClass Object
                    (
                        [key] => cpanel_domain
                        [value] => domain.com
                        [serialized] => 0
                        [encrypted] => 0
                    )
                [2] => stdClass Object
                    (
                        [key] => cpanel_password
                        [value] => password
                        [serialized] => 0
                        [encrypted] => 1
                    )
                [3] => stdClass Object
                    (
                        [key] => cpanel_username
                        [value] => domainco
                        [serialized] => 0
                        [encrypted] => 0
                    )
            )
        [package_pricing] => stdClass Object
            (
                [id] => 22
                [package_id] => 13
                [term] => 1
                [period] => month
                [price] => 8.0000
                [setup_fee] => 0.0000
                [cancel_fee] => 0.0000
                [currency] => USD
            )
        [package] => stdClass Object
            (
                [id] => 13
                [id_format] => {num}
                [id_value] => 1
                [module_id] => 4
                [name] => Bronze Standard
                [description] => 
                [description_html] => <p>
	<span style="color:#008000;"><em>Good Value!</em></span></p>
                [qty] => 
                [module_row] => 6
                [module_group] => 
                [taxable] => 0
                [status] => active
                [company_id] => 1
            )
        [name] => domain.com
 
        [coupon] => stdClass Object
            (
                [id] => 2
                [code] => knW3Lesn
                [company_id] => 1
                [used_qty] => 16
                [max_qty] => 0
                [start_date] => 2017-02-02 08:00:00
                [end_date] => 2018-02-03 07:59:59
                [status] => active
                [recurring] => 0
                [limit_recurring] => 0
                [apply_package_options] => 1
                [internal_use_only] => 0
                [type] => exclusive
                [amounts] => Array
                    (
                        [0] => stdClass Object
                            (
                                [coupon_id] => 2
                                [currency] => USD
                                [amount] => 5.0000
                                [type] => amount
                            )
                    )
                [packages] => Array
                    (
                        [0] => stdClass Object
                            (
                                [coupon_id] => 2
                                [package_id] => 80
                            )
                    )
            )
    )
Code Block
titleThe {package} object
collapsetrue
stdClass Object
    (
        [id] => '94'
        [id_format] => '{num}'
        [id_value] => '92'
        [module_id] => '2'
        [name] => 'Test Universal Package'
        [description] => 'A test package for the universal module.'
        [description_html] => '<p>A test package for the Universal Module.</p>'
        [qty] => null
        [module_row] => '1'
        [module_group] => null
        [taxable] => '1'
        [single_term] => '0'
        [status] => 'active'
        [company_id] => '1'
        [prorata_day] => null
        [prorata_cutoff] => null
        [id_code] => '92'
        [email_content] => Array
            (
                [0] => stdClass Object
                    (
                        [lang] => 'en_us'
                        [html] => '<p>Welcome email for the Universal Module.</p>'
                        [text] => 'Welcome email for the Universal Module.'
                    )
            )
        [pricing] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '628'
                        [pricing_id] => '875'
                        [package_id] => '94'
                        [term] => '1'
                        [period] => 'month'
                        [price] => '2500.0000'
                        [setup_fee] => '0.0000'
                        [cancel_fee] => '0.0000'
                        [currency] => 'USD'
                    )
            )
        [meta] => stdClass Object
        [groups] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '10'
                        [name] => 'Test Universal Package Group'
                        [description] => null
                        [type] => 'standard'
                        [company_id] => '1'
                        [allow_upgrades] => '1'
                    )
            )
        [option_groups] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => '26'
                        [name] => 'Test Universal Option Group'
                        [description] => 'A list of options'
                    )
            )
    )

...

Creating Packages

Info
titleEmail Tags

 Universal Module product service field names are used for the email tag. For example, a service field with the name "hostname" would result in a tag available to the welcome email of {service.hostname}. Universal module products are unique in this regard because each product may have different tags, defined by the staff member who created them.