Skip to main content

Outlook integration using Microsoft Graph – configuration

Updated over a month ago

Coins ERP+ can be integrated with Microsoft Outlook so that emails sent from Coins ERP+ are processed by Outlook, and tasks and appointments are synchronised between Coins ERP+ and Outlook.

See Outlook integration using Microsoft Graph.

To grant permissions for the system

  1. Create and configure the AAD App first (see Microsoft Graph Setup).

  2. Grant admin consent. On the AAD Permissions screen, tick the following permissions in the Required column:

    • Mail.Read and Mail.Send to allow emails to be sent.

    • Calendars.ReadWrite to allow synchronisation of events and appointments.

    • Tasks.ReadWrite to allow synchronisation of tasks.

    AAD Permissions screen

    For details of how to grant admin consent, see AAD Code Grant.

The next time you log in, these permissions are requested, and (if the permissions are granted) these are ticked in the Grant column.

These are the permissions that are granted for the system as a whole. You also need to grant permissions to individual users.

If the App has been shared with other environments then the admin consent may already have been granted.

To check a user’s permissions

On the User Workbench AAD ID tab, the AAD Scope field lists the permissions that are granted to the user when they log in.

To test that AAD Graph is working, click the

(Profile) button. The user’s profile displays in a separate window.

To enable email integration for a user

After a user has logged in using AAD, the MS Graph option appears on that user's User Workbench record.

  1. On the user record, go to the System > MS Graph tab.

  2. Click Open.

  3. To let the user send emails using Outlook, tick Emails.

  4. Click Save.

To enable appointment integration for a user

After a user has logged in using AAD, the MS Graph option appears on that user's User Workbench record.

  1. On the user record, go to the System > MS Graph tab.

  2. Click Open.

  3. To allow appointments created in Coins ERP+ to be copied Outlook, tick Synchronise Appointments.

  4. To also allow appointments created in Outlook to be copied to Coins ERP+, tick New Outlook to Coins ERP+.

    Appointments in Outlook will be copied if the first category on the appointment matches the description of an action type in your default Coins ERP+ company.

  5. Click Save.

  6. To synchronise appointments immediately, click the corresponding REFRESH button. If you don’t do this, appointments will be synchronised when sy906b.p runs (which is usually overnight).

    The screen shows details of the synchronisation.

    Field - Subscription ID

    Description - The ID to the subscribed webhook in Outlook. This means that any changes made in Outlook are alerted near real time with COINS. You can delete the subscription using the Delete button, and reset it with the Refresh button which does another full sync. A full resync is done each time sy906b.p is run overnight.

    Field - State

    Description - A secret that the Outlook webhook must provide for the webhook post to be actioned.

    Field - Expires

    Description - The time at which the subscription expires. This is 48 hours from the time the refresh is run. This is refreshed every night when sy906b.p is run.

    Field - Delta URL

    Description - The URL that will be used to retrieve the next set of changes. It will change as each change is made and processed in Outlook.

Only appointments that are within the date range determined by the SY parameters MSEVBACK and MSEVFWD are synchronised.

To enable task integration for a user

  1. In each company that will receive tasks from Outlook, create an action type for those tasks, and enter it as the value of SY/MSACTTYP.

  2. In the user’s Outlook account, create a task list folder that corresponds to the value of SY/MSLINAME (for example, COINS).

  3. On the user record, go to the System > MS Graph tab.

  4. Click Open.

  5. To allow tasks created in Coins ERP+ to be copied to Outlook, tick Synchronise Tasks.

  6. To also allow tasks created in Outlook to be copied to Coins ERP+, tick New Outlook to Coins ERP+.

    If you have set up the list correctly, the screen shows a List ID for it.

  7. Click Save.

  8. To synchronise tasks immediately, click the corresponding REFRESH button. If you don’t do this, tasks will be synchronised when sy906b.p runs (which is usually overnight).

Monitoring changes

For normal running, ensure that the background task that services the MSGRAPH endpoints (.PULL and .PUSH) is running.

Changes in Coins ERP+ and changes in Outlook can be seen passing through the ESB (most easily done if the ESB send process for MSGRAPH endpoint is stopped).

With the MSGRAPH endpoint stopped, changes made in Coins ERP+ and Outlook show up as messages.

ESB Outbound Message Screen

Changes in Coins ERP+ show as PUSH with an UPDATE (or CREATE or DELETE) and a kco and hsa_ref key.

Changes in Outlook show as PULL with MSEVENT source and the subscription ID (from the user MS graph tab) as the key.

Restarting the MSGRAPH endpoint will process the changes, and they are then reflected in the Activity Workbench and Outlook.

Parameters

SY/MSACTTYP

MS Task Action Type

The action type to assign to tasks that are created in Outlook and are then created in COINS. This action type needs to be created in each company that will receive tasks from Outlook. Tasks are created in the default company for a user.

If you change this parameter, ensure that the application server and graph server agents are restarted for it to take effect.

Action types are set up using Action Types.

SY/MSEVBACK

MS Event Days Backwards

The number of days backwards that events in Outlook and COINS Appointments will be synchronised. This is a positive number, so 1 means yesterday. Expected values are 1 or perhaps 7 for last week. Changes to appointment or events before this date will ignored.

Related Parameter

  • SY/MSEVFWD - MS Event Day Forwards

SY/MSEVFWD

MS Event Day Forwards

The number of days forwards that events in Outlook and COINS Appointments will be synchronised. This is a positive number, so 7 means the coming seven days. A typical value is 21 for the next three weeks. Changes to appointments or events after this date will ignored.

Related Parameter

  • SY/MSEVBACK - MS Event Days Backwards

SY/MSLINAME

MS Task List Name

The name of the Task list in Outlook that will be synchronised with the tasks in COINS. If the list does not exist for the user, they will not be able to synchronise tasks.

SY/WEBHOOK

Webhook URL

The URL to register and action webhook POSTs from MSGraph. Typically it will be the URL with wohook.p; for example:

It would be possible to configure an apache redirect or proxy on a different server (to separate out this interface if required), in which case the proxy URL would be used and would redirect to the wohook.p URL above.

Did this answer your question?