Scheduled jobs should only be run by advanced DemandTools users, and only once the job has been thoroughly tested manually. Auto Login and Save Password must be checked on the DemandTools login page for a scheduled process to launch. The Windows user MUST be a System Administrator on the designated PC to run the task scheduler.
Check out DemandTools JobBuilder designed specifically to make batching DemandTools scenarios a breeze! With JobBuilder you can easily drag and drop DemandTools Scenarios to the batch interface. Job files can then be run manually or optionally create a Windows Scheduled Task to automate the jobs with a simple flip of a switch, all within the JobBuilder User Interface.
Utilization of the Windows Task Scheduler allows saved scenarios from DemandTools to run on a scheduled basis. Scheduled jobs execute the changes to all records found, no manual/user interaction will take place. When scheduling deduplication scenarios, all groups where a master record can be determined by applying a Master Rule will be merged, so only rigid scenarios should be scheduled.
Open Tasks will be created for all batch jobs assigned to the user id of the person who ran the scheduled job. When the user logs into Salesforce after the completion of a scheduled job, an open task with completion information will be shown in their list of open Tasks. There is an option in The DemandTools Options menu to turn off the creation of these tasks if desired.
MULTIPLE DemandTools Scenarios can be scheduled in one job. The scenarios will be run sequentially.
DemandTools can also be run from a .bat file. The .bat file will contain the DemandTools.exe and arguments enclosed in double quotes (as per the detailed examples below). Then in the Windows Scheduled job, specify the .bat file fullpathname in the "Start a Program" parameter, or equivalent if using a third party scheduler. MULTIPLE scenarios can be run in one .bat file simply by adding multiple line items, for example:
"C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\DTJobs\Account_State_ShortName.MIxml"
"C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\DTJobs\Account_Name_ProperCase.MIxml"
"C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\DTJobs\Contact_Name_ProperCase.MIxml"
"C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\DTJobs\Contact_State_ShortName.MIxml"
NOTE: The following instructions/screenshots are based on the Windows Scheduler provided in Windows 7 and above. Other third party Windows scheduling tools can also be used. The key is to run the DemandTools.exe and then pass the appropriate parameters/arguments.
Schedulable Modules
- MassEffect: Insert, Update, Upsert, Delete, UnDelete and Export
- MassImpact
- Reassign Ownership
- MassBackup
- A scheduled backup will always perform a full export of all tables
- BulkBackup
- Single Table Dedupe
- A master rule must be set-up to determine which record will be the master record. All groups will be merged where a master can be determined based on the rule.
- Ability to JUST export the found duplicates from the results grid vs. proceeding with the actual merge
- Lead Conversion
- Ability to JUST export the found matches from the results grid vs. proceeding with the actual conversion
- Ability to JUST populate AccountId's on the Lead record vs. proceeding with the actual conversion
- Find/Report ID's
Note: The PowerGrid module CANNOT be scheduled as all proposed changes are made manually in the results grid.
Scheduling Scenarios Using Windows 7 or above
Step 1. Access the Windows Scheduled Task Option
To access the scheduler pick "Administrative Tools" from the Control Panel and then "Task Scheduler"
Step 2. Scheduled Task Wizard
Pick "Create Basic Task" on the right to access the Wizard
1. Create a Basic Task: Enter a name and description
2. Task Trigger: Pick the task trigger (schedule)
3. Specify schedule details
4. Action: Select Start a program
5. Start a Program:
Program/Script: browse for the DemandTools.exe, should look like this when selected: "C:\Program Files (x86)\DemandTools\DemandTools.exe".
Add Arguments (optional): Specify the FULL pathname for the desired
scenario followed by any additional parameters based on the type of scenario
being scheduled (i.e. File/worksheet name for ME etc.). Each arguments needs
to be enclosed in double quotes.
Start in: Leave this blank
6. Summary: Click "finish". Can optionally check the "Open the Properties dialog...." and make changes to other settings as needed (e.g. the windows user running the task etc.).
Step 3. Modifying the Task, Schedule and Settings
To schedule multiple scenarios add multiple line items using the "New" button (lower left)
When done the job will look something like this:
Other settings can be reviewed/updated as desired.
Note: All DemandTools jobs need to use the security option "Run only when user is logged on" in order to execute. DemandTools is an interactive application and as such can only be run when the user is logged on. Users can "lock" their account vs. signing out and the jobs will run in that case.
Parameter Syntax for the Type of Job Being Scheduled
The commands must always be listed one a time, and start and end with a double quote. The first set of commands in the "Run" statement for all scheduled jobs will start DemandTools: "C:\Program Files\DemandTools\DemandTools.exe". Next provide the fullpathname of the scenario to be run (except for MassBackup) followed by additional parameters based on what operation is being scheduled (e.g. input or output filename, if applicable).
MassEffect - Export:
- Additional Parameters/Arguments:
- The full path name of the output file in double quotes
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\ME_Scheduled_jobs\ME_sched_export.DExml" "C:\ME_scheduled_jobs\ME_export.xls"
MassEffect - Insert, Update, Upsert, Delete or UnDelete:
- Additional Parameters/Arguments:
- The full path name of the input file in double quotes
- The worksheet or table name for excel or access input files.
- Note: The worksheet/table name is not needed for csv files, and only needs to be enclosed with double quotes if there is a space in the full filepath name
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\ME_Scheduled_jobs\ME_sched_insert.MExml" "C:\ME_scheduled_jobs\ME_insert.xls" NY_Account_Data
MassImpact:
- Additional Parameters/Arguments:
- None
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Documents and Settings\Administrator\My Documents\DemandToolsData\MassImpact Scenarios\ContactMailing(blank)_eq_AccountBilling.MIxml"
Reassign Ownership:
- Additional Parameters/Arguments:
- None
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Documents and Settings\Administrator\My Documents\DemandToolsData\Reassign Ownership Scenarios\NorthEast_Territory.ROxml"
NOTE: If a Reassign Ownership scenario uses an input file instead of where conditions, the input file and worksheet are saved as part of the scenario. If the scheduled job runs and the input file cannot be found (e.g. it was deleted or moved) the scheduled job will fail.
MassBackup:
MassBackup is ONLY available when running the 32bit version of DemandTools (64bit version does not support .mdb files). Users running the 64bit version of DemandTools should use the BulkBackup module instead.
No scenario name specified. When scheduling MassBackup all tables will be included on the backup file.
- Additional Parameters/Arguments:
- The full path name of the output file in double quotes
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\backupdir\backup.mdb"
BulkBackup:
- Additional Parameters/Arguments:
- The full path name of the output file (.mdb or .accdb file) or directory (.csv files) in double quotes
- CSV Files ONLY
- OPTIONAL: default encoding can be added AFTER the directory name, e.g. utf8
- Note: encoding is optional, as it will default to using the encoding saved in the scenario but can be overridden if this parameter is provided
- Example .mdb or .accdb: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Users\Administrator\Documents\Backups\Schedule Access Export.BBxml" "C:\backupdir\BulkBackup.accdb"
- Example .csv file: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Users\Administrator\Documents\Backups\Schedule CSV Export.BBxml" "C:\backupdir" utf8
Single Table Deduplication: Complete the Merge
- Additional Parameters/Arguments:
- None
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Documents and Settings\Administrator\MyDocuments\DemandToolsData\Scenarios\Account\Friday_Night_Dedupe.STDxml"
Single Table Dedupe: Export the Found Duplicates (do not merge)
Single Table Dedupe allows JUST exporting the found duplicates from the results grid vs. proceeding with the actual merge. A Master Rule will be applied to the dupe sets, then the export will occur.
To invoke the export vs. merging, simply add the fullpathname of the output file to be created after the scenario name. An additional “formatted” parameter can be added to export a formatted xls file (will only work if the output file type is xls). The output file will use the output name specified with _YYYYMMDD_X appended. Supported file types: xls (formatted or raw data file), xlsx, csv, tab, accdb, mdb (32bit version only), dbf, xml, sql.
- Additional Parameters/Arguments:
- The full path name of the output file in double quotes
- Optional "formatted" parameter
- Example: Do not process the merge, just export found duplicate sets to a formatted xls file
- "C:\Program Files\DemandTools64Bit\DemandTools.exe" "C:\Users\JDoe\Documents\DemandToolsData\Scenarios\Account\RigidPass.STDxml" "C:\Users\JDoe\Desktop\AccountDupes.xls" formatted
- Output File Name would be: AccountDupes_20150716_1.xls, and it will be the formatted xls version
- Example: Do not process the merge, just export found duplicate sets to a raw csv file
- "C:\Program Files\DemandTools64Bit\DemandTools.exe" "C:\Users\JDoe\Documents\DemandToolsData\Scenarios\Account\RigidPass.STDxml" "C:\Users\JDoe\Desktop\RigidDupes.csv”
- Output File Name would be: RigidDupes_20150716_1.csv
Lead Conversion: Complete the Conversion
- Additional Parameters/Arguments:
- None
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" C:\Users\JDoe\Documents\DemandToolsData\Lead Conversion Scenarios\Lead Conversion Rigid.LCxml"
Lead Conversion: Export the Found Matches (do not convert)
Lead Conversion allows JUST exporting the found matches from the results grid vs. proceeding with the actual conversion.
To invoke the export vs. converting, simply add the fullpathname of the output file to be created after the scenario name. An additional “formatted” parameter can be added to export a formatted xls file (will only work if the output file type is xls). The output files (up to 3) will use the output name specified with _{Contact/Account/FinalMatch}_YYYYMMDD_X appended. Supported file types: xls (formatted or raw data file), xlsx, csv, tab, accdb, mdb (32bit version only), dbf, xml, sql.
- Additional Parameters/Arguments:
- The full path name of the output file in double quotes
- Optional "formatted" parameter
- Example: Do not process the conversion, just export found matches to a formatted xls file
- "C:\Program Files\DemandTools64Bit\DemandTools.exe" "C:\Users\JDoe\Documents\DemandToolsData\Lead Conversion Scenarios\Lead Conversion Rigid.LCxml" "C:\Users\JDoe\Desktop\LCMatches.xls" formatted
- Output File Name would be: LCMatches_20170815_1.xls, and it will be the formatted xls version
- Example: Do not process the conversion, just export found matches to a raw csv files
- "C:\Program Files\DemandTools64Bit\DemandTools.exe" "C:\Users\JDoe\Documents\DemandToolsData\Lead Conversion Scenarios\Lead Conversion Rigid.LCxml" "C:\Users\JDoe\Desktop\LCMatches.csv"
- Output File Name(s) would be: LCMatches_Contact_20170815_1.csv, LCMatches_Account_20170815_1.csv, LCMatches_FinalMatch_20170815_1.csv
Lead Conversion: Populate AccountId's (do not convert)
Lead Conversion allows JUST populating AccountId's on the Lead record vs. proceeding with the actual conversion.
- Additional Parameters/Arguments:
- Keyword: populateaccountids:
- Lead field to be updated
- Example: "C:\Users\JDoe\Documents\DemandToolsData\Lead Conversion Scenarios\Lead Conversion Rigid.LCxml" populateaccountids:Matching_Account__c
Find/Report ID's
- Additional Parameters/Arguments:
- The full path name of the input file in double quotes
- The worksheet or table name for excel or access input files
- Note: The worksheet/table name is not needed for csv files, and only needs to be enclosed with double quotes if there is a space in the full filepath name.
- The full path name of the output file in double quotes
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Documents and Settings\Administrator\My Documents\DemandToolsData\FindIDs\TradeShow.FIDsxml" "C:\Users\Owner\Documents\Trade Show - April.xlsx" "Trade Show" "C:\Documents and Settings\Administrator\My Documents\DemandToolsData\FindIDs\SchedMatch.xlsx"
EmailConnect:
- Additional Parameters/Arguments:
- None
- Example: "C:\Program Files (x86)\DemandTools\DemandTools.exe" "C:\Documents and Settings\Administrator\My Documents\DemandToolsData\EmailConnect Scenarios\MonthlyEmailConnect.ECxml"