> ## Documentation Index
> Fetch the complete documentation index at: https://f4c7a9e2d8b1-docs.tenzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ERecruit ATS

> Feature coverage and implementation details for ERecruit integration

## Implementation Overview

**Implementation Type:** Direct API Integration\
**Note Format:** HTML\
**Status:** Production Ready

ERecruit is a direct API integration with full custom implementation of all required methods. This is one of our most mature and feature-complete integrations.

## Configuration

| Property               | Value             | Description                            |
| ---------------------- | ----------------- | -------------------------------------- |
| Provider Enum          | `erecruit`        | Identifier in ProviderEnum             |
| Note Format            | `HTML`            | HTML-formatted notes                   |
| Disposition Reasons    | Supported         | Custom rejection reason implementation |
| All Application Stages | Supported         | Fetches stages from ERecruit API       |
| Base URL               | Customer-specific | Each org has unique API endpoint       |

## Feature Coverage

<AccordionGroup>
  <Accordion title="Streaming Operations" defaultOpen>
    ### Stream Jobs

    **Status:** Supported (Custom Implementation)\
    **Method:** `_stream_jobs(updated_after, statuses)`

    Direct implementation streaming jobs from ERecruit's Position API with pagination support.

    ### Stream Applications

    **Status:** Supported (Custom Implementation)\
    **Method:** `_stream_applications(updated_after, for_job_ids)`

    Streams applications using ERecruit's Submission API with full filtering capabilities.

    ### Stream Candidates

    **Status:** Supported (Custom Implementation)\
    **Method:** `_stream_candidates(updated_after)`

    Streams candidate data from ERecruit's Contact API with incremental updates.
  </Accordion>

  <Accordion title="Application Management">
    ### Move Application to Stage

    **Status:** Supported (Custom Implementation)\
    **Method:** `_move_application_to_stage(application, stage)`

    Moves submissions between workflow stages using ERecruit's stage management API.

    ### Get Disposition Reasons

    **Status:** Supported (Custom Implementation)\
    **Method:** `get_disposition_reasons()`

    Retrieves rejection reasons from ERecruit's workflow configuration.

    ### Reject Application

    **Status:** Supported (Custom Implementation)\
    **Method:** `reject_application(application_id, reason_id)`

    Rejects submissions with proper status updates in ERecruit.

    ### Bulk Reject Applications

    **Status:** Supported (Custom Implementation)\
    **Method:** `bulk_reject_applications(application_ids, reason_id)`

    Implements bulk rejection with proper error handling.

    ### Create Application

    **Status:** Supported (Custom Implementation)\
    **Method:** `_create_application_for_candidate(candidate, job)`

    Creates new submission records in ERecruit.

    ### Get All Application Stages

    **Status:** Supported (Custom Implementation)\
    **Method:** `_get_all_application_stages()`

    Fetches all available workflow stages from ERecruit.
  </Accordion>

  <Accordion title="Job Management">
    ### Get Job by ID

    **Status:** Supported (Custom Implementation)\
    **Method:** `get_job_by_job_id(job_id)`

    Direct lookup of positions in ERecruit.

    ### Get Enhanced Job

    **Status:** Supported (Custom Implementation)\
    **Method:** `get_enhanced_job(kombo_id, remote_job_id)`

    Fetches full position details including custom fields and metadata.

    ### Fetch Enhanced Jobs Batch

    **Status:** Supported (Custom Implementation)\
    **Method:** `_fetch_enhanced_jobs_batch_from_ats(limit, cursor)`

    Batch processing of position data with pagination.
  </Accordion>

  <Accordion title="Candidate Management">
    ### Get Candidate by ID

    **Status:** Supported (Custom Implementation)\
    **Method:** `_get_candidate_by_id(candidate_id)`

    Retrieves contact records from ERecruit API.

    ### Find Candidates by Details

    **Status:** Supported (Custom Implementation)\
    **Method:** `_find_candidates_by_details(first_name, last_name, email, phone)`

    Comprehensive candidate search with multiple criteria.

    ### Get Resume

    **Status:** Supported (Custom Implementation)\
    **Method:** `_get_resume_for_candidate_id(candidate_id)`

    Downloads resume documents from ERecruit's document storage.
  </Accordion>

  <Accordion title="Notes & Attachments">
    ### Add Note to Application

    **Status:** Supported (Custom Implementation)\
    **Method:** `_add_note_to_application(application, note, note_action_type)`

    Adds notes to submission records with custom note action types.

    **Implementation Notes:**\
    Uses ERecruit's `TENZO_PRESCREEN_NOTE_ACTION_ID` (496) for Tenzo-generated notes.

    ### Add Note to Candidate

    **Status:** Supported (Custom Implementation)\
    **Method:** `_add_note_to_candidate(candidate, note, note_action_type)`

    Adds notes directly to contact records.

    ### Add Attachment to Application

    **Status:** Supported (Custom Implementation)\
    **Method:** `_add_attachment_to_application(filename, application_id, pdf_b64)`

    Uploads documents to submission records.

    ### Add Attachment to Candidate

    **Status:** Supported (Custom Implementation)\
    **Method:** `_add_attachment_to_candidate(filename, candidate_id, pdf_b64)`

    Uploads documents to contact records.
  </Accordion>

  <Accordion title="Custom Fields">
    ### Application Custom Fields

    **Status:** Supported (Custom Implementation)\
    **Methods:**

    * `_get_application_custom_fields()` - Retrieves submission custom field definitions
    * `_update_application_custom_fields(application, updates)` - Updates submission custom fields

    Full support for ERecruit's custom detail fields on submissions.

    ### Candidate Custom Fields

    **Status:** Supported (Custom Implementation)\
    **Methods:**

    * `_get_candidate_custom_fields()` - Retrieves contact custom field definitions
    * `_update_candidate_custom_fields(candidate, updates)` - Updates contact custom fields

    Full support for ERecruit's custom detail fields on contacts.

    ### Job Custom Fields

    **Status:** Supported (Custom Implementation)\
    **Methods:**

    * `_get_job_custom_fields()` - Retrieves position custom field definitions
    * `_get_job_custom_field_values(job_id)` - Gets custom field values for positions
    * `_update_job_custom_fields(job, updates)` - Updates position custom fields

    Comprehensive custom field support for positions.
  </Accordion>
