Difference between revisions of "Automated Email Installation"

From High5Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
'''SME Automatic Outbound Email Event'''
 
'''SME Automatic Outbound Email Event'''
<br>The purpose of this add on program is to automatically notified Techs and Customers of creation/closing
+
<br>The purpose of this add on program is to automatically notify Techs and Customers of creation/closing
 
and scheduling of Service Tickets or Issues within SME. This bundled with the SME ability to handle
 
and scheduling of Service Tickets or Issues within SME. This bundled with the SME ability to handle
 
incoming mail can create a powerful tool for capturing and issuing emails automatically without SME
 
incoming mail can create a powerful tool for capturing and issuing emails automatically without SME
Line 7: Line 7:
  
 
== Requirements ==
 
== Requirements ==
SME version 7.1 or later
+
* SME version 7.1 or later
<br>• SME Web services setup on IIS for incoming mail. SME does not capture emails directly.
+
* SME Web services setup on IIS for incoming mail. SME does not capture emails directly.
<br>• SME Field Scheduler for setup of Incoming and Outgoing Mail
+
* SME Field Scheduler for setup of Incoming and Outgoing Mail
 +
* Admin account in SME must have a valid and working SMTP outgoing email, see [[Email Settings]]
 +
* Exclusive Access is Required - All Users Must Be Out of SME
  
 
<br>'''Not covered in this add on'''
 
<br>'''Not covered in this add on'''
<br>• Sending Tickets to customer automatically
+
* Sending Tickets to customer automatically
<br>• Email campaigns
+
* Email campaigns
  
  
Line 37: Line 39:
 
== Modifying outbound looks and information Emails ==
 
== Modifying outbound looks and information Emails ==
 
It is possible to modify the outbound emails look and information. If you are interested please notify high5 software.
 
It is possible to modify the outbound emails look and information. If you are interested please notify high5 software.
 +
The automatic outgoing email templates have a few basic rules that, when followed, make it pretty easy to work with:
 +
 +
You need to have a Subject and a Summary field  - these translate to Email Subject and Email Body in the sent email.
 +
-Seen in code as "as Subject" and "as Summary"
 +
 +
You are pulling from service/Install "a", and customer contact "b" as your available database fields to work with.
 +
 +
If it's a non-text field (Such as ordernumber, which is a number), you must use:
 +
cast([field] as varchar(max))
 +
 +
Wrap all fields in isnull([field],'') so as not to break the report on null database values.
 +
 +
Otherwise, you're just writing the email text and adding some simple HTML for formatting.
 +
 +
<nowiki>
 +
'<br>' = new line.
 +
</nowiki>
 +
 +
Sample Template:
 +
 +
<nowiki>
 +
'[' + cast(a.OrderNumber as varchar(max)) + '] for : ' + a.CustName  as Subject,
 +
isnull(a.CustName,'') + '<br>' + isnull(a.addressblock, '') + '<br>' + a.Summary' + '<br><br>' + cast(a.ordernumber as varchar(max)) + '<br><br>' + 'Services Performed:' +  '<br>' + isnull(a.ServPerf,'') as Summary
 +
</nowiki>
 +
 +
For a test order with these fields:
 +
Custname: TestCust
 +
OrderNumber: 200
 +
Address: 3243 15th St SomeAddress, SomePlace
 +
Services Performed: "Went to the place and did the stuff"
 +
Summary: Some Job
 +
 +
The above template would give you this layout:
 +
 +
Email Subject:
 +
[200] for : TestCust
 +
 +
Email Body:
 +
TestCust
 +
3243 15th St SomeAddress, SomePlace
 +
Some Job
 +
 +
200
 +
 +
Services Performed:
 +
"Went to the place and did the stuff"
 +
 +
  
 
The standard outgoing email format looks like this:
 
The standard outgoing email format looks like this:
'[' + cast(a.OrderNumber as varchar(20)) + '] for : ' + a.CustName  as Subject,
+
 
a.CustName + '<br>' +isnull(a.AddressBlock, '') + '<br>' +'Bemuda Elevator Service Order ' + cast(a.DateTimeIn as varchar(100)) + '     has been ' +isnull( a.OrderStatus,'') + '.+ '<br><br>' +  
+
<nowiki>
'Priority Level:'   +isnull(cast(a.Priority as varchar(20)),'') + '<br><br>' +
+
(case when a.BillingStatUID = 'void' then 'Order VOID'
'Summary:' +isnull(a.Summary, 'Summary') + '<br><br>' +
+
            else (case when isnull(a.OrderStatus, '') = '' then 'Order Open'
'Contract type:'   +isnull(a.SLACategory, 'FSMA or E&L')+ '<br><br>' +
+
                        else '' + '' end) end) + ' [' +isnull(cast(a.OrderNumber as varchar(100)), '') + ']
