Deepser Deepser
  • Documentation
  • Start Free Trial
Start Free Trial
Deepser Deepser
Start Free Trial
Deepser
  • Documentation
  • Start Free Trial
loading
  1. Home
  2. Documentation
  3. Escalation
  4. Escalation rule that sends an email notification
Updated on June 25, 2025

Documentation

  • Access and Visibility
    • Resources
    • Roles
    • Creating and Managing Roles in Deepser
    • Creating a new user
    • Password Reset
    • New User Registration
    • LDAP Configuration
    • SSO Deepser Configuration
    • SSO Login/Provisioning Configuration – Azure
    • Multi Factor
    • Groups
    • Groups Creation
    • Manage Users in Groups
    • Company
    • Companies in Deepser
    • Company Creation
    • Parent Companies
    • Email Domains
    • Sync Account CRM Companies
    • Advanced Sync
    • Visibility management in Deepser
    • Permission and Visibility Handling
    • Groups and Rules Definition
    • End Users Visibility Overview
    • Entities Portal Visibility
    • Empowered End User (EEU)
    • Company Supervisors
    • Additional Companies
    • Access Groups
    • Access Users
  • Activity, Worklogs & Comments
    • DeepActivity Comments
    • Placing a comment
    • Comments System Configuration
    • DeepActivity Worklog
    • Entering a Worklog
    • Enabling Worklogs in the User Portal
    • Worklog Global Grid
    • Worklog Global Grid Configuration
    • Activity Global Grid Advanced Configuration
  • Board
    • Enable groups to create boards
    • Creating a FreeForm Board
    • Creating and customizing a Lane
    • Entry Creation
    • Board Live
    • Live Board Creation
    • Advanced Live Board Configuration
    • Creating and customizing a Lane
    • Creation and Advanced Configuration of a Lane and Drop Code
  • Categories
    • Category Overview
    • Category Configuration
    • Category Usage
  • Chat
    • Using the Chat
    • Enabling the Chat on Portals
    • Chat Rooms and Moderators
    • Public Chat
    • Configure a Public Chat Widget
    • Chatbot
    • Chatbot Flow – Example
  • CMDB
    • Deepser CMDB
    • Enable CMDB in the User Portal
    • User Portal CMDB Grid Configuration
    • Advanced Configuration of CMDB Grids
    • Class, Type and Subtype
    • Configuring a CI
  • CRM
    • Deep CRM
    • Creating an account in the CRM
    • Creating a contact in the CRM
    • Creating an opportunity in the CRM
    • Contact Types in CRM
    • Opportunity Types in CRM
    • CRM Lists
    • Sync Contacts and Accounts
    • Address Functioning
    • Sales
    • Mailchimp Integration
  • Deepser API
    • API Notions
    • API Endpoint and URL
    • API Verbs and Format
    • API Authentication
    • API Main Methods
    • Retrieve
    • Multiple Retrieve
    • Create
    • Update
    • Delete
    • API Entities
    • API Company
    • User API
    • Group API
    • Service Operation API
    • Service Type API
    • Activity API
    • CMDB CI API
  • Deepser Fundamentals
    • Deepser Backend
    • Deepser User Menu
    • Deepser Navigation Menu
    • Global Search Usage
    • Deepser Home Page
    • Grids
    • Filters and Order
    • Export Data
    • Mass Action
    • Mass Action Configuration
    • Grid Creation and Cloning
    • Configuring Grids
    • Advanced Collection Configuration
    • Grids Render and Options Configuration
    • Grids Custom Options Configurations
    • Grids Renderer Tooltip Example
    • Grids Renderer Link Example
    • Grids System Configuration
    • Form Template Theory
    • FormTemplates
    • FormTemplates Structure and Buttons
    • Form Template Selection and Creation
    • Form Template Configuration
    • Form Template Structure Configuration
    • Formtemplates Fieldset Configuration
    • Formtemplates Buttons Configuration
    • Formtemplates Field Configuration
    • Advanced Form Template Rules
    • Custom Button Configuration
    • Buttons Conditional Hiding
    • User Portal
    • Browsing the user portal
    • Managing Tickets in The User Portal
    • User Portal Additional Features
    • Configuring Portal Groups
    • Configuring Portal Requests
    • Configuring Service Operations in the User Portal
    • Enabling Other Modules in the User Portal
    • Enabling Other Modules in the User Portal Grid
    • Guest Portal
    • Enabling the Guest Portal
    • Guest Portal Visibility Configuration Overview
    • Enabling Service Types on the Guest Portal
    • Adding a Portal Group in the Guest Portal
    • Adding a Portal Request in the Guest Portal
    • Editing Form Templates in the Guest Portal
    • Enabling Categories in the Guest Portal
    • Enabling Notifications for Guest Users
    • Knowledge Base in the Guest Portal
    • CMS in the Guest Portal
    • Cache Management
    • Quick Reply
    • Mentions
    • Module Creator – Creating a custom module
  • Email Integration
    • Email Integration in Service Management
    • Enable Embedded Images on Message Body
    • Mailbox
    • Configuring an Outgoing Mailbox
    • Configuring an Incoming Mailbox
    • OAuth Client for Email Integration
    • Email Loop Management Tool
    • Office 365 Mailbox Configuration
    • Azure Oauth Client (Legacy Protocol)
    • Google Oauth Configuration
    • Email Rules
    • Email Rule Configuration
    • Advanced Email Rule Configuration
    • Avoid Duplicate Tickets By Email
    • Managing additional Email recipients
    • Email Events
    • Enabling / Disabling an Email Event
    • Custom Email Events Creation
    • Custom Email Events Configuration
    • Attach Report to Email Notification
    • Email Templates
    • Email Template Configuration
    • New operation notification template for Requester User
    • New or Updated comment notification template for Requester
    • Email Webclient
  • Escalation
    • Escalation rule levels
    • Configuring Escalation Rules
    • Configure an escalation rule that modifies entity.
    • Escalation rule that sends an email notification
    • Create an escalation rule that is based on a metric
    • Configure an escalation rule that generates other entities
  • Importing Data
    • Import Foundamentals
    • Import Creation
    • Import Basic Data Binding
    • Import Before Run
    • Import Before Run Tutorial
    • Import Before Row
    • Import Before Row Tutorial
    • Import After Row
    • Import Binding The Unique Field “Code”
    • Import Binding the Type Value
    • Import Binding the Dates Values
    • Import Binding a Company, creating the record if it doesn’t exist
    • Global Import
  • IT Asset Management
    • IT Asset Models
    • ITAM Automatic Scan Configuration and Usage
    • ITAM Configuration
    • AnyDesk
    • Supremo
  • Knowledge Base
    • Reading the Knowledge Base
    • Knowledge Base in Service Operations
    • Article Configuration in Knowledge Base
    • Knowledge Base Configuration
    • Knowledge Base Standard Filters
    • Knowledge Base Advanced Filters
  • List
    • Introduction to lists
    • Creating a new list
    • List Values and Model Visibility
    • Use a list as the basis of a custom field
  • Password Management
    • Configuring a Password
    • Using a Password
    • Private Password
    • Password System Configuration
    • Enabling Password Manager Portal
    • Custom Deeppassword fields
    • Password Audit
  • Relations
    • Using a Relation Grid field
    • Configuring a Relation
    • Modifying relation using a custom event.
    • Opposite relation
    • Column Configuration
    • Relation Graph View
  • Service Management
    • Introduction to Services in Deepser
    • Service Operations
    • Creating a Service Operation
    • Adding Comments, Activities, Attachments and Tasks to Operations
    • Service Operation Main Fields
    • Service Operation Additional Fields
    • Service Operation Activities, Relations, Email and SLAs
    • Service Types
    • Routing rules
    • Configuring Routing Rules
    • Advanced Routing Configuration
  • SLA
    • Calendar
    • Metrics
    • Goal
  • Task
    • Creation of task type
    • Form configuration of task types
    • Task Global Grid
    • Task Global Grid Configuration
    • Task Global Grid Advanced Configuration
  • Workflow
    • Workflow Overview
    • Flow Designer
    • Flow Trigger
    • Workflow – Stage Set
    • Workflow – Executions
    • Approval workflows
    • Portal Approval Structure
    • Backend Approval Structure
    • Workflow Actions
    • Workflow Logic
    • Workflow Samples
    • Multi Stage Flow
    • SubFlow
  • Inventory
    • Inventory Overview
    • Inventory Configuration
    • Warehouse
    • Item
    • Movement
  • Custom Fields
    • Custom Field Overview
    • Custom Field – Creation
    • Custom Field – Element Type Simple
    • Custom Field – Element Type Advanced
  • Folder icon closed Folder open iconCustom Event
    • Custom Event Overview
    • Custom Event – Creation
    • Custom Event – Type
  • Dashboard
    • Dashboard Overview
    • Panel Configuration
    • Chart Configuration
  • Project
    • Project Module
    • Gantt
    • Project Task
    • Resource Grid
  • Calendar
    • Calendar Configurations
    • Internal Calendar Configuration
    • Calendar Configuration Example
    • External Calendar Configuration
    • External Calendar – Google Calendar Configuration Example
    • External Calendar – Outlook Calendar Configuration Example
    • Calendar Usage
  • Survey
    • Survey Overview
    • Designer
    • Survey
    • Dashboard
  • Contract and Contract Line
    • Contracts and Contract Lines – General Overview
    • Contracts
    • Contract Lines
    • Contract Creation
    • Line Creation
    • Associate a Contract / Line with other entities
    • Contract Type
    • Line Type
    • Contracts and Escalation Rules
  • Report Documentation
    • Report Configuration
    • Report Usage
  • Sales
    • Catalog and Price List Overview
    • Catalog Configurations
    • Product
    • Price List
    • Billing Overview
    • Order Billing
    • Lines Billing
    • Worklogs Billing
    • Movements Billing
    • Operation Billing
  • Folder icon closed Folder open iconIntegrations
    • Teams Integration
    • NinjaOne RMM Integration
    • Datto RMM Integration

