Validate Address and/or Generate MatchKey for Multiple Records

Table 1. Before your begin
  • To handle timeouts for batch jobs, it is recommended to set the value in PHP.ini file to 120 instead of 60 for default_socket_timeout parameter. This timeout value can further be increased if the batch has more records that can be processed in 120 seconds. The PHP.ini file is located in the PHP installation directory on the machine where SugarCRM is installed
  • To handle the fatal error (Allowed memory size exhausted), you can increase the default value (128 MB) of memory_limit to 512 MB in php.ini file.
You can validate addresses in multiple records by using the batch address validation feature. This feature is useful if you have records in your system that have never been validated. For example, if you add Spectrum Technology Platform to a SugarCRM that already has records in it, you may want to run batch address validation to validate the addresses in your system.

A match key is an identifier assigned to each record and used by the Spectrum Technology Platform deduplication process to find records that may be duplicates of each other. If you have records in your SugarCRM that were created before you began using Spectrum Technology Platform for deduplication, you must generate match keys for these existing records in order for them to be found by the deduplication process.

To create a job, follow these steps:
  1. Log in to SugarCRM as an administrator
  2. Click the arrowhead at the top right of the screen, then click on Precisely Batch Jobs
    The resulting screen lists the existing batch job
  3. Notice that the page has only one job listed
    If a job already exists, the system does not allow to create another job. At any given time, there can be only one batch job. To edit an existing batch job, select the checkbox against the particular job, then click the edit icon at the right end of the job row.
  4. To create a new job, click Create
    The resulting page allows you to configure the batch job
  5. In the Name field, enter the desired name for the batch job
  6. In the Entity field, click the type of entity for which you wish to create a bulk address validation job
    For example, if you select Contacts, the batch job includes only Contacts records
  7. In the Operation field, click the operation you wish to perform on each record in the batch. Different Operation options are:
    1. Generate MatchKey: Generated only Matchkeys for the records to enable them for deduplication
    2. Validate Address: Performs address validation only for the records
    3. Validate Address and Generate MatchKeys: Performs address validation and matchkey generation for records
  8. In the Run Batch On field, select an address validation status such that the records having this validation status are included in the batch job
    If you select the validation status New, the batch job includes those records on which address validation has never been attempted and thus they have no validation status assigned to them. Refer to the table for clearer understanding:
    Table 2. Validation Statuses
    All New Cleanased Uncleassed
    This status includes all records irrespective of corresponding validation status of the records such as Blank or Cleansed or Uncleansed. This status includes only those records for which corresponding validation status is blank. This status includes only those records for which corresponding validation status is Cleansed. This status includes only those records for which corresponding validation status is Uncleansed.
  9. In the Batch Size field, enter the number of records to be included in the batch job.
    The batch size can range from 1000 to 5000, both values inclusive. The default batch size is 1000.
  10. Click Save to save the job with desired parameters
    The batch job list page appears
    Note: Batch job is supported on:
    1. Billing address in case of Accounts object
    2. Primary address in case of Contacts and Leads objects
    is supported for and on

Run The Scheduler Job

  1. Click Admin drop down from the top-right of the screen
  2. Select Admin from the drop down list
  3. Click Scheduler from the System section
    The list of existing Scheduler jobs appears on the Schedulers page

Creating or Editing a scheduler job

  1. To create a job scheduler click Sugar Scheduler menu and then select Create Scheduler
  2. To edit an existing scheduler job, check the job from the list and click Edit.

  1. Enter or edit the Job Name.
  2. Click Precisely Bulk Job from the Job drop down
  3. Check Advance Options to view advanced scheduling options.
  4. Select Interval as per requirement.
  5. Click Save
Note:
  • In order to see the records processed in the job, user can check logs.
  • In order to run the Sugar schedulers, create a batch file to run using Windows Scheduled Tasks. The batch file should include the following commands: 
                cd C:\inetpub\wwwroot\SugarCrm
                php.exe -f cron.php