Only this pageAll pages
Powered by GitBook
1 of 3

Calendar Integration setup

Loading...

Loading...

Loading...

Standard Integrations

Calendar Integration

Calendar Integration setup of master calendar on MS Azure or Google

Calendar Integration configuration

Calendar Integration configuration

Xytech Configuration - Web Client

This article describes settings required to trigger invites for the Calender Integration. Below is an example of the basic configuration required within the UI.

Pre-requsite: Calendar Integration has been

To enable sending invitations from Xytech to recepient calendars (e.g. Google / Microsoft), log in to the Xytech Web client as a super user or a user with access to the appropriate areas.

Enable Event Trigger Invitations

The following need to be set

  • Scheduling Preference: Scheduling Preferences need to be set to use Event Triggers

  • Scheduling Resource: Scheduling Resource needs to be configured for Exchange Server Calendar invitations

  • Phases: Phases will need to be enabled for the Exchange Server

  • Event Triggers: Event Triggers will be needed for conditions and rules of sending the Invitation.

Ensure the following setting is enabled:

  1. Navigate to Scheduling > Setup > Preferences-Scheduling

  2. Ensure the checkbox for Configure Calendar Invitations using Event Triggers is checked for the global division and / or separately for each division.


Ensure your Resource is set to 'Exchange Server'

  1. Navigate to Scheduling > Scheduling Resources

  2. Open a Resource of your choice

    • E-Mail Booking: Exchange Server Meeting Request


Determine which phases should be included in the Exchange Server Calendar Integration and enable the setting for each phase.

  1. Navigate to Job Management > Setup > Phases

  2. Select the relevant phase

  3. Click on the Details tab

  4. Set the following options:


Create Event Triggers to Send Notifications

To create an Event Trigger which sends messages:

  1. Navigate to System, then Event Triggers.

  2. Click the (+) (Append a New Record) button.

  3. On the Event Trigger tab, set the properties as follows:

  1. On the Conditions tab, set the properties as follows:

  • Table Name: Transaction Header [c_trx_header]

  • Column Name: Phase [phase_code]

  • Column Source: modified

5. On the Notifications tab, set the properties as follows:

  • Description: New Notification todays_date

  • Notify Type: INVITE

  • Active: Selected/checked

  1. On the Notification Template tab, set the properties as follows:

  • Meeting Subject: Order: [WO.wo_no_seq] Note: from the Template Fields list, dragging the Order (wo_no_seq) item from under Order Transactions displays this as [jm_wo_transaction.wo_no_seq].

  • Meeting Location: Location

  1. Click Save and Close.

  2. Edit the new event trigger, and on the Notification Template tab, click Meeting Body and enter the following block:

  1. Repeat the process for the Event Trype of UPDATE and modify the values as necessary. A DELETE trigger is not required, as once invitations are sent, the adapter will automatically handle cancellations when transactions are removed.

When configured to send transaction-triggered invites, the following process :

  • Each new transaction booking will be sent as calendar invites to the email address of the resource.

  • Transaction Invitation Status is set to ‘Sent’. (Recipients do not need to be Google or Microsoft Calendar users to be sent an invitation.)

  • When a recipient ‘Accepts’ the invitation, the Invitation Status on the transaction is updated to ‘Accepted’.

Review the calendar adapter log file for error messages.

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)

  • 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).