Escalation rule that sends an email notification

Estimated reading: 7 minutes

In Deepser, Escalation rules can trigger email notifications. This allows you to use escalation rules to eliminate alerts   when specific events occur. In the following example, we are going to create an escalation rule that will notify the user  in case  the requesting company is Acme International. In this example, we will also use the escalation rule created  in the previous example.

E-MAIL TEMPLATE CREATION

In order to send the email notification to the assignee user, it will be necessary to create an email event with its associated mail template that will be used by Deepser to send the email from the escalation rule. To create a custom, you will need to go to the System -> Tools -> Email -> Template menu. Then you will need to click on the”Add  Mail Template” button. In the screen that will open you will need to define a name for the template, to do this, simply enter the desired name in the “Name” field. Next we will define a code for the template, filling in the “Code” field. At this point, it will be possible to insert in the”Subject”section the php code that will compose the subject of the email. You can use the following code as a reference to compose the subject of the email:

				
					<?php echo Deep::helper('deep_email')->__('DEEPSER – New ticket from Acme International')?>
				
			

Now, it will be possible to insert in the “Body” section, which will represent the content of the message, the PHP / HTML code that will be used to generate the body of the mail.

You can use the following code as a reference when creating the body:

				
					<?php

$requesterUser = $this->getModel()->getRequesterUser();

