Starting with CM version 6.10, it is possible to include a Microsoft Exchange calendar view in the Web Client.
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 251: ConSol CM Web Client - Ticket with Calendar section (monthly view)
Figure 252: 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:
Figure 253: ConSol CM Web Client - Using page customization to make the Calendar section of a ticket visible
Figure 254: ConSol CM Web Client - Page Customization Definition Section (PCDS) for the Calendar section of tickets
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 44: Example calendar integration script
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 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:
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:
subject
String. Subject/title of the appointment.
startDate
Date. Start date/time of the appointment.
endDate
Date. End date/time of the appointment.
allDayEvent
Boolean. Defines whether an appointment is an all day event: which means that is lasts all day (or many days).
location
String. Location/place of the appointment.
meeting
Boolean. Is true when an appointment is a meeting. (MS Exchange Server specific property: means that attendees were invited appointment became a meeting)
cancelled
Boolean. Indicates if an appointment is marked as cancelled.
recurring
Boolean Whether appointment is a part of recurring set.
busyStatus
AppointmentVo.BusyStatus Possible values: FREE, TENTATIVE, BUSY, OUT_OF_OFFICE, WORKING_ELSEWHERE or NONE.
body
String. Body, content of the appointment. It can be text or HTML (depends on bodyType property)
bodyType
AppointmentVo.BodyType Possible values TEXT, HTML or NONE
uid
String. Unique identifier of an appointment within calendar server.
start
org.joda.time.DateTime Start date/time (joda)
end
org.joda.time.DateTime End date/time (joda)
timeZone
org.joda.time.DateTimeZone Timezone of the appointment (used to correctly show all-day appointments because days staring at different time in each timezone.
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 45: Admin Tool script, example of a calendarEventHandlerScript