Calendar Integration setup of master calendar on MS Azure or Google
This document describes the configuration steps for either Microsoft Azure or Google Workspace. (release 11.3)
Summary Integration Setup Steps:
Create calendar platform credentials for Xytech.
Create a master calendar account on your calendar platform.
Configure Xytech MPSE service with the calendar integration configuration (for self-hosted sites. For Xytech hosted sites provide Technical Services with the credentials to configure).
Microsoft Graph app registration and master calendar
Create app registration in Azure
Obtain the following parameter values:
Tennent ID
Application ID (client ID)
Secret
Master calendar account email
Steps using Microsoft Entra ID
Manage - App Registrations - New Registration

Name the application e.g. Xytech Calendar Integration. (no redirect URI required)
Certificates & Secrets - create a Client Secret and make a note of it. (note the expiry date for when it needs regenerating)

API Permissions - add the following permissions for Microsoft Graph
Calendars.Read
Calendars.ReadWrite

Expose API - Create a scope

On the overview display, also make a note of the Application (Client ID), Tennent ID
Create a user account to act as the master calendar and note the email address
Google Calendar service account and master calendar
Google Service Account
This integration is intended for use with a Google Workspace account used by a business to provide calendar services to multiple individuals, not a Gmail account used by a single individual.
Create and configure a new Google Service Account via the Google Console at: https://console.cloud.google.com/ Go to API & Services\Credentials and add a new Service Account.
Note the email of the Service Account.
Note the Service Account Unique ID.
Create a P12 key and password.
Download the P12 certificate file and note the file name
Note the password.

Enable Google Calendar API (APIs and Services\Enabled APIs and services)

Enable Google Workspace Domain-wide Delegation by entering the service account’s Unique ID as the Client ID, at: https://admin.google.com/ac/owl (Security\Access and Data Controls\Api Controls\Domain Wide Delegation) Allow the following scopes:
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/calendar.events
Xytech configuration (for self-hosting customers)
Pre-reqs
Xytech App server config should be properly configured including: queue parameters for each database. e.g.

Create private queues for calendar integration (MSMQ)
XytechCalendar
XytechCalendarStatus

Enable journal (optional for diagnostic tracing) Enable security for 'everyone'

Xytech MPSE configuration
Edit the configuration file: MediaPulseServiceEngine.exe.config
Listener
Add CalendarAdaptorService and RouterQueue logging Set a suitable location value for the log files for the 'customlocation' parameter. Set level of logging for 'switchName':
Everything
InfoAndWarningsAndErrors
WarningsAndErrors
ErrorOnly
<source name="CalendarAdapterService"
switchName="Everything"
switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="XytechListener"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"
location="Custom"
customLocation="C:\Program Files\Xytech\Logs"
logFileCreationSchedule="Daily"
traceOutputOptions="DateTime"
maxFileSize="25000000"
baseFileName="CalendarAdapterService"/>
<remove name="Default"/>
</listeners>
</source>
<source name="RouterQueue"
switchName="Everything"
switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="RouterQueue"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"
location="Custom"
customLocation="C:\Program Files\Xytech\Logs"
logFileCreationSchedule="Daily"
traceOutputOptions="DateTime"
maxFileSize="25000000"
baseFileName="RouterQueue"/>
<remove name="Default"/>
</listeners>
</source>
RouterQueue
Add a a calendar router queue. Note the name must be 'ExchangeInterface' for the MSMQ defined in the step above.
<key name="ExchangeInterface" value=".\Private$\XytechCalendar"/>
Example in context of the MPSE config:

