Skip to content

Implementation Notes

Jonathan Lyles edited this page Oct 7, 2025 · 1 revision

This page provides a high-level overview of the technical implementation details for the Ambitious Zombies built on the Salesforce Platform. It is intended for developers and technical contributors working on this project.


Overview

The application leverages Salesforce core features, Apex, Lightning Web Components (LWC), and Flows to provide a seamless job application management experience.

Layer Description
Apex Used for server-side logic, automations, integrations, and scheduled processes.
Flows Used for point-and-click automations (status-based tasks, field updates, reminders).
LWC Used for interactive UI components such as calculators and dynamic job listings.

Object Model

Job Application (Custom Object)

  • Central object for tracking job applications.
  • Related to Contact, Account, Event, and Task standard objects.
  • Supports automation through Flows and Apex Triggers.

Implementation Breakdown

1. Application Status Automation

Type: Flow (Record-Triggered)
Purpose: Automatically create Tasks when the Status field changes.
Logic:

  • One Flow handles status changes and creates a set of predefined Tasks for each status.
  • Example: When status = Applied, create “Follow Up” and “Networking Call” tasks.

📘 See also: Flow: Job_Application_Status_Automation


2. Primary Contact Automation

Type: Apex Trigger
Purpose: Auto-assign the Primary Contact if blank.
Logic:

  • Trigger runs before insert and before update.
  • Sets the first related Contact or Contact from the related Company.

📘 Class: JobApplicationTriggerHandler.cls
📘 Test Class: JobApplicationTriggerHandler_Test.cls


3. Take-Home Pay Estimation

Type: Apex + LWC
Purpose: Calculate taxes and estimate take-home pay.
Logic:

  • Apex class performs tax calculations (federal, social security, medicare).
  • LWC displays the results interactively.

📘 Apex Class: TakeHomePayCalculator.cls
📘 LWC Component: takeHomeCalculator
📘 API Reference: SmartAsset Calculator


4. Calendar Validation

Type: Apex Trigger / Validation
Purpose: Prevent double-booking interviews or scheduling on weekends.
Logic:

  • Trigger on Event checks overlapping StartDateTime and EndDateTime.
  • Throws validation error if a conflict exists.

📘 Class: EventConflictValidator.cls


5. Email Reminders

Type: Apex Scheduled Job
Purpose: Send reminder emails a day before interviews.
Logic:

  • Scheduled class queries upcoming interviews.
  • Sends templated email reminders to the user.

📘 Class: InterviewReminderScheduler.cls
📘 Related Flow: Email_Template_Reminder


6. Clean Up Stale Job Applications

Type: Apex Batch or Queueable
Purpose: Automatically close stale applications.
Logic:

  • Checks for records with Status != Closed/Accepted and Follow-up Date > 30 days.
  • Updates the record and logs note.

📘 Class: StaleJobCleaner.cls


7. Find New Jobs (Jooble API)

Type: Apex + LWC + Scheduled Job
Purpose: Retrieve Salesforce-related job listings via Jooble API.
Levels:

  • Easy: Run manually via Anonymous Apex
  • Medium: Automate with a scheduled Apex job
  • Hard: LWC interface for job browsing and selection

📘 Apex Class: JoobleJobFetcher.cls
📘 LWC Component: jobFinder
📘 API Reference: Jooble API Docs


8. Testing

Type: Apex Unit Tests
Purpose: Ensure 85%+ coverage for deployment.
Logic:

  • Positive and negative tests for all classes and triggers.
  • DataFactory pattern for test data creation.

📘 Namespace: tests/
📘 Sample Test Class: TakeHomePayCalculator_Test.cls


Recommended Folder Structure

force-app/
├── main/
│   ├── default/
│   │   ├── lwc/
│   │   │   ├── takeHomeCalculator/
│   │   │   └── jobFinder/
│   │   ├── classes/
│   │   │   ├── JoobleJobFetcher.cls
│   │   │   ├── TakeHomePayCalculator.cls
│   │   │   ├── StaleJobCleaner.cls
│   │   │   └── EventConflictValidator.cls
│   │   ├── flows/
│   │   │   └── Job_Application_Status_Automation.flow
│   │   └── triggers/
│   │       └── JobApplicationTrigger.trigger
└── tests/
    ├── TakeHomePayCalculator_Test.cls
    ├── JobApplicationTriggerHandler_Test.cls
    └── StaleJobCleaner_Test.cls

Notes for Developers

  • Maintain consistent naming conventions (PascalCase for Apex, kebab-case for LWC).
  • Always include test classes for new Apex code.
  • Follow Salesforce best practices for bulkification and governor limits.
  • Document new automations in this wiki page.