'Order number : '+isnull(cast(a.RefNum as varchar(20)),'') +'   Technician assigned: ' + isnull(a.AssignedTo, 'Nobody') + '.'  + '<br><br>' +'Site contact: ' + b.Name + ' ' + isnull(b.Email, '') + '<br><br>' +'Services Requested: ' + '<br>' + isnull(a.ServReq,''+ '<br>' +'change order status on arrival & leaving job; + ADD A TIME TICKET WITH NOTE: ' + '<br>' + isnull(a.ServPerf,'')   + '<br><br>' as Summary
+
                        +': '+ a.CustName + ' - Status Updated By: '+(Select Name From SMPUser Where UserName = a.WhoEdit)
 +
                        as Subject, +
 +
                       
 +
+ '<br/><font size="2" face="verdana" color="black">'
 +
+ '<br/>' +
 +
+ '<br/> <strong>' +'Customer: '+  a.BillName + '</strong><br/>'
 +
+ '<br/>' +
 +
+ '<br/>' +'Site Address: '+ '<br/>' +a.CustName  
 +
+ '<br/>' + a.Address1+', '
 +
+ '<br/>' +''+ a.City + ', ' + a.St+' ' +a.Zip
 +
+ '<br/>' +
 +
+ '<br/>' +'Site Phone : ' + (Select distinct isnull(a.fPhone, '') From CustCont b Where a.contactuid = b.uid)
 +
+ '<br/>' +'Contact: '+ (Select distinct b.Name From CustCont b Where b.UID = a.Contactuid) +
 +
+ '<br/>' +'Email : ' + (Select distinct isnull(b.Email, '') From CustCont b Where a.contactuid = b.uid)
 +
+ '<br/>' +
 +
+ '<br/>' +'Service Order Number: ' +'<strong>'+           coalesce(convert(varchar, a.Ordernumber), '')+'</strong>'
 +
+ '<br/>'
 +
+ '<br/>' + 'Order Summary: ' + a.Summary+ ' '+
 +
+ '<br/>' + 'Taken By:  ' + a.TakenBy+ ' '+
 +
+ '<br/>' + 'Open Date/Time: ' +isnull(cast(a.DateTimeIn as varchar(100)),'') +
 +
+ '<br/>' + 'Date/Time Due: ' +isnull(cast(a.DateTimeDue as varchar(100)),'') +
 +
+ '<br/>' + 'Order Status:   ' + a.OrderStatus+ ' '+
 +
+ '<br/>' + 'Close Date/Time:' +isnull(cast(a.DateTimeClosed as varchar(100)),'') +
 +
+ '<br/>' + 'SLA Category: ' + a.SLACategory+ ' '+
 +
+ '<br/>' + 'Refrence Number: ' + a.RefNum+ ' '+
 +
+ '<br/>' + 'Tech Assigned:  ' + a.AssignedTo+ ' '+
 +
+ '<br/><strong>'+'Services Requested:' + '<strong>'
 +
+ '<br/>' +isnull(a.ServReq,'')  
 +
+ '<br/>'
 +
+'<div align="center"> <span style="font-size:smaller;"></span></div></font>'
 +
as Summary
 +
</nowiki>

Latest revision as of 17:53, 26 July 2016

SME Automatic Outbound Email Event
The purpose of this add on program is to automatically notify Techs and Customers of creation/closing and scheduling of Service Tickets or Issues within SME. This bundled with the SME ability to handle incoming mail can create a powerful tool for capturing and issuing emails automatically without SME being open, or user interaction.


Requirements

  • SME version 7.1 or later
  • SME Web services setup on IIS for incoming mail. SME does not capture emails directly.
  • SME Field Scheduler for setup of Incoming and Outgoing Mail
  • Admin account in SME must have a valid and working SMTP outgoing email, see Email Settings
  • Exclusive Access is Required - All Users Must Be Out of SME


Not covered in this add on

  • Sending Tickets to customer automatically
  • Email campaigns


SME Field Scheduler Install Setup

The Field Scheduler is used to choose the setting of both incoming and outgoing mail. The interface as shown below displays the options that available. A description of what each event being selected is provided below the event header.
FieldSchedulerInstall.png


1. If C:\Users\Public\High5software is not the default directory, then you must click on the browse button to navigate to location of SME5.exe
2. Once you have found the directory you should be able to select your company in the select company drop down.
3. In the Email Add-On section, you can choose which events you wish to enable.
4. Once you are done you click Install Field Scheduler. Close the application when it completed.


Inbound Account Setup

Server part of Mail services is hosted by high 5 Software. Login requirements for your inbound accounts will be required to set up the capturing portion.


Outbound Account Setup

The automatic outbound email utilizes the settings found under the Administrator.


Modifying outbound looks and information Emails

It is possible to modify the outbound emails look and information. If you are interested please notify high5 software. The automatic outgoing email templates have a few basic rules that, when followed, make it pretty easy to work with:

You need to have a Subject and a Summary field - these translate to Email Subject and Email Body in the sent email. -Seen in code as "as Subject" and "as Summary"

You are pulling from service/Install "a", and customer contact "b" as your available database fields to work with.

If it's a non-text field (Such as ordernumber, which is a number), you must use: cast([field] as varchar(max))

Wrap all fields in isnull([field],) so as not to break the report on null database values.

Otherwise, you're just writing the email text and adding some simple HTML for formatting.

'<br>' = new line.

Sample Template:

'[' + cast(a.OrderNumber as varchar(max)) + '] for : ' + a.CustName as Subject, isnull(a.CustName,'') + '<br>' + isnull(a.addressblock, '') + '<br>' + a.Summary' + '<br><br>' + cast(a.ordernumber as varchar(max)) + '<br><br>' + 'Services Performed:' + '<br>' + isnull(a.ServPerf,'') as Summary

For a test order with these fields: Custname: TestCust OrderNumber: 200 Address: 3243 15th St SomeAddress, SomePlace Services Performed: "Went to the place and did the stuff" Summary: Some Job

The above template would give you this layout:

Email Subject: [200] for : TestCust

Email Body: TestCust 3243 15th St SomeAddress, SomePlace Some Job

200

Services Performed: "Went to the place and did the stuff"


The standard outgoing email format looks like this:

(case when a.BillingStatUID = 'void' then 'Order VOID' else (case when isnull(a.OrderStatus, '') = '' then 'Order Open' else '' + '' end) end) + ' [' +isnull(cast(a.OrderNumber as varchar(100)), '') + '] ' +': '+ a.CustName + ' - Status Updated By: '+(Select Name From SMPUser Where UserName = a.WhoEdit) as Subject, + + '<br/><font size="2" face="verdana" color="black">' + '<br/>' + + '<br/> <strong>' +'Customer: '+ a.BillName + '</strong><br/>' + '<br/>' + + '<br/>' +'Site Address: '+ '<br/>' +a.CustName + '<br/>' + a.Address1+', ' + '<br/>' +''+ a.City + ', ' + a.St+' ' +a.Zip + '<br/>' + + '<br/>' +'Site Phone : ' + (Select distinct isnull(a.fPhone, '') From CustCont b Where a.contactuid = b.uid) + '<br/>' +'Contact: '+ (Select distinct b.Name From CustCont b Where b.UID = a.Contactuid) + + '<br/>' +'Email : ' + (Select distinct isnull(b.Email, '') From CustCont b Where a.contactuid = b.uid) + '<br/>' + + '<br/>' +'Service Order Number: ' +'<strong>'+ coalesce(convert(varchar, a.Ordernumber), '')+'</strong>' + '<br/>' + '<br/>' + 'Order Summary: ' + a.Summary+ ' '+ + '<br/>' + 'Taken By: ' + a.TakenBy+ ' '+ + '<br/>' + 'Open Date/Time: ' +isnull(cast(a.DateTimeIn as varchar(100)),'') + + '<br/>' + 'Date/Time Due: ' +isnull(cast(a.DateTimeDue as varchar(100)),'') + + '<br/>' + 'Order Status: ' + a.OrderStatus+ ' '+ + '<br/>' + 'Close Date/Time:' +isnull(cast(a.DateTimeClosed as varchar(100)),'') + + '<br/>' + 'SLA Category: ' + a.SLACategory+ ' '+ + '<br/>' + 'Refrence Number: ' + a.RefNum+ ' '+ + '<br/>' + 'Tech Assigned: ' + a.AssignedTo+ ' '+ + '<br/><strong>'+'Services Requested:' + '<strong>' + '<br/>' +isnull(a.ServReq,'') + '<br/>' +'<div align="center"> <span style="font-size:smaller;"></span></div></font>' as Summary