Using the Account Migration Service in Sales, Marketing and Service

The Sales, Marketing and Service module of Sage 200 uses the Account Migration Service to pass data between the two programs. The settings for the service can be altered in particular scenarios, for example, to re-synchronise all customer records across to Sales, Marketing and Service. It's also possible to schedule the service to run at regular intervals throughout the day.

Note: The information below contains steps that involve modifications to files that affect how the CRM Connector functionality operates. We strongly recommend you create a copy of the S200 folder before making any changes as incorrect entries may cause serious problems with functionality.

Note: This article has been updated to reflect the release of version 4.1 of the CRM Connector. If you are using version 3.1, please refer to the documentation that accompanies this version as the steps required are different from those described below.

Once the initial synchronisation of records has been completed, there are a number of options available to decide how changes should be updated going forward. There are three possible options:

  • Manually run migration synchronisation.
  • Set up a Windows service to run periodically.
  • Use Real Time Data Sync.

Manually run migration synchronisation

Each time the manual sync or data import is performed, it looks at the last sync date on the Sage CRM Connector Configuration screen then decides which records need to be synchronised.

last sync date

Records amended prior to this date and time will not be included in the next sync as they have not been updated or amended since the last sync took place. After the Last Sync Date, it then looks at:

  • The Last Updated Date (DateAccountDetailsLastChanged) on the Sage 200 customer account.
  • The Updated Date field (comp_updateddate) on the company record.

This will then determine a predefined logic of 'ERPisMaster'. If Sage 200 was the most recently updated record, it will become the master and changes will apply from Sage 200 to Sales, Marketing and Service. Where the Sales, Marketing and Service record has the later value, it will perform the sync in the opposite direction - effectively making it the master.

Migration mode

Migration mode can be enabled in the Sage CRM Connector Configuration screen. This forces Sage 200 to become the master for all records and means a full sync is performed the next time the service is ran via the Windows Task Scheduler or the 'Import and Sync' button in Sales, Marketing and Service. To enable migration mode, follow the steps below.

  1. Administration > Sage CRM Connector Configuration.
  2. Select Change.
  3. Select the checkbox for Migration Mode.
  4. Select Save.

When the Import and Sync option is next selected in Sales, Marketing and Service, all information held within the Sage 200 customer records will be synchronised. Any changes to the same data in Sales, Marketing and Service will be overwritten with the relevant values from Sage 200.

Setting up Windows Task Scheduler for regular synchronisation

Note: If you wish to synchronise data only from specific companies in Sage 200, you must ensure that the Sage 200 Services user in Sage 200 System Administration only has access to those companies. For example, if you have five companies set up in Sage 200 Extra and only wish to integrate companies 1 and 2, ensure that the Sage 200 Services user only has access to these two companies otherwise all companies will be synchronised when the Task Scheduler is run.

The Windows Task Scheduler service can be configured to run the synchronisation periodically. This service will use the AccountMigrationService.asp file to configure the data migration and the callservice.js file from the same location to run the action. The service can be tested by running the callservice.js file manually. This will provide a prompt to continue.

scheduler

A confirmation dialog will appear soon afterwards with details of the sync results.

results

If the test has completed successfully, the service can be set to run automatically on a scheduled basis. Before this can be done, the AccountMigrationService.asp file needs to be amended as follows:

  1. Browse to the CRM installation directory. Typically, this can be found at C:\Program Files (x86)\Sage\CRM\CRM.
  2. Select WWWRoot > CustomPages > Enbu > Framework > S200.
  3. Open the CallService.js file with a text editor such as Notepad.
  4. Change the value on line 15 from true to false as shown below...

    file settings
  5. Save the file.

Changing the value to false will prevent the scheduled task from failing due to requiring user intervention. The scheduled task can be set up using the example below.

Note: The steps below explain how to use Windows Task Scheduler to run the Callservice.js file. However, as this is a Windows-based service, you may need to check that adding this service to the scheduler will not impact on any other services that are in place and therefore the steps have been provided for guidance only.

  1. Open Control Panel > Administrative Tools > Task Scheduler.
  2. On the General tab, enter the relevant details, an example of which is below.

    general
  3. Select the Actions tab then select New...
  4. In the Program/Script field, type cscript.exe.
  5. In the Add arguments (optional) field, enter the path to the to CallService.js page in quotation marks. By default, this will be "C:\Program Files (x86)\Sage\CRM\CRM\WWWRoot\CustomPages\Enbu\Framework\S200\CallService.js".

    general
  6. Select OK.

Note: Consideration should be given as to where most updates of customer record information will be entered before deciding whether to use the AccountMigration service on a scheduled basis. For example, if a user updated the phone number on a record in Sales, Marketing and Service, then another user updated the email address in Sage 200 Extra, the synchronisation would overwrite the updated phone number during the next update.

Real Time Data sync

The Real Time Data Sync is a setting available by selecting the 'Enable Real Time Sync' box within Administration > Enbu Products Configuration.

real time sync

When enabled, the sync will write in real time, changes made to the Sales, Marketing and Service record against the Company, Person, Address, Telephone & Email straight back into Sage 200 at the point of saving the change. The below message will show on the record at the time of update:

real time sync

Note: Please remember that even if Real Time Sync is enabled, the information entered here may be affected by the Account Migration Service if it has been set to run at regular intervals via the Windows Task Scheduler (see previous section).