The integration features the following functionality:

  1. Creates meeting and reminders in exchange when they are created in ClickHome.
  2. Updates ClickHome meetings and reminders when changed in exchange (if they were originally created by ClickHome).
  3. Imports emails (the email subject should have job number).
  4. Imports email documents to save against job when sent as attachments (email subject should have job number).

Given a lot of companies now have Office 365/Exchange Online, there are some slight differences in set up. For Exchange Online you require minimum version v3.33.329.

If you have any issues or questions please refer your IT resource with all the details of your set up to support@clickhome.com.au and we can assist in troubleshooting. Otherwise you can contact your ClickHome consultant to request they undertake the set up consulting@clickhome.com.au.

Also see the article Setting up a cloud based email service

 Create Web Service Logins and permission

You will need to create the Exchange Web Services (EWS) login, and grant it permission to impersonate all users. Set up impersonation rights for Exchange Web Service so that you can read/make changes to exchange users. The EWS login used in this solution is clickmail. 

Exchange Server:

Get-ExchangeServer | where {$_.IsClientAccessServer -eq $TRUE} | ForEach-Object {Add-ADPermission -Identity $_.distinguishedname -User (Get-User -Identity clickmail | select-object).identity -extendedRight ms-Exch-EPI-Impersonation}

or

New-ManagementRoleAssignment –Name:impersonationAssignmentName –Role:ApplicationImpersonation –User:clickmail

This procedure grants "clickmail" user permission to impersonate all accounts on an Exchange Server. If you have any issues please check the Additional Information section at the bottom of this article.

Exchange Online:

This may have changed as Microsoft updates their interface menu options etc. The purpose is to give clickmail Impersonation access.
  1. Log in as administrator
  2. Go to the ‘Exchange’ Admin section
  3. In ‘Exchange admin center’ go to the ‘permissions’ > ’admin roles’ and choose ‘Discovery Management’
  4. On the ‘Discovery Management’ screen, "ApplicationImpersonation" role should be added and "clickmail" added as a member.

If you have any issues please check the Additional Information section at the bottom of this article.

Configure the exchange settings in ClickHome

You will need to configure settings in ClickHome. You will need to be a ClickHome user with system/admin access to configure the settings. Navigate to Administration -> System Configuration -> Configuration and System Setting. Find the following settings and configure them. If they do not exist, they needs to be created.


ClickHome.Exchange.Enabled TRUE
ClickHome.Exchange.EWSAddress

The URL for your Exchange Web Services. To find this open Exchange Management Shell and run the following command.  

  • Get-WebServicesVirtualDirectory |Select name, *url* | fl

The output will be similar to the following:
  • InternalNLBBypassUrl : https://server name/ews/exchange.asmx  
  • InternalUrl : https://server name/EWS/Exchange.asmx  
  • ExternalUrl : https://mail.domain.com/ews/exchange.asmx

Exchange Online:

ClickHome.Exchange.EWSDropBox The email address from which email messages are read to process.
ClickHome.Exchange.EWSLogin The login name to be used. If you are using an ExternalUrl for your EWS address, you may need to have use format "domain\username" to Authenticate again.
ClickHome.Exchange.EWSPassword The password to be used

ClickHome.Exchange.EWSVersion

 

Exchange Online:

  • Exchange2007_SP1

Exchange Server:

  • Exchange2010,
  • Exchange2010_SP1
  • Exchange2010_SP2
ClickHome.Documents.BaseDirectory The directory on the ClickHome server or other file share where documents and pictures are stored
ClickHome.Exchange.Interval

Time (in minutes) between two successive checks. Default is 15 minutes.

ClickHome.Exchange.SaveAsEML

Optional.

The email is saved as .EML file into respective table in database (Outlook email).

This helps in retaining the format when users forward a note to EWSDropBoxAddress from their email

ClickHome.Exchange.ApptTaskHasMeeting

Optional.

If it is True, we make an appointment(note meeting) for the user so it can integrate with Exchange.

This feature requires additional configuration in ClickHome.

ClickHome.Exchange.SyncCalendars

Optional.

Run and sync ClickHome meetings with Exchange Meetings

ClickHome.Exchange.SyncResourceAvailability

Optional.

Updates tblResourceAvailability based on exchange calendars having appointment with CHBUSY in subject


Example:




You can also use the below code to view the Validation Entries from the database if you have the permissions.