</AccordionGroup>

## Implementation Notes

### Authentication

ERecruit uses OAuth2-based authentication with customer-specific API endpoints. Tokens are managed with automatic refresh 5 minutes before expiry.

### Tagging System

The integration uses ERecruit's tagging system:

* `TENZO_SCREENED_TAG_ID` (65880): Applied to screened candidates
* `TENZO_SCREENED_STATUS_ID` (101): Status for processed applications

### Timezone Handling

ERecruit API returns times in local timezone. The integration handles this with a precautionary backfill window of 2 hours to prevent data loss.

## Known Limitations

<Warning>
  **API Rate Limits**\
  ERecruit APIs have rate limits. The integration includes throttling and retry logic to handle this gracefully.
</Warning>

<Note>
  **Customer-Specific Configuration**\
  Each ERecruit customer has unique API endpoints and custom field configurations. Setup requires customer-specific credential configuration.
</Note>

<Warning>
  **Custom API TLS Verification Disabled**\
  Requests to eRecruit's legacy custom API host (`webapi.myagilus.ca`) run with TLS certificate verification disabled (`verify=False`/`verify_ssl=False` in `_fetch_custom_auth_response` and the custom API GET/POST/PUT calls). This host serves a broken/unreliable certificate chain on eRecruit's side — it is not something fixable from our end. The standard OAuth token flow against `login.myagilus.ca` does not have this issue and verifies certificates normally.
</Warning>

## Related Files

* Implementation: `server/ats/erecruit_ats_client.py` (\~3,000 lines)
* Field Mappings: `server/ats/field_type_mapper.py` (ERECRUIT\_FIELD\_MAPPINGS)
* Base Class: `server/ats/base_ats_client.py`
* Registration: `server/ats/ats_factory.py`

## See Also

* [ATS Coverage Matrix](/internal/ats-coverage)
* [ERecruit API Documentation](https://www.erecruit.com/)