Service Configuration for Microsoft Azure calendar
Need values for:
DB Name
REST API Base URL
Xytech DB System user & password
Queue Names
Azure App registration details
Impersonation Email - master calendar
<services>
<service name="CalendarAdapterService" type="MediaPulse.DigitalOrderServices.CalendarAdapter.CalendarAdapter">
<keys>
<key name="Verbose" value="Y" />
<key name="MpDbName" value="MP_DEMO" />
<key name="MpRestApiUri" value="http://localhost/xytech/api/v2/database/MP_DEMO" />
<key name="MpUsername" value="xytech" />
<key name="MpPassword" value="password" />
<key name="QueueName" value=".\Private$\XytechCalendar" />
<key name="StatusQueue" value=".\Private$\XytechCalendarStatus" />
<key name="CheckEmailIntervalInSeconds" value="30" />
<key name="CalendarProvider" value="Exchange" />
<key name="CalendarTokenUrl" value="https://login.microsoftonline.com/94fb7681-xxxx-42ff-a3cb-ddc177452a36/oauth2/v2.0/token" />
<key name="CalendarBaseApiUrl" value="https://graph.microsoft.com/v1.0/" />
<key name="CalendarGrantType" value="client_credentials" />
<key name="CalendarScope" value="https://graph.microsoft.com/.default" />
<key name="ClientId" value="8003b4d8-xxxx-xxxx-xxxx-9d26d27806ed" />
<key name="ClientSecret" value="f0cea19d-xxxx-xxxx-xxxx-20139c1200dc" />
<key name="ImpersonationEmail" value="[email protected]" />
</keys>
</service>
</services>
Service Configuration for Google Workspace calendar
Need values for:
DB Name
REST API Base URL
Xytech DB System user & password
Queue Names
Service Account Email
Impersonation Email (master calendar account)
Certificate Name
Certificate file Copy the certificate file into the root folder of the Xytech application – add double back-slashes.
<services>
<service name="CalendarAdapterService" type="MediaPulse.DigitalOrderServices.CalendarAdapter.CalendarAdapter">
<keys>
<key name="Verbose" value="Y" />
<key name="MpDbName" value="MP_DEMO" />
<key name="MpRestApiUri" value="http://localhost/xytech/api/v2/database/MP_DEMO" />
<key name="MpUsername" value="xytech" />
<key name="MpPassword" value="password" />
<key name="QueueName" value=".\Private$\XytechCalendar" />
<key name="StatusQueue" value=".\Private$\XytechCalendarStatus" />
<key name="CheckEmailIntervalInSeconds" value="30" />
<key name="CalendarProvider" value="Google" />
<key name="CalendarLoginUrl" value="https://accounts.google.com/o/oauth2/auth"/>
<key name="CalendarTokenUrl" value="https://oauth2.googleapis.com/token"/>
<key name="CalendarBaseApiUrl" value="https://www.googleapis.com/"/>
<key name="CalendarGrantType" value="urn:ietf:params:oauth:grant-type:jwt-bearer"/>
<key name="CalendarScope" value="https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events"/>
<key name="ServiceAccountEmail" value="[email protected]"/>
<key name="ImpersonationEmail" value="[email protected]"/>
<key name="CertificateName" value="C:\\Program Files\\Xytech\\xytechcalendarintegration-940ef64be40c.p12"/>
<key name="CertificatePassword" value="notasecret"/>
</keys>
</service>
</services>
Xytech UI config key parameters
Scheduling - Preferences
Navigate to: Scheduling - Setup - Preferences Scheduling Configure Calendar Invitations using Event Triggers = true
Phases
Enable phases for calendar invites. Navigate to: Job Management - Setup - Phases Edit the details of a selected phase.

Off Types
For Off Types, like shifts, vacation, days off etc... Enable the Off Type for the Event Trigger to work. Navigate to: Scheduling - Setup - Off Types Check 'Schedule in Exchange Server' to enable the Off Type. Then create the Event Trigger
Event Triggers
Setup Event Triggers as needed for Insert, Update triggers. Note: Deletion is handled automatically, no Event Trigger is required. Upon deleting a transaction that has sent an invite, and deletion for that invite will automatically be sent. - Event Code: (unimportant what the text is, use something to identify similar triggers) - Send to queue: no - Notify Type: Invite
Personnel Scheduling Resource setup: Assign email and E-Mail Booking

Last updated