17
Version 1 Seite 1 von 17 Axperience AG Gewerbestrasse 12 8800 Thalwil Telefon 044 722 59 60 www.axperience.ch AXPExchangeSync How to implement

AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

Version 1 Seite 1 von 17 Axperience AG • Gewerbestrasse 12 • 8800 Thalwil

Telefon 044 722 59 60 • www.axperience.ch

AXPExchangeSync How to implement

Page 2: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 2 von 17 AXPExchangeSync_HowToImplement

Content 1 DESCRIPTION .................................................................................................................................. 4

1.1 PREREQUISITES ...................................................................................................................................... 4

2 SETTINGS ....................................................................................................................................... 4

2.1 PARAMETERS......................................................................................................................................... 4

2.1.1 Connection ....................................................................................................................... 5

2.1.2 Synchronisation ................................................................................................................ 5

2.1.3 Privacy .............................................................................................................................. 6

2.1.4 Email import ..................................................................................................................... 6

2.1.5 Employee default data ..................................................................................................... 6

2.1.6 Default context types ....................................................................................................... 6

2.1.7 Default categories ............................................................................................................ 6

2.1.8 Update Conflict................................................................................................................. 6

2.1.9 Timezone settings ............................................................................................................ 6

2.2 CATEGORIES .......................................................................................................................................... 6

2.3 COMMUNICATION TYPES.......................................................................................................................... 7

2.4 PUBLIC FOLDER FOR CONTACT SYNCHRONISATION ......................................................................................... 7

2.5 EXCHANGE EMAIL / ACITIVITY PARENT LINK MAPPINGS .................................................................................. 8

3 SYNCHRONIZING APPOINTMENTS ........................................................................................................ 8

3.1 CREATE APPOINTMENT IN AX ................................................................................................................... 8

3.2 CREATE AN APPOINTMENT IN EXCHANGE .................................................................................................. 11

3.3 AUTOMATION ..................................................................................................................................... 12

3.4 THINGS TO CONSIDER ............................................................................................................................ 13

4 SYNCHRONIZING TASKS ................................................................................................................... 13

4.1 CREATE A TASK IN EXCHANGE ................................................................................................................. 13

4.2 CREATE A TASK IN EXCHANGE ................................................................................................................. 13

4.3 AUTOMATION ..................................................................................................................................... 13

5 IMPORTING EMAILS ........................................................................................................................ 14

5.1 IMPORTING EMAILS FROM EXCHANGE ...................................................................................................... 14

5.2 AUTOMATIZATION ................................................................................................................................ 15

6 CONTACT SYNCHRONIZATION ........................................................................................................... 15

6.1 EXPORTING CONTACTS TO A PUBLIC CONTACT FOLDER ................................................................................. 15

6.2 IMPORTING CONTACTS FROM A PUBLIC CONTACT FOLDER ............................................................................. 15

Page 3: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 3 von 17 AXPExchangeSync_HowToImplement

6.3 AUTOMATION ..................................................................................................................................... 15

6.4 EXPORT CONTACTS TO A PRIVATE CONTACT FOLDER ..................................................................................... 15

6.5 AUTOMATION ..................................................................................................................................... 16

6.6 THINGS TO CONSIDER ............................................................................................................................ 16

Page 4: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 4 von 17 AXPExchangeSync_HowToImplement

1 Description

This document describes a guide of setting up AXPExchange Sync after installation of the module in AX.

1.1 Prerequisites

- XPO or Model of AXPExchangeSync is installed in AX - AXPEWS.dll is copied to the server/bin and client/bin folder on every Server/Computer the AX

environment may be compiled - Microsoft Exchange Webservice is running - A windows user with impersonation rights on Exchange, which allows reading and writing of every

Exchange mailbox

2 Settings

2.1 Parameters

If installed correctly with the AXPEWS on the Tab License information you should see the license information of your AX installation and the license information on the Exchange module which has to match the Dynamics information.

Page 5: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 5 von 17 AXPExchangeSync_HowToImplement

2.1.1 Connection