SELECT *
FROM tblValidationEntries
WHERE sgDisplay IN (
        'ClickHome.Exchange.SyncResourceAvailability'
        ,'ClickHome.Exchange.SyncCalendars'
        ,'ClickHome.Exchange.ApptTaskHasMeeting'
        ,'ClickHome.Exchange.SaveAsEML'
        ,'ClickHome.Exchange.Interval'
        ,'ClickHome.Documents.BaseDirectory'
        ,'ClickHome.Exchange.EWSVersion'
        ,'ClickHome.Exchange.EWSPassword'
        ,'ClickHome.Exchange.EWSLogin'
        ,'ClickHome.Exchange.EWSDropBoxAddress'
        ,'ClickHome.Exchange.EWSAddress'
        ,'ClickHome.Exchange.Enabled'
        )

 

Test integration to ClickHome

Test the integration by sending a test email to dropbox email address clickmail@yourcompany.com.au (Drop box email address specified in ClickHome System Settings -> "EWSDropBoxAddress"). The email subject should have a Job Number for which the note is created for. This user 'Test Clickhome' is a user in clickhome configured with email address 'test@clickhome.com.au' and has exchange integration setting enabled. You can check the inbox of the EWSDropBoxAddress account, its possible if the email has been processed it will show in 'Deleted items' folder.

 Log into the ClickHome front end and check the job for the new note.

Example test email:

 

Exchange Server: Setup ClickHome user to have Calendar, Resource Calendar features.

Relates to ClickHome.Exchange.ApptTaskHasMeeting, ClickHome.Exchange.SyncCalendars

The setting is required for each users who needs to have their exchange account integration enabled with ClickHome.

  • Administration > Users > Users > Select the user > Click "Details" > "Settings" section.

Users must have this setting 'Exchange' selected in the drop down under the settings section. Hit the Save button

 

 

Exchange Server: To set Exchange Integration for Virtual Users (Virtual Supplier - Supervisor):

Relates to ClickHome.Exchange.SyncResourceAvailability

This feature allows the task to show up on the Supervisors calendar if the user is enabled for exchange synchronization. This works only for construction or maintenance job and the user needs to be assigned to the role on the job. The user setting TSKMEETING is to be setup by navigating to

  • Administration > Users > Users > Select the user > Click "Details" > "Settings" section.

 

Logging

nLog will contain more details on what is happening when you change to "Debug" level of logging, and re-send any test emails to capture their issues. Contact support@clickhome.com.au with any questions or issues.

Troubleshooting

Notes/Emails are not showing in Clickhome

Verify if job number was sent in the email subject to the drop box address (clickmail@yourcompany.com.au). This is necessary for the integration to happen with ClickHome.

Check the exchange integration setting is enabled and interval is setup in ClickHome.

Verify if the clickhome user has exchange setting enabled (Administration > Users > Users> User Details > Settings section) 

Verify the Windows Service is running.

View the error logs for any error messages in "C:\ch3logs\winsvc" for detailed error message. The log file is stored in the web server. 

Exchange integration gets executed in the background by ClickHome Windows Service. If the integration cannot access the account, the Ext.Ref. in Users>User Details > Settings is updated to 'INVALIDEMAILADDRESS'. This is done so it does not keep checking for an invalid account and to avoid creating spam.

 

 The reason the above field is updated could be any of these these

  • Change in the permissions for user account
  • Account becomes inaccessible
  • Any of the click home exchange configuration settings are incorrect
  • Cannot Impersonate the user account, verify if impersonation is set-up correctly

Once it updates this field, it does not check this account for new messages. When the issues are corrected, change the Ext. Ref. value to blank to start integration again for the user.

The appointments for Construction / Maintenance Supervisor are not showing up on the user's calendar

  • Verify if the click home user has exchange setting enabled (Administration > Users > Users> User Details > Settings section) 
  • Verify job is assigned to the supervisor (click home user)
  • Verify task is scheduled to virtual supplier 'Supervisor'

Additional Information

For exchange server, please refer the following URL for more details about configuring exchange impersonation http://msdn.microsoft.com/en-us/library/exchange/bb204095(v=exchg.140).aspx
Impersonation and EWS in Exchange - Applies to EWS Managed API, Exchange Online, Exchange Server 2013, Office 365 https://msdn.microsoft.com/en-us/library/office/dn722377(v=exchg.150).aspx
How to: Configure impersonation in Exchange Online https://msdn.microsoft.com/en-us/library/office/dn722376(v=exchg.150).aspx