BHTK Module

The BHTK Module enables the Bullhorn Recruitment Cloud core package to integrate with the search provider Textkernel. The following functionalities are supported:

  • Textkernel Search + Match (via TKClosed An abbreviation for Textkernel Portal in Salesforce).
  • Syncing / Indexing data from Salesforce into Textkernel. Currently, only Contact and Job sync are supported.

Sync / Indexing Process

This is how the current architecture of syncing data via the BHTK Module works:

  1. A UserClosed In Salesforce terminology, this is anybody that has login access to an instance. In Bullhorn Recruitment Cloud instances, usually the staff of recruiting companies modifies a Contact record and it causes ContactTrigger to fire.
  2. ContactTrigger invokes the Salesforce queueable apex job BHTK_IndexingStarter.
  3. BHTK_IndexingStarter in turn does the following:
    • It invokes another queueable job (BHTK_IndexerRequest) and passes in N number of BHTK Status records for syncing. The number of records (N) is controlled by the groupSize parameter from Custom Metadata Types. (Setup >Custom Metadata Types > Textkernel configuration > Group Size field).
    • The BHTK_IndexerRequest self-reschedules the BHTK_IndexingStarter - so from here it goes to Step 3 again and tries to grab the next N records. This happens until Salesforce gives the error about the maximum number of queueables you can chain. Once logic hits the limit, the BHTK Module catches that and creates a BHTK_IndexingThreadStarter scheduled job to repeat the process from step 3.
    • It invokes the BHTK_IndexingThreadStarter.scheduleBenchThread method which schedules BHTK_IndexingThreadStarter (scheduled job).
  4. Scheduled job BHTK_IndexingThreadStarter tries to check the BHTK threadCount and if conditions are met it tries to increase the threadCount number and invokes another loop of the BHTK_IndexingStarter queueable job which works in parallel and repeats everything from step 3.
    • This is the multi-thread logic which should invoke multiple self-rescheduling BHTK_IndexingStarter queueable jobs and no more than Maximum_threads__c. (Setup >Custom Metadata Types > Textkernel configuration > Maximum threads field).

Visual Overview of Contact Data Sync