$assignedUser = $this->getModel()->getAssignedUser();

?>

<?php $this->includeTemplate(“header”) ?>

<!– Start of Main Content –>

<tr style=””>

    <td bgcolor=”#FFFFFF” align=”center” style=””>

        <table width=”100%” align=”center” cellpadding=”0″ cellspacing=”0″ bor-der=”0″ class=”devicewidth” style=””>

            <tbody style=””>

            <!– Start Spacer –>

            <tr>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

                <td class=”h26″ height=”36″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

            </tr>

            <!– End Spacer –>

            <tr style=””>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

                <td class=”mktEditable content mktEditable content” id=”edit_text_1″ valign=”middle” style=”font-family:Calibri, Helvetica, sans-serif; font-size:16px; color:#505050; text-align:left; line-height:25.6px; font-weight:normal; text-transform:none;”>

                    <p>

                        <br>

                        <?php echo Deep::helper(‘deep_email’)->__(‘Dear %s’, $this->getModel()->getAssignedUser()->getDisplayUsername())?>,<br>

                        <?php $url = $this->getModel()->getAssignedUser()->isUser() ? $this->getModel()->getPortalUrl() : $this->getModel()->getUrl(); ?>

                        <?php echo Deep::helper(‘deep_email’)->__(‘You have Re-cived a new ticket from Acme International’)?> <b style=”font-weight: 700;”><a href=”<?php echo $url ?>”><?php echo $this->getModel()->getId()?></a></b>

                        <br>

                        <br>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Title’)?></strong>:

                        <br><?php echo $this->getModel()->getTitle()?><br><br>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Description’)?></strong>:

                        <br><?php echo $this->getModel()->getDescription()?><br>

                        <!– Status –>

                        <?php if($this->getModel()->getStatus()):?>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Status’)?></strong>:

                            <?php

                            $statusList = Deep::helper(‘deep_list’)->loadList(Deep_Service_Model_Operation::LIST_CODE_STATUS);

                            $statusValue = $statusList->getValue($this->getModel()->getStatus());

                            ?>

                            <br><?php echo Deep::helper(‘deep_email’)->__($statusValue->getValueLabel()); ?><br><br>

                        <?php endif;?>

                        <!– Requester –>

                        <?php if($requesterUser && $requesterUser->getId()):?>

                            <strong><?php echo Deep::helper(‘deep_service’)->__(‘Requester User’)?></strong>:

                            <?php if($this->getModel()->getRequesterUser()->getAvatar()):?>

                            <br><img src=”<?php echo $this->getModel()->getRequesterUser()->getAvatarUrl() ?>” border=”0″ style=”-ms-interpolation-mode: bicubic;” width=”16″ />

                            <?php endif;?>

                            &nbsp;&nbsp;&nbsp;<?php echo $this->getModel()->getRequesterUser()->getDisplayUsername() ?><br><br>

                        <?php endif;?>

                        <!– Assigned –>

                        <?php if($assignedUser && $assignedUser->getId()):?>

                        <strong><?php echo Deep::helper(‘deep_service’)->__(‘Assigned User’)?></strong>:

                            <?php if($this->getModel()->getAssignedUser()->getAvatar()):?>

                            <br><img src=”<?php echo $this->getModel()->getAssignedUser()->getAvatarUrl() ?>” border=”0″ style=”-ms-interpolation-mode: bicubic;” width=”16″ />

                            <?php endif;?>

                            &nbsp;&nbsp;&nbsp;<?php echo $this->getModel()->getAssignedUser()->getDisplayUsername() ?><br><br>

                        <?php endif;?>

                        <!– Urgency –>

                        <?php if($this->getModel()->getUrgencyId()):?>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Urgency’)?></strong>:

                            <?php

                            $urgencyList = Deep::helper(‘deep_list’)->loadList(Deep_Service_Model_Operation::LIST_CODE_URGENCY);

                            $urgencyValue = $urgencyList->getValue($this->getModel()->getUrgencyId());

                            ?>

                            <br><?php echo Deep::helper(‘deep_email’)->__($urgencyValue->getValueLabel()); ?><br><br>

                        <?php endif;?>

                        <!– Priority –>

                        <?php if($this->getModel()->getPriorityId()):?>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Priority’)?></strong>:

                            <?php

                            $priorityList = Deep::helper(‘deep_list’)->loadList(Deep_Service_Model_Operation::LIST_CODE_PRIORITY);

                            $priorityValue = $priorityList->getValue($this->getModel()->getPriorityId());

                            ?>

                            <br><?php echo Deep::helper(‘deep_email’)->__($priorityValue->getValueLabel()); ?><br><br>

                        <?php endif;?>

                        <!– Solution –>

                        <?php if($this->getModel()->getSolution()):?>

                        <strong><?php echo Deep::helper(‘deep_email’)->__(‘Solution’)?></strong>:

                        <br><?php echo $this->getModel()->getSolution()?>

                        <br>

                        <?php endif;?>

                    </p>

                </td>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

            </tr>

            <!– Start Spacer –>

            <tr>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

                <td height=”30″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

                <td class=”w22″ width=”41″ style=”font-size:1px; line-height:1px;”>&nbsp;</td>

            </tr>

            <!– End Spacer –>

            </tbody>

        </table>

    </td>