E-Mail Address: Enter the email address of the resource
  • Schedule in Exchange Server: On

  • Show Exchange Server Time As: Busy

  • Active: Selected (checked)
  • Event Code: DOCUMENT (or enter a custom code for easy identification)

  • Event: Send invite on new confirmed transaction

  • Event Type: INSERT

  • Document: Work Order Transactions

  • Doc Table Name: Transaction Header

  • Send To Queue: Un-selected (un-checked)

  • Operator: =
  • Compare Value: Confirmed

  • When a recipient ‘Declines’ the initial invitation, the Invitation Status is updated to ‘Declined’.
  • Any changes by the recipient to change their original acceptance, will not be reflected on the transaction. If changes are made to the transaction that trigger an update invite, the recipient then the user has the opportunity to respond again.

  • Scheduling Preference

    Scheduling Resource

    Phases

    Steps to Enable:

    Event Triggers

    Invitation Process

    Troubleshooting

    setup with a master calendar from Google or Microsoft
    Job ID:          [WO.jm_job_job_no]
    Event Type:      [WO.jm_job_job_type_no_desc]
    
    Work Order:      [TRX.wo_no_seq][WO.wo_desc]
    Setup Time:      [TRX.setup_time]
    Start Date/Time: [WO.wo_begin_dt]
    End Date/Time:   [WO.wo_end_dt]
    Bumper Time:     [TRX.bumper_time]
    Role:            [TRX.group_desc]

    Obtain the following parameter values:

    • Tennent ID

    • Application ID (client ID)

    • Secret

    • Master calendar account email

    1. Manage - App Registrations - New Registration

    1. Name the application e.g. Xytech Calendar Integration. (no redirect URI required)

    2. Certificates & Secrets - create a Client Secret and make a note of it. (note the expiry date for when it needs regenerating)

    1. API Permissions - add the following permissions for Microsoft Graph

    • Calendars.Read

    • Calendars.ReadWrite

    1. Expose API - Create a scope

    1. On the overview display, also make a note of the Application (Client ID), Tennent ID

    2. Create a user account to act as the master calendar and note the email address

    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.

    1. 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.

    2. Create a P12 key and password.

      • Download the P12 certificate file and note the file name

      • Note the password.

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

    1. 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:

    Xytech App server config should be properly configured including: queue parameters for each database. e.g.

    • XytechCalendar

    • XytechCalendarStatus

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

    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

    RouterQueue

    Add a a calendar router queue. Note the name must be 'ExchangeInterface' for the MSMQ defined in the step above.

    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

    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.

    Navigate to: Scheduling - Setup - Preferences Scheduling Configure Calendar Invitations using Event Triggers = true

    Enable phases for calendar invites. Navigate to: Job Management - Setup - Phases Edit the details of a selected phase.

    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

    Summary Integration Setup Steps:

    https://www.googleapis.com/auth/calendar
    https://www.googleapis.com/auth/calendar.events
    <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>
    <key name="ExchangeInterface" value=".\Private$\XytechCalendar"/>
    <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="XytechCalendar@151pcl.onmicrosoft.com" />
    		</keys>
    	</service>
    </services>
    <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="xytech@xytechcalendarintegration.iam.gserviceaccount.com"/>
    			<key name="ImpersonationEmail" value="xytech@woogy.co.uk"/>
    			<key name="CertificateName" value="C:\\Program Files\\Xytech\\xytechcalendarintegration-940ef64be40c.p12"/>
    			<key name="CertificatePassword" value="notasecret"/>
    		</keys>
    	</service>
    </services>

    Microsoft Graph app registration and master calendar

    Create app registration in Azure

    Example Azure parameters required for Xytech

    Application ID (client ID): 8003b4d8-0b09-4eb7-9daf-9d26d27806ed Secret: MdC8Q~IIgzXNaeD-7_0nvp3F4d3uu.AVNRclLame Tennent: 94fb7681-12345-6789-a3cb-ddc177452a36 Master calendar account: xytechBookings@example.com

    Steps using Microsoft Entra ID

    Google Calendar service account and master calendar

    Google Service Account

    Example Google parameters required for Xytech

    Service Account Email: xytech-services@xytech-int-00.iam.gserviceaccount.com Impersonation Email: xytechBookings@example.com Certificate file: xytech-integrations-000000-9d4b9b0bae83.p12 Secret: notasecret

    Xytech configuration (for self-hosting customers)

    Pre-reqs

    Create private queues for calendar integration (MSMQ)

    Xytech MPSE configuration

    Xytech UI config key parameters

    Scheduling - Preferences

    Phases

    Off Types

    Cover
    Cover