Job Board Integration Framework
Overview
This article covers the functions, flow, and configuration of the Job Board A website where open jobs are advertised Integration Framework feature using BH4SF core package functionalities.
The Job A job (vacancy, position, role) is an opening for which a customer's client needs a placement. Board Integration Framework allows System Administrators to create custom solutions when candidates A person looking for a job. A candidate can also be referred to as a Job Seeker, Applicant, or Provider. apply via external job boards. This allows full control of the job application process. When a Candidate A person looking for a job. A candidate can also be referred to as a Job Seeker, Applicant, or Provider. applies to a job that has also been posted externally, an email with the applicant A person looking for a job. A candidate can also be referred to as a Job Seeker, Applicant, or Provider. details, resume, and job number is sent to Bullhorn for Salesforce (BH4SF) to be validated. Once cross checked against the information there, an Application First stage of Job placement flow (Application> Submittal>Interview>Offer> Placement) record is created against the Job.
Contact
Professional Services team for the additional custom code, or custom configuration, needed for completing the integration with an external job board or website.Prerequisites
- Your must be on package version 2022.11 or higher.
- Your must use the data model.
- Your must have a resume parser tool configured with either or .
Job Board Integration Framework Functions
Job Board Integration Framework allows you to create Email Services within
and select an Email Handler. This selection will create either Application v2 records or Job Board Application records when the Job Number is included in the subject line of the email. If the email doesn’t include a valid job reference, no Application record is created. In this case, a Contact record is created, or updated, with the data provided by the Candidate.The Email Handler can also:
- Parse Used in relation to resume. It's the act of uploading a resume file into a BH4SF instance while in the background the candidate data is broken down and indexed so it becomes searchable in Search and Match tool. the Job Number from the subject line, no matter the format used.
- Capture the Source information for an application, when the Source ID is referenced in the subject line of the email.
- Monitor errors and check why an application was not created.
Job Board Integration Framework Flow
When an email is sent to the email service from an acceptable domain, the following happens:
- An inbound Email record is created.
- The Job Board Integration Framework converts the first email attachment into a content version. It will assume this is a resume. If there is no attachment, it will stop the process.
- The subject of the email is parsed using the RegExp configured in the record for the sender's domain. If a job number cannot be parsed, or the job number does not relate to any Job record in the Org, it will stop the process.
- The inbound Email record is handled in a queueable, or a batch if there are too many queueables for the Email Handler already.
- Success: A contact and application is created. The content version (email attachment) will be converted into a Contact Document.
- Failure: The record is marked for failure. The batch will try to process the record again in the next run. Exceptions to the retry are:
- The number of failures is exceeded
- The system is certain the record will never succeed. An example of this failure would be if the Email record is lacking the required data.
Only one attachment per email is supported.
Configuration
Several processes need to be completed to set up the Job Board Integration Framework. The order of these steps are as follows:
- Create the Email Service and for the Org.
- Configure the Email Service and for the Org.
- Schedule a batch job for email processing (optional).
- Schedule a batch job to remove inbound Email records and Content versions that are no longer needed (optional).
The Context User In Salesforce terminology, this is anybody that has login access to an instance. In BH4SF instances, usually the staff of recruiting companies must be a System Administrator.
Create an Email Service
- Navigate to Setup > Email Services > New Email Service.
- Fill out the following:
- Create an email address and set the domain as Accept Emails From for this Email service.
Configure Inbound Email Handler Configuration Custom Metadata Type
For this custom metadata object, a single record for the configuration is expected.
- Job Reference Field Name: The name of the field that is used to query the Job. Appears on the Job object.
- Application Object Name: Picklist with values of "Application" and "Job Board Application". Determines what type of application is created when a valid job number is parsed.
- Cancel Threshold: The limit of retries (default value is 3).
- Queueables Threshold: The number of active queueables for this class before switching to batch mode (default value is 5).
- Days Before Deleting: Number of days before an inbound Email record is eligible for deletion (default value is 14).
- Cleanup Batch Chunk size: The chunk size used by the Cleanup Batch (default value is 100).
Configure Inbound Email Sender Custom Metadata Type
For this custom metadata object, you can create one or more records, per incoming email domain.
For all records matching the email domain of the sender's email, the patterns will be applied to find the Job number and Source. The Job number and Source will be pulled from the email subject.
- Send Domain: The domain used by the sender of the domain (everything behind the @ of the email address). Set this to "Default" to use when no domain match is found.
- Job Reference Field Pattern: Text field with RegExp expression. This is used to get the Job Reference Field from the Email Subject.
- Source: Text field with a RegExp expression. Used to get the Source from the Email Subject.
Broadbean Sample Subject pattern: [AdvertType]/[JobTitle]/[JobReference]/[FeedName]/[FeedIdentifier]/[UserFullName]/[RankingColor]
- Email Subject: monsterboard/FinancialAnalyst/JN-062022-4954/mainfeed/mainfeedidentifier/recruitinguser/blue
- Job Number: JN-062022-4954
- Source(AdvertType = source?): monsterboard
- An Inbound Email Sender
- JobPattern: \/(JN -\d+-\d+)\/
- sourcePattern: ^([^\/]+)
record can be created with these two RegExpes: - Email Domain: broadbean.com
Use a site like regex101.com to create RegExp patterns. Set the flavor to Java as that is what Apex RegExp is based on.
Schedule ResumeApplicationBatch
This configuration step is optional.
When an email is received with an attachment and the required data is found in the subject, the system will try to create a Queueable Job to handle the creation of the Application. If there are more active queueables for the class ResumeApplicationQueueableHandler than configured in the Queuables_Threshold__c mdt setting, they will be marked as handled by a batch instead.
Inbound Mail records that were processed but failed can be given a chance to be retried later in the batch. The Cancel Threshold Configuration sets the number of failures allowed before aborting. These batches need to be scheduled in the Org and can be set based on your needs. This may be as little as once a day, or more often, depending on how much traffic is being sent to the Org.
System.schedule('Inbound Mail Batch 1', '0 00 * * * ?', new TR1.ResumeApplicationScheduler());
System.schedule('Inbound Mail Batch 2', '0 10 * * * ?', new TR1.ResumeApplicationScheduler());
System.schedule('Inbound Mail Batch 3', '0 20 * * * ?', new TR1.ResumeApplicationScheduler());
System.schedule('Inbound Mail Batch 4', '0 30 * * * ?', new TR1.ResumeApplicationScheduler());
System.schedule('Inbound Mail Batch 5', '0 40 * * * ?', new TR1.ResumeApplicationScheduler());
System.schedule('Inbound Mail Batch 6', '0 50 * * * ?', new TR1.ResumeApplicationScheduler());
If two of these batches are run at the same time, they may end up processing the same record. This shouldn't cause any problems, but it may cause confusion because the Inbound Mail record history will contain a success while the status will be aborted since the Application already existed for the Candidate.
Schedule ResumeApplicationCleanupBatch
This configuration step is optional.
The ResumeApplicationCleanupBatch cleans up the completed and aborted Inbound Mail records and their associated email attachments (saved on the Org as Content versions). You can configure the ResumeApplicationCleanupBatch's behavior in the Inbound Enhanced Email Handler Configuration Metadata and schedule the batch job.
The chunk size of the batch and the amount of days before deleting finished Inbound Mail records is set in the Inbound_Email_Handler_Configuration__Custom Metadata Type record. The ResumeApplicationCleanupBatch will remove records that are N days old. The associated content versions/content documents are deleted only if the inbound Mail record's contactId field is empty. If the contactId field has a value, it means a contact Document containing a resume associated with the contact was created. The Content version would then be deleted once the AWS conversion is done, by opening the CV in the ResumeManager5.
Example of batches set every 10 minutes from the dev console:
System.schedule('Inbound Mail Cleanup Batch 1', '0 05 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
System.schedule('Inbound Mail Cleanup Batch 2', '0 15 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
System.schedule('Inbound Mail Cleanup Batch 3', '0 25 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
System.schedule('Inbound Mail Cleanup Batch 4', '0 35 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
System.schedule('Inbound Mail Cleanup Batch 5', '0 45 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
System.schedule('Inbound Mail Cleanup Batch 6', '0 55 * * * ?', new TR1.ResumeApplicationCleanupScheduler());
Custom Labels
Associated Custom labels used as part of the history texts:
- ErrorNoJobNumber
- ErrorCVtoContentVersion
- ErrorEmailNoCV
- EmailHandlerAborted
- EmailHandlerReceived
- EmailHandlerApplication
- EmailHandlerJBA
- EmailHandlerContact
- EmailHandlerParseFail
Error Monitoring
Use the list view on the InboundEmails tab to monitor for errors.