</tr>

<!– End of Main Content –>

<!– End of Main Content –>

<?php $url = $this->getModel()->getUrlByUser($assignedUser); ?>

<!– start of Button –>

<tr style=””>

    <td bgcolor=”#FFFFFF” align=”center” class=”mktEditable” id=”edit_cta_button” style=””>

        <table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>

            <tbody>

            <tr>

                <td class=”w22″ width=”41″ style=”font-size: 1px; line-height: 1px;”>&nbsp;</td>

                <td align=”left”>

                    <table class=”button” cellpadding=”0″ cellspacing=”0″ bor-der=”0″ align=”left” bgcolor=”#0080ff” style=”-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;”>

                        <tbody>

                        <tr>

                            <td width=”518″ align=”center” valign=”middle” height=”65″>

                                <span style=”color: #ffffff; text-decoration: none;”>

                                        <a class=”mobButton mktNoTok” href=”<?php echo $url ?>” style=”font-family: Calibri, Helvetica, sans-serif; font-size: 16px; color: #ffffff; display: block; height: 65px; mso-line-height-rule: exactly; line-height: 65px; font-weight: normal; text-decoration: none; text-align: center!important;” target=”_blank” title=”Link al ticket”>

                                            <?php echo Deep::helper(‘deep_email’)->__(‘Go to the Ticket’)?>

                                        </a>

                                </span>

                            </td>

                        </tr>

                        </tbody>

                    </table> </td>

                <td class=”w22″ width=”41″ style=”font-size: 1px; line-height: 1px;”>&nbsp;</td>

            </tr>

            </tbody>

        </table>

    </td>

