Phase 3.2 — Overview
Phase 3.2 makes a company pay placement credits to list a Careers job for a period.
- A post buys a
Careers::JobPosting, for example 1 month for 50 credits. - When the period ends, the system closes the
Careers::Job, and the employer can renew it. - An existing
Careers::Job, created before Billing Phase 3.2 ships, has noCareers::JobPosting, so it stays open with no end date.- Its HQ manager can hide it and open it again for free.
- It never gets a renew, and
closedis its end state.
- The price and the
Careers::JobPostinglive in the Careers domain, next toCareers::Job. - Careers pays through the Billing interface, with
Billing::SpendService.consume_now.
The decision is Billing D17 — A Careers job post buys a job posting, paid by a direct consume.
- This folder is the work record for building it.
- Careers spends credits as Billing D18 — Product domains spend credits only through SpendService states.
Words this phase uses
| Word | Meaning |
|---|---|
The model Careers::Job | One job that an Org::Company posts on Careers |
| Placement credits | The credits a company spends on Ads placements, and now on Careers jobs |
The model Careers::JobPostingPrice | One price for a Careers::JobPosting, with its number of days and its credit cost |
The model Careers::JobPosting | One paid period of one Careers::Job, from starts_at to ends_at |
Existing Careers::Job | A Careers::Job created before Billing Phase 3.2 ships, which has no Careers::JobPosting |
| Renew | A new Careers::JobPosting that a Careers::Job buys after it is posted |
| Own account | The Billing::Account whose billing_accounts.org_company_id is the company |
Why we're building this
Today a company posts Careers jobs for free during its trial, and Sales invoices paying companies by hand.
- Phase 3 gives each company placement credits it can spend on Ads placements.
- Careers jobs do not use those credits yet.
- So Finance cannot see Careers revenue in billing, and Sales tracks paid Careers jobs outside the system.
- A
Careers::Jobstays open for as long as the employer wants, so one payment covers it for years.
User stories
- US-1: As an HQ manager, I want to see when my
Careers::JobPostingstarts and ends, and its cost, before I post. - US-2: As an HQ manager, I want to close, hide and open my job again for free during its period.
- US-3: As Sales, I want to change the
Careers::JobPostingPricerows without a deploy, so we can apply new prices. - US-4: As Finance, I want each
Careers::JobPostingon the company's ledger, so revenue for Careers is exact. - US-5: As Sales, I want a WhatsApp button when credits are too low, so companies ask us to top up.
- US-6: As an HQ manager, I want to be able to renew my job, so it stays posted.
Scope
| In this phase | Not in this phase |
|---|---|
Posting a Careers job buys a Careers::JobPosting with placement credits | Replacing the careers trial period with trial credits |
The table careers_job_posting_prices, managed in the Team Portal, with a seed file for the first two prices | Removing the careers trial gate (org_companies.careers_access_status) |
The table careers_job_postings, one row per paid period | An end date for each existing Careers::Job |
The hourly Sidekiq job Careers::Jobs::CloseJob, which closes each Careers::Job whose period has ended | A reminder before the period ends |
A renew, before or after Careers::JobPosting.ends_at | A refund when a Careers::Job closes |
One Careers::Job at most per submit of the job form, by an idempotency key | A blurred job page with a pop-up of the credit packages |
One Careers::JobPosting at most per renew dialog, by the count of Careers::JobPosting rows | A price per company through a Billing::AgreementTerm |
| The job form and the renew dialog show the periods, the cost and the balance | Featured or boosted Careers jobs |
| A read-only Team Portal page for one Careers job, which the ledger text links to | Team Portal tools to post, renew or close a job for a company |
Free placement credits for one Careers::JobPosting, for each company with careers_access_status: :trial or :allowed | The Xero mapping for Careers revenue |
| A second product that sells a job post, such as Gig |
What does not change
- Close, hide and open again stay free during the period.
- Shipping Billing Phase 3.2 creates nothing for an existing
Careers::Job, and the existingCareers::Jobkeeps itsstatus. - The trial gate stays.
- A company with
careers_access_status: :blockedstill cannot post or renew. - The trial gate still decides whether a company can see applicant details.
- A company with
- A company with
careers_access_status: :trialpays credits like every other company.- The next phase gives it trial credits, and it replaces the trial period.
- When Billing Phase 3.2 ships, every company with
careers_access_status: :trialor:allowedgets free credits for oneCareers::JobPosting. - Both phases ship to production together with Billing Phase 3.
- Ads placements do not change.
- Each company spends its own account, as Billing D16 — A company spends only its own billing account, never its parent's states.
Pages in this folder
- Design Plan: the rules, the design, the code that changes and the rollout.
- Use Cases: every flow step by step, with a worked example.
- Implementation Plan: the issues for
jodapp-apiandjodapp-web, in build order, and a manual test plan.