Define the connection settings with the URL of the Exchange Server (like https://yourExch /EWS/Exchange.asmx) and the domain.

Synchronization account and password for the windows user with impersonation rights, which has the right to access (read and write) all mailboxes.

Email address for public folders. If public folders are used for contact synchronization the email address of the owner of the public folder has to be entered here.

Exchange protocol (form 2007 SP1 to 2013).

Outlook file as, define how the name field in Exchange has to be created when inserting new contacts in Exchange out of AX

2.1.2 Synchronisation

Define how many days in the past and in the future objects in Exchange should be contained in the query. Theses parameters are valid for importing emails, appointments and tasks from Exchange to AX. The start from to date are in the query to get objects.

o Eg. if future days is set to 30 and you create an appointment in Exchange 31 days from now, the appointment will be imported to AX not until tomorrow.

o Eg. if past days is set to 5 and you mark an email to be imported to AX, which you received 6 days before this email will not be imported.

Email-recipient for receiving batch processing errors via email

Page 6: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 6 von 17 AXPExchangeSync_HowToImplement

2.1.3 Privacy

Normally only objects which are marked by a category are enclosed in the sync process. With the parameters ignore category settings, the process will export every appointment/ task activity out of AX and also will import all appointments/ task from the exchange mailbox, even private ones. The private flag will make these activities only be visible for the owner in AX, but if using 3rd party tools to view activity appointments in a calendar in AX might make a subject visible for other users. For this you can define whether private appointments/ tasks should be imported with or without subject and body.

2.1.4 Email import

Define which date format is used on exchange server, Swiss for European one with “.” as separator, USA for “/” as separator.

Define which activity category should be used for activities created from emails (mostly taken is event).

Define whether you want to import emails from inbox or also from outbox.

Define the activity type you want to use for received and sent emails.

2.1.5 Employee default data

Only employees which are defined for synchronization will be included in synchronization. If all of your employees should be able to synchronize you can set default parameters for these settings when creating new employees.

2.1.6 Default context types

Define which default content types should be the body texts of appointments, contacts and tasks. Depending on AX Version and Exchange Version there might be problems in viewing the body in AX activities in html style.

2.1.7 Default categories

Only objects with an Exchange category for synchronization attached will be recognized in AX. If all of the appointments, tasks, and contacts should be included in the synchronization, default Exchange categories can be used when creating new objects in AX.

2.1.8 Update Conflict

With contact synchronization, AX is defined as the leading system. If a contact has changes in AX and in Exchange and the batch tries to import the contact, this contact from Exchange will be disregarded and the export from AX to Exchange will override the data. If using contact synchronization in private contact folders, there might be the possibility that one contact of AX might be in several private contact folders. This contact stays marked as changed in AX until it is exported to all connected mailboxes. The delay defines the time period in hours until import of Exchange is allowed to override the contact in AX.

2.1.9 Timezone settings

With timezone for activities a second date time field group will appear on the appointment activity which allows you to select another time zone to plan your appointment in AX, so you can see what time the appointment is in your defined time zone and another one. When exported the user will see in his outlook client the appointment on his timezone, in the detail he will see it with the planned time zone.

2.2 Categories

You have to define categories that indicate which objects of AX (appointment, task, private contacts) or which objects of Exchange (appointment, task, private contact, email) should be included in the synchronization.

Page 7: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 7 von 17 AXPExchangeSync_HowToImplement

It is sufficient to create only one category in AX (the categories are created automatically in all mailboxes) for all activity types or to use more categories for a more specific distinction.

2.3 Communication types

For synchronization of contact information between AX and Exchange a match has to be made which contact fields in AX will reference to which contact fields in Exchange.

For an easy and fast setup you can use the Job AXPCommunicationTypeCreate which will setup all basic fields and is enclosed in the module xpo/modell.

2.4 Public folder for contact synchronisation

If AX contacts should be synchronized to a public contact folder, the contact folder of Exchange has to be specified. When leaving the field ExchangePath, ExchangeSync will verify the path, if found Exchange ObjectID will be filled in. With the function Choose contacts a filter will be established to define the contacts to be chosen for this folder. E.g. select all contacts from one Sales group, country etc.

Page 8: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 8 von 17 AXPExchangeSync_HowToImplement

2.5 Exchange Email / Acitivity parent link mappings

When using email import function of ExchangeSync, the created activity will automatically be referenced to the contact person and the referenced business relation. Further it is possible to link the activity to a PurchaseOrder, Quotation or SalesOrder, if the information is provided.

The import job will scan the subject of the email for the format type defined in the Exchange Email/ Activity parent link mapping table. If such number type is found in the subject and an entry for this number exists in the corresponding Table, the link will be established on the activity.

3 Synchronizing Appointments

3.1 Create appointment in AX

Create an appointment in AX.

Define the purpose

The location has to be filled in (at least “-“), because of Exchange Webservice restrictions.

Page 9: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 9 von 17 AXPExchangeSync_HowToImplement

Define start and end date or mark the appointment as “all day”

Select the responsible worker (default is the worker of the current user)

Add attendees for the appointment

Add notes for the appointment

Select an Exchange category to mark the appointment for synchronization

As soon as the Exchange category is assigned to the activity and the responsible worker is marked for synchronization every update and delete will be logged for synchronization.

When the batch job for the export is executed the new appointment will be created in the Exchange account of the responsible worker.

Page 10: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 10 von 17 AXPExchangeSync_HowToImplement

The purpose of the AX appointment will get the subject of the Exchange appointment

If an attendee was inserted in AX an invitation will be sent automatically for this appointment

Page 11: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 11 von 17 AXPExchangeSync_HowToImplement

3.2 Create an appointment in Exchange

Create an appointment in Exchange, e.g. via Outlook client and mark the appointment with the defined Exchange category for synchronization.

Page 12: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 12 von 17 AXPExchangeSync_HowToImplement

A new activity will be created in AX.

With an attendee selected in the Exchange appointment, AXPExchangeSync will search in the import for the attendee email-address in the contact information in AX, if found, associations will be created for the contact person and the assigned business relation.

3.3 Automation

To get the synchronization automatically done the batch jobs for export and import have to be set up. They can be found on Exchange Sync\ Periodic\ Export\ Export appointments and Import appointments.

For testing you can run the jobs manual from here.

For setting up a periodic batch create a new batch job, e.g. “Appointment synchronization” and add two tasks to it, selecting the classes AXPExchangeDataExport_Appointments and AXPExchangeDataImport_Appointments, with the condition that the Import must not start before the export has finished.

Page 13: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 13 von 17 AXPExchangeSync_HowToImplement

3.4 Things to consider

Attendees: If an attendee is attached to an appointment, every update on the appointment will be sent to the attendee. Because of this the attendee is not added automatically to an appointment when created from contact person (like standard AX), the attendee has to be added manually.

Associations can only be created if the email-address exists in AX

4 Synchronizing Tasks

4.1 Create a Task in Exchange

For basic setup see appointments 3.1. Difference for tasks is that no location is required and start datetime and end datetime can be the same. By default no information is added to a task created in AX. But it can be easily coded in the init method of the task to default the company name, contact name in the subject of the task or contact information in the body.

4.2 Create a Task in Exchange

Tasks created in Exchange can be imported and will be linked to the corresponding worker of the Exchange mailbox. Because a task does not have standardized information for a contact person or company (only free text), by default no association is created when importing Tasks from Exchange.

4.3 Automation

For batch job setup see automation of appointments 3.3. Classes to select for Task synchronization AXPExchangeDataExport_Tasks, AXPExchangeDataImport_Tasks.

Page 14: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 14 von 17 AXPExchangeSync_HowToImplement

5 Importing emails

5.1 Importing emails from Exchange

When selected in Parameters emails can be imported from inbox and outbox.

The email has to be marked with the corresponding Exchange category

The email-address has to exist in AX to import the email and create the associations

For the email an activity from the category defined in parameters (here Event) will be created in AX.

Due to the email-address of the sender the activity is associated with the contact person and his business relation.

Due to the quotation number in the subject and the settings in parameters (see 2.5) the activity is also associated with the Quotation table.

The attachment is stored in the document management system. It is linked to the activity.

Page 15: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 15 von 17 AXPExchangeSync_HowToImplement

5.2 Automatization

Create a periodic batch from Exchange Sync\ Periodic\ Import\ Import E-Mails

6 Contact Synchronization

6.1 Exporting Contacts to a public contact folder

Define public contact folders (see 2.4)

Every insert/ update/ delete on a contact person will be logged in AX if the contact person belongs to a filter set of a public contact folder

The export job will create/ update/ delete the contact information on the public contact folder in Exchange

6.2 Importing Contacts from a public contact folder

The import job will select all contacts from Exchange public folder. If the update ID of Exchange has changed since the last synchronization with AX the contact information will be updated in AX

If the contact does not exist in AX a new contact will be created. By default the contact will not be created if the company name (free text in Exchange/ Outlook client) does not match a Customer account exactly in order to prevent contacts not related to any business relation. This can be changed in Code

If a contact is deleted in a public folder, the contact will be marked as “skip sync” in AX relation table for contact synchronization. A contact will never be deleted in AX by AXPExchangeSync

6.3 Automation

See setup of appointment 3.3 synchronization with the Classes AXPExchangeDataExport_ContactsPub and AXPExchangeDataImport_ContactsPub.

When using first time after installation you can use checkbox “Export all” on Exchange Sync\ Periodic\ Export\ Contacts\Export public contacts on the export job (run it manually or 1 time in batch) which will do an initial load of all contacts. While after that only new, updated or deleted contacts will be enclosed in sync.

6.4 Export contacts to a private contact folder

All contacts which should be allowed to get exported to a private contact folder of an Exchange mailbox has to marked with an Exchange category for private contact sync. This can be used to give the workers access to some contacts but not all contacts

A worker can assign a contact to his contacts by “add private contacts” on the contact person, or by creating a filter on Exchange Sync\ Common\ Private contacts

Page 16: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 16 von 17 AXPExchangeSync_HowToImplement

6.5 Automation

Private contact folder synchronization can be setup as batch, see appointment synchronization 3.3

Private contact folder synchronization can be performed

6.6 Things to consider

Using public contact folders: o Security can be setup on Exchange side, which user have access to which contact folder

(e.g. sales region), which users are allowed to create/ update contact information o A 1:1 connection between AX and Exchange contact is created. 1 AX contact will match 1

contact in a public folder o When connected via Outlook, the public folders are accessible, while using third party

devices (IOS, Android,…), Apps could be needed to access public folders on Exchange

Using private contact folders: o Users can have business contacts in their private contact folder and have them accessible

on their devices (also IOS, Android,..)

Page 17: AXPExchangeSync...2.5 Exchange Email / Acitivity parent link mappings When using email import function of ExchangeSync, the created activity will automatically be referenced to the

AXPExchangeSync

Version 1 Seite 17 von 17 AXPExchangeSync_HowToImplement

o Due to user selection a 1:n connection between AX and Exchange contact can be possible. 1 AX contact is selected for several private contact folders which may make changes in contact information confusing for users

o Business contacts are on private devices!