</tr>

<!– end of Button –>

<?php $this->includeTemplate(“footer”) ?>
				
			

And click on the “Save” or”Apply”button

EMAIL EVENT CREATION

To create a custom mail event you will need to go to the System -> Tools -> Email -> Event menu. At this point you will need to click on the”Add  Event” button. At this moment, it will be necessary to give a name to the event by filling in the “Name” field. We define Whether to send attachments by changing the value of the field”Send  Attachments” to “No”. Now in the “Email Template” field we select the template created in the previous point of this guide. In the “Event Trigger” section, select “DeepService – Operation” in the “Model” field In the “Event Expression”entry. We insert the following code:

				
					// if the Company is Acme International
if($this->getModel()->getData("requester_company_id") == Deep::getModel("deep_company/company")->load("ACME International",'name')->getId() ){
    if ($this->getModel()->getData('escalation_rule')){
         return true;
    }
}
return false;
				
			

In the “To” section We insert the following code:

				
					$user = $this->getModel()->getAssignedUser();
if ($user && $user->getId()){
    $this->changeLanguage($user->getLocale());
    $this->addTo($user->getEmail());
}
				
			

At this point, we can go to click the “Save” or “Apply” button Now the event will have been saved

ASSIGNING THE MAIL EVENT TO THE ESCALATION RULE

To assign the mail event to the escalation rule you will need to go to the menu: System ->  Service  Configuration. Here you will need to go to the previously created rule or any escalation rule you want to change. In the Escalation Rule screen you will need to select the Created event from the drop-down menu that will appear by clicking the “Email Event” field. At this point you will need to click the “Save” or”Apply” button.

EXAMPLE: SENDING EMAIL TO THE OPERATOR WHEN THE NUMBER OF HOURS IS LESS THAN 4

In this example, suppose you want to email the administrator when the number of hours remaining in a contract line is less than 4

E-MAIL TEMPLATE CREATION

In order to send the email notification to the administrator, it will be necessary to create an email event with its associated mail template that will be used by Deepser to send the email from the escalation rule. To create a custom mail event, you will need to go to the System -> Tools -> Email -> Template menu. Then you will need to click on the”Add  Mail Template” button. In the screen that will open you will need to define a name for the template, to do this, simply enter the desired name in the “Name” field. Next we will define a code for the template, filling in the “Code” field. At this point, it will be possible to insert in the”Subject”section the php code that will compose the subject of the email. You can use the following code as a reference to compose the subject of the email:

				
					<?php $line = $this->getModel()?>
The contract line <?php echo $line->getLineNumber() . ' - ' . $line->getName()?> of the contract <?php echo $line->loadContract()->getContractNumber() . ' - ' . $line->loadContract()->getName()?> is going low
				
			

Now it will be possible to insert in the “Body” section, which will represent the content of the message, the PHP / HTML code that will be used to generate the body of the mail. You can use the following code as a reference when creating the body:

				
					<?php $this->includeTemplate("header") ?>
