Starting with CM version 6.10, it is possible to include a Microsoft Exchange calendar view in the Web Client.
Please refer to the ConSol CM System Requirements of your CM version for a list of supported Exchange Server versions.
The calendar view can be offered ...
The calendar will be displayed in a distinct section of the ticket / customer page.
An engineer who works with the calendar view can ...
Figure 304: ConSol CM Web Client - Ticket with Calendar section (monthly view)
Figure 305: ConSol CM Web Client - Adding an appointment in the calendar
The integration of a Microsoft Exchange server to provide calendar data is done based on page customization. For a detailed introduction to this topic, please read the section about Page Customization. Here, only the calendar-specific configuration is explained.
Perform the following steps:
Make the calendar section visible (example for the Ticket Edit page):
Log in as an administrator and open a ticket. Select Enable page customization in the main menu. Since the calendar section is not yet displayed, you cannot mark the element you want to configure, but instead have to select it in the page customization tree. Select calendar/ticketEditPage/calendarSection and set the attribute state from hidden to expanded. Alternatively, you can set collapsed. This will initially display a collapsed Calendar section and the engineer can expand it manually. In both cases, the calendar section of the ticket will be visible. As header No Calendar will be displayed. The configuration of the calendar follows in step 2.
Figure 306: ConSol CM Web Client - Using page customization to make the Calendar section of a ticket visible
Figure 307: ConSol CM Web Client - Page Customization Definition Section (PCDS) for the Calendar section of tickets
Configure the calendar script:
The connection to a Microsoft Exchange server calendar is implemented using an Admin Tool script. The script has to be stored in the Admin Tool script section, i.e., navigation group System, navigation element Scripts and Templates, and must be of script type Calendar integration. The name of this script has to be entered as the value for the attribute calendarInitializationScript in the page customization (see step 1). This Admin Tool script is used to initialize the calendar source and has to return a map which contains all parameters describing the source. If the returned map is empty or is null, no calendar will shown (the section will be empty with the label No calendar).
The script has to be coded as shown in the following example:
return [
name: 'Exchange Source',
'access.type': 'EXCHANGE',
'access.url': 'https://exchange1.server.net/EWS/Exchange.asmx',
'access.username': 'exchange-user',
'access.password':'exchange-password',
'access.domain': 'SSO',
'access.impersonation':'somebody@sso.server.net',
'access.version': '2013'
]
Code example 46: Example calendar integration script
The following parameters can be used in the script:
access.type
String parameter. Possible values EXCHANGE (MS Exchange Server), RANDOM (randomly generated appointments for testing purposes).
For access.type EXCHANGE:
For access.type RANDOM:
Additional variables available in the script:
The configured Exchange server is contacted, namely the Web Service indicated in the url. The login at this server is performed using the technical user (access.username, access.password). Then the user is changed to the person/user indicated under access.impersonation. The latter is performed using the Exchange server function Impersonation. The calendar of this impersonated user is the displayed on the ticket or customer page.
The impersonation function can only be used by an account which has been granted the ApplicationImpersonation role by the Exchange administrator. Please make sure all security aspects are taken into consideration when you set up this role!
The integration (more precisely, the display) of Microsoft Exchange calendars in ConSol CM is based on the jQuery fullcalendar plugin. For complete details on that API, please refer to the fullcalendar web site.
The Calendar section can be configured on these pages:
The following attributes can be used to configure the appearance and behavior of the integrated Exchange calendar.
Attributes:
Possible values:
See documentation for details. (java.lang.String)
Possible values:
Header will disappear if all three header* attributes (Center, Left, Right) are empty.
Using the Page Customization attribute calendarEventHandlerScript, you can define actions which should be triggered in case a certain event has occurred. The events which can be used are:
For example, you can define that when a new appointment is made, an e-mail is automatically sent to all contacts of the ticket.
The following variables are available in a calendarEventHandlerScript:
Basic:
Advanced:
The following script shows an example of a calendarEventHandlerScript.
import static com.consol.cmweb.server.common.model.calendar.AppointmentEventType.*;
import com.consol.cmas.common.model.customfield.meta.UnitDefinitionType;
// Check if you are on ticket page or on customer page:
def inTicket = false
def inUnit = false
if ( binding.variables.containsKey("ticket") ) {
log.info "Context: Ticket" inTicket = true
}
if ( binding.variables.containsKey("unit") ) {
log.info "Context: Unit" inUnit = true
}
def recip def mailField
// if you are on ticket page: write e-mail to engineer
if (inTicket){
recip = ticket.engineer?.email
// if you are in unit context, CONTACT, write to contact
} else if (inUnit) {
def unitDefName = unit.definitionName
def unitDefType = unit.definition.type
log.info ' Definition is now ' + unitDefName
if (unitDefType == UnitDefinitionType.CONTACT){
switch (unitDefName) {
case 'DirCustCustomer': mailField = "dir_cust_email";
break
case 'customer': mailField= "email"
break
case 'PartnersContact': mailField = "email"
break
case 'ResellerCustomer': mailField = "email"
break
}
} else if (unitDeftype == COMPANY) {
log.info "No email for Company!"
}
recip = unit.get(mailField) }
log.info 'mailField is now ' + mailField
log.info 'recip is now ' + recip
// EXAMPLE! log.info only :
log.info "Appointment '${appointment.subject}' has been "
if (eventType == CREATE) {
log.info "created"
} else if (eventType == UPDATE) {
log.info "modified"
} else if (eventType == DELETE) {
log.info "removed"
}
// send mail here ...
Code example 47: Admin Tool script, example of a calendarEventHandlerScript