<style>
    .table{
        width: 100%;
        margin-left:auto;
        margin-right: auto;
    }
    .tr,.td{
        width: 100%;text-align: center;
        vertical-align: middle;
    }
    .cust-container{
        display: flex;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
      
</style>
<!-- Start of Main Content -->
<tr style="">
    <td bgcolor="#FFFFFF" align="center" style="">
        <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" class="devicewidth" style="">
            <tbody style="">
            <!-- Start Spacer -->
            <tr>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
                <td class="h26" height="36" style="font-size:1px; line-height:1px;">&nbsp;</td>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
            </tr>
            <!-- End Spacer -->
            <tr>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
                <td class="mktEditable content mktEditable content" id="edit_text_1" valign="middle" style="font-family:Calibri, Helvetica, sans-serif; font-size:16px; color:#505050; text-align:left; line-height:25.6px; font-weight:normal; text-transform:none;">
                    <p>
                        <br>
                            <div class="cust-container">
                                <?php $residuo = sprintf("%02d:%02d", floor($line->getRemainingTime()/3600), floor(($line->getRemainingTime()/60) %60))?>
                                The Contract Line &nbsp;<b><?php echo $line->getLineNumber() . ' - ' . $line->getName()?> </b> &nbsp;<?php echo " is going low ({$residuo} Hours remaning ) ";?>
                             </div>
                        <br>
                        <br>
                       
                        <table class="table">
                            <tr class="tr">
                                <td>
                                    <strong><?php echo Deep::helper('deep_email')->__('Total Time')?></strong>:
                                    <br><?php echo sprintf("%02d:%02d", floor($line->getTotalTime()/3600), floor(($line->getTotalTime()/60) %60))?><br><br>
                                </td>
                                <td>
                                      <strong><?php echo Deep::helper('deep_email')->__('Remaining Time')?></strong>:
                                      <br><?php echo sprintf("%02d:%02d", floor($line->getRemainingTime()/3600), floor(($line->getRemainingTime()/60) %60))?><br><br>
                                </td>
                            </tr>
                            <tr class="tr">
                                <td>
                                      <strong><?php echo Deep::helper('deep_email')->__('Name')?></strong>:
                                      <br><?php echo $contract->getName()?><br><br>
                                </td>
                                <td>
                                      
                                     <strong><?php echo Deep::helper('deep_email')->__('Customer Company')?></strong>:
                                     <br><?php echo $company && $company->getId() ? $company->getName() : ''?><br><br>
                                </td>
                            </tr>
                        </table>
                        
                        
                      
                        
                      
                      
                    </p>
                </td>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
            </tr>
            <!-- Start Spacer -->
            <tr>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
                <td height="30" style="font-size:1px; line-height:1px;">&nbsp;</td>
                <td class="w22" width="41" style="font-size:1px; line-height:1px;">&nbsp;</td>
            </tr>
            <!-- End Spacer -->
            </tbody>
        </table>
    </td>
</tr>
<!-- End of Main Content -->
<?php $this->includeTemplate("footer") ?>
				
			

And click on the “Save” or”Apply” button.

EMAIL EVENT CREATION

To create a custom mail event, you will need to go to the System -> Tools -> Email -> Event menu. At this point, you will need to click on the”Add  Event” button. At this point, it will be necessary to give a name to the event by filling in the “Name” field. We define Whether to send attachments by changing the value of the field”Send  Attachments” to “No”. Now in the “Email Template” field, we select the template created in the previous point of this guide. In the “Event Trigger” section, select “DeepService – Operation”in the “Model” field In the “Event Expression”entry. We insert the following code:

				
					if ($this->getModel()->getData('escalation_rule')){
        return true;
}
return false;
				
			

In the “To” section We insert the following code:

				
					$adminUserToNotify = 'admin';
$admin = Deep::getModel('deep_admin/user')->loadByUsername($adminUserToNotify);
if($admin && $admin->getId()){
    $adminEmail = $admin->getEmail();
    if($adminEmail){
        $this->changeLanguage($admin->getLocale());
        $this->addTo($adminEmail);
    }
}
				
			

At this point, we can go to click the “Save” or”Apply” button Now the event will have been saved

ASSIGNING THE MAIL EVENT TO THE ESCALATION RULE

To assign the mail event to the escalation rule you will need to go to the menu: System -> Service Configuration. Here you will need to go to the previously created rule or any escalation rule you want to change. In the Escalation Rule screen, you will need to select the Created event from the drop-down menu that will appear by clicking the “Email Event” field. At this point, We are going to configure the “Level” field to 0 and the “Next Level” field to 1. Since we do not want to receive the notification every time the rule runs, but only the first time. Finally we are going to configure the field “Cron  Expression”at 5 minutes using the drop-down menu located below the field itself. In the “Escalate all Records with following values (Main Filter)” field.At this point, you will need to click the “Save” or “Apply” button.

Was this guide helpful? Yes No

Share this Doc

Escalation rule that sends an email notification

Or copy link

Clipboard Icon
CONTENTS
Leaf Illustration

Deepser srl
Via Luigi Dalla Via 3/B,Torre A, piano 7, int. 12
36015 Schio (VI), Italy

© Deepser. All right reserved.

Privacy Policy
Terms of Service