Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

Workable BI Data Link

Database structure

Release v1.6
Mar 13rd, 2023
Contents
Contents 2
About This Document 2
Audience 2
Revision History 2
DB structure 4
activities 4
answers 18
attendances 19
candidates 19
candidate_evaluations 23
candidate_referrals 23
custom_attributes 24
custom_attributes_settings 25
departments 25
education_records 25
eeoc_profiles 26
events 27
experience_records 28
fields 28
field_choices 29
field_choice_translations 30
field_translations 30
field_values 30
field_value_choices 31
hiring_team 32
invoices 32
job_views 33
jobs 34
job_boards 37
members 37
offers 38
offer_variables 39
offer_templates 40
postings 40
pipelines 41
pseudo_boards 41
questions 42

BI Data Link- Database Structure 2


ratings 42
redsync_metro_source 43
requisitions 44
requisition_attributes 46
requisition_templates 47
stages 47
Appendix A - ER diagrams 48
Offers 48
Custom Attributes 48
Custom Requisition Attributes 48
Appendix B - Examples 48
Fields 48
Example 1 - ShortText Custom Attributes 48
Example 2 - Custom Requisitions 53
Example 3 - Document Variables (Offer Variables) 55

BI Data Link- Database Structure 3


About This Document
This document describes the Redshift Database Schema that is supported by BI Data Link.

Audience
This document is intended for Redshift administrators and software or data engineers that will
produce the reports on the customer's side, and Workable Professional Services engineers.
This document assumes a certain level of familiarity with databases.

Revision History

Version Date Changes Author

1.0 11th Dec, 2019 Initial Release G. Zikos

1.1 5th Apr, 2021 Update tables A. Sideri

1.2 30th Jul, 2021 Addition of new tables related to A. Sideri


Job Boards and Departments.
Addition of new columns on the
jobs, candidates and members
tables.

1.3 3rd Feb, 2022 Updating hiring_managers table A. Sideri


definitions.

1.4 31st Mar, 2022 Update requisitions table A. Sideri

1.5 1st Aug, 2022 Remove redundant department A. Sideri


field from jobs, candidates,
activities tables.
Adding new field in jobs.
Added Obsolete Fields section

1.6 3rd Mar, 2023 Updated activities,answers, A. Sideri


candidates,events,fields,
field_choices,
job_views,members, offers,
postings, questions tables
(changes marked in red font).
Added examples.
Added ER diagrams.

BI Data Link- Database Structure 4


BI Data Link- Database Structure 5
DB structure
In the following sections, the tables included in the schema are described. For those, the
following apply:

● All datetimes (timestamps) are in the UTC timezone


● The tables do not contain data related to jobs that were deleted

activities
The activities table contains all the important actions that took place in Workable and tended to
result in a change of status for the job (e.g. when the job is published) or
a candidate (e.g. when the candidate is moved to another stage). The table also logs information
about email exchanges (both incoming and outgoing), event scheduling and feedback.

The two columns that help us understand what the record is about are action and action_type.
The following table explains how to interpret each record according to the values given for
action and action_type.

action action_type How to interpret


Candidate {candidate_name}
submitted an application for the
job { job_title} with id { job_id}.
Candidate was assigned an id
Candidate applied New Candidate {candidate_id}.
Member {member_name} with
id {member_id} uploaded
candidate {candidate_name} to
job { job_title} with id { job_id}.
Candidate was assigned id
Candidate uploaded New Candidate {candidate_id}.
Member {member_name} with
id {member_id} copied
candidate {candidate_ name} to
job { job_title} with id { job_id}.
The new candidate was
assigned a new id
Candidate copied New Candidate {candidate_id}.
Member {member_name} with
id {member_id} referred
Candidate referred New Candidate candidate {candidate_name} for

BI Data Link- Database Structure 6


job { job_title} with id { job_id}.
The new candidate was
assigned a new id
{candidate_id}.
Member {member_name} with
id {member_id} moved
candidate {candidate_name}
with id {candidate_id} to stage
named {X}.

The stage is of type Shortlisted,


Phone Screen, Assessment,
Candidate moved to stage “X” Candidate Screening Interview.
Member {member_name} with
id {member_id} moved
candidate {candidate_name}
with id {candidate_id} to stage
named {X}.

Candidate moved to stage “X” Candidate Hired The stage is of type Hired.

Member {member_name} with


id {member_id} moved
candidate {candidate_name}
with id {candidate_id} to stage
named {X}.

Candidate moved to stage “X” Candidate Offer The stage is of type Offer.
Member {member_name} with
id {member_id} moved
candidate {candidate_name}
with id {candidate_id} to stage
named {X}.

Stage X is either Applied or


Candidate moved to stage “X” Candidate Activity Sourced.
Member {member_name} with
id {member_id} disqualified
candidate {candidate_name}
Candidate disqualified Candidate Activity with id {candidate_id}.
Candidate {candidate_name}
Candidate auto-disqualified Candidate Activity with id {candidate_id} was

BI Data Link- Database Structure 7


automatically disqualified
(based on questions upon
application).
Previous disqualification of
candidate {candidate_name}
with id {candidate_id} was
reverted by member
Disqualification reverted Candidate Activity {member_id}.
Member {member_name} with
id {member_id} moved
candidate {candidate_name}
Candidate moved to another with id {candidate_id} to job
job Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} added a
comment for candidate
{candidate_name} with id
{candidate_id} from job
Candidate was commented on Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} added an
evaluation
(‘yes’, ‘no’ or ‘definitely’) for
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}.

Details about evaluations can


be found on table
Candidate evaluated Candidate Activity candidate_evaluations.
Feedback for candidate
{candidate_name} with id
{candidate_id} from job
{ job_title} with id { job_id} was
Feedback provided Candidate Activity provided.
The 3rd party background
check for candidate
{candidate_name} with id
{candidate_id} from job
{ job_title} with id { job_id} was
assessment-check-completed Candidate Activity completed.

BI Data Link- Database Structure 8


The 3rd party background
check for candidate
{candidate_name} with id
{candidate_id} from job
{ job_title} with id { job_id} was
assessment-check-consented Candidate Activity consented.
Member {member_name} with
id {member_id} requested a 3rd
party background check
provider for candidate
{candidate_name} with id
{candidate_id} from job
assessment-check-requested Candidate Activity { job_title} with id { job_id}.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
completed the requested
assessment or missed the
assessment-completed Candidate Activity deadline.
Member {member_name} with
id {member_id} sent an
assessment invitation to
candidate {candidate_name}
with id {candidate_id} from job
assessment-requested Candidate Activity { job_title} with id { job_id}.
An automation was scheduled
for candidate {candidate_name}
with id {candidate_id} from job
automation-scheduled Candidata Activity { job_title} with id { job_id}.
The snooze period for the
snoozed candidate
{candidate_name} with id
{candidate_id} from job
{ job_title} with id { job_id}
elapsed, the candidate was
awakened Candidate Activity awakened.
Checkr background check for
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} was
background-check-completed Candidate Activity completed.

BI Data Link- Database Structure 9


The Checkr background check
for candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} was
background-check-consented Candidate Activity consented.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
disputed the results from the
background-check-disputed Candidate Activity Checkr background check.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} has
background-check-post-advers not disputed the results from
e Candidate Activity the Checkr background check.
Member {member_name} with
id {member_id} initiated adverse
action on the Checkr
background check assessment
for candidate {candidate_name}
with id {candidate_id} from job
background-check-pre-adverse Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} requested a
Checkr background check for
candidate {candidate_name}
with id {candidate_id} from job
background-check-requested Candidate Activity { job_title} with id { job_id}.
A GDPR policy notification was
sent to candidate
{candidate_name} with id
{candidate_id} from job
gdpr-policy-notification Candidate Activity { job_title} with id { job_id}
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
accepted and signed the
e-signature-request-accepted Candidate Activity requested document.
Candidate {candidate_name}
with id {candidate_id} from job
e-signature-request-declined Candidate Activity { job_title} with id { job_id}

BI Data Link- Database Structure 10


declined to sign the requested
document.
Member {member_name} with
id {member_id} sent a
document for e-signature to
candidate {candidate_name}
with id {candidate_id} from job
e-signature-request-sent Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} requested from
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} to self
schedule an event with id
{trackable_id}.
The type of the event with id
event-request Candidate Activity {trackable_id} is {events.type}.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
accepted and signed the offer
offer-accepted Candidate Activity with id {trackable_id}.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
declined the offer with id
offer-declined Candidate Activity {trackable_id}.
Member {member_name} with
id {member_id} requested an
approval for offer with id
{trackable_id} for candidate
{candidate_name} with id
{candidate_id} from job
offer-pending-approval Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} rejected an offer
with id {trackable_id} for
candidate {candidate_name}
with id {candidate_id} from job
offer-rejected Candidate Activity { job_title} with id { job_id}.
offer-sent Candidate Activity Member {member_name} with

BI Data Link- Database Structure 11


id {member_id} sent an offer
with id {trackable_id} to
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}.
The 3rd party reference check
with id {trackable_id} for
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} was
reference-check-completed Candidate Activity completed.
Candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id}
consented to conduct the 3rd
party reference check with id
reference-check-consented Candidate Activity {trackable_id} .
Member {member_name} with
id {member_id} requested a
3rd-party reference check with
id {trackable_id} for candidate
{candidate_name} with id
{candidate_id} from job
reference-check-requested Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} requested a
reference with id {trackable_id}
for candidate {candidate_name}
with id {candidate_id} from job
reference-requested Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} provided a
referral for candidate
{candidate_name} with id
{candidate_id} from job
referral Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} snoozed
candidate {candidate_name}
with id {candidate_id} from job
snoozed Candidate Activity { job_title} with id { job_id}.

BI Data Link- Database Structure 12


Member {member_name} with
id {member_id} unsnoozed
candidate {candidate_name}
with id {candidate_id} from job
unsnoozed Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} completed a
video interview with candidate
{candidate_name} with id
{candidate_id} from job
video-interview-completed Candidate Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} invited
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} to a
video-interview-requested Candidate Activity video interview.
Member {member_name} with
id {member_id} sent an email to
candidate {candidate_name}
with id {candidate_id} from job
Candidate email - outgoing Candidate Communication { job_title} with id { job_id}.
Member {member_name} with
id {member_id} sent an email to
candidate {candidate_name}
with id {candidate_id} from job
{ job_title} with id { job_id} as
Candidate contacted (bulk) Candidate Communication part of bulk email dispatch.
Member {member_name} with
id {member_id} sent a bulk
email to several candidates
from job { job_title} with id
Bulk email sent Candidate Communication { job_id}.
Member {member_name} with
id {member_id} requested job
{ job_title} with id { job_id} to be
Job publication requested Job Activity published or opened.
Job { job_title} with id { job_id}
was opened for internal use by
member {member_ name} with
Job opened for internal use Job Activity id {member_id}.

BI Data Link- Database Structure 13


Job { job_title} with id { job_id}
was published by member
{member_name} with id
Job published Job Activity {member_id}.
Job { job_title} with id { job_id}
was archived by member
{member_name} with id
Job archived Job Activity {member_id}.
Job { job_title} with id { job_id}
was unarchived by member
{member_name} with id
Job unarchived Job Activity {member_id}.
Job { job_title} with id { job_id}
was unpublished by member
{member_name} with id
Job unpublished Job Activity {member_id}.
Member {member_name} with
id {member_id} joined the hiring
Joined hiring team Job Activity team.
A bulk SMS was sent to
candidates for job { job_title}
bulk-sms Job Activity with id { job_id}.
Job { job_title} with id { job_id}
was opened confidentially by
member {member_name} with
opened-confidentially Job Activity id {member_id}.
Member {member_name} with
id {member_id} received
suggested profiles from People
Search action for job { job_title}
people-search-notification Job Activity with id { job_id}.
Bounty Jobs sent a digest
report for the job { job_title} with
recruiting-agency-digest Job Activity id { job_id}.
Member {member_name} with
id {member_id} requested an
action from admin for the job
request-action Job Activity { job_title} with id { job_id}.
Member {member_name} with
requisition-approved Job Activity id {member_id} approved the

BI Data Link- Database Structure 14


requisition with id {trackable_id}.
Member {member_name} with
id {member_id} approved the
multi-position requisition with id
requisition-batch-approved Job Activity {trackable_id}.
Member {member_name} with
id {member_id} cancelled the
multi-position requisition with id
requisition-batch-cancelled Job Activity {trackable_id}.
Member {member_name} with
id {member_id} opened the
multi-position requisition with id
requisition-batch-open Job Activity {trackable_id}.
Member {member_name} with
id {member_id} set the
requisition-batch-pending-appr multi-position requisition with id
oval Job Activity {trackable_id} for approval.
Member {member_name} with
id {member_id} rejected the
multi-position requisition with id
requisition-batch-rejected Job Activity {trackable_id}.
Member {member_name} with
id {member_id} cancelled the
requisition-cancelled Job Activity requisition with id {trackable_id}.
Member {member_name} with
id {member_id} put the
requisition with id {trackable_id}
requisition-on-hold Job Activity on hold.
Member {member_name} with
id {member_id} opened the
requisition with id {trackable_id}
requisition-open Job Activity on hold.
Member {member_name} with
id {member_id} sent the
requisition with id {trackable_id}
requisition-pending-approval Job Activity for approval.
Member {member_name} with
id {member_id} rejected the
requisition-rejected Job Activity requisition with id {trackable_id}.
requisition-resumed Job Activity Member {member_name} with

BI Data Link- Database Structure 15


id {member_id} resumed the
requisition with id {trackable_id}.
Member {member_name} with
id {member_id} added
suggested candidates
successfully for the job
{ job_title} with id { job_id}
suggested-candidates-enabled Job Activity (DEPRECATED).
Member {member_name} with
id {member_id} clicked manual
trigger action to search for new
suggested candidates for the
suggested-candidates-manual- job { job_title} with id { job_id}
trigger Job Activity (DEPRECATED).
Member {member_name} with
id {member_id} used the “Add
Candidates” button for the job
suggested-candidates-request { job_title} with id { job_id}
ed Job Activity (DEPRECATED).
Adding suggested candidates
failed for member
{member_name} with id
{member_id} and the job
{ job_title} with id { job_id}
suggested-candidates-rejected Job Activity (DEPRECATED).
Member {member_name} with
id {member_id} added
resurfaced candidates
successfully for the job
past-candidates-enabled Job Activity { job_title} with id { job_id}.
Member {member_name} with
id {member_id} used manual
trigger action to resurface new
candidates for the job { job_title}
past-candidates-manual-trigger Job Activity with id { job_id}.
Member {member_name} with
id {member_id} used the “Add
Candidates” button to resurface
candidates for the job { job_title}
past-candidates-requested Job Activity with id { job_id}.
Call scheduled Event Scheduling Member {member_name} with

BI Data Link- Database Structure 16


id {member_id} scheduled a
‘Call’ with candidate
{candidate_name} with id
{candidate_id} of job { job_title}
with
id { job_id}.

Details about the event (e.g


scheduled date, cancellation
etc) can be found in table
events.
Member {member_name} with
id {member_id} scheduled an
‘On site interview’ with
candidate {candidate_name}
with id {candidate_id} of job
{ job_ title} with id { job_id}.

Details about the event (e.g


scheduled date, cancellation
etc) can be found in table
Interview scheduled Event Scheduling events.
Member {member_name} with
id {member_id} scheduled a
meeting with candidate
{candidate_name} with id
{candidate_id} of job { job_title}
with id { job_id}.

Details about the event (e.g


scheduled date, cancellation
etc) can be found in table
Meeting scheduled Event Scheduling events.

The table fields are as follows:


id Unique identifier.
activity_created_at A timestamp indicating the action took place.
The action that took place. Refer to the table
action above for possible values and details.
A classification of the action to wider
action_type categories. Refer to the table above for

BI Data Link- Database Structure 17


possible values and details.
When the action refers to movement of a
candidate between stages this field specifies
the type of the destination stage.

Possible values:
shortlisted
phone-screen
assessment
interview
offer
stage_kind hired
The id of the stage at which the action took
place.
If the action was the movement of a candidate
from one stage to another, this is the id of the
stage_id source stage.
The id of the job or the job of the candidate
job_id affected by the action.
The current title of the job or the job of the
job_title candidate affected by the action.
candidate_id The id of the candidate affected by the action.
The full name of the candidate affected by the
candidate_name action.
The id of the account member who performed
member_id the action.
The full name of the account member who
member_name performed the action.
A boolean flag indicating whether the account
member who performed the action is an
member_is_recruiter external recruiter.
The id of the entity that the action is associated
with, other than candidate or job (e.g.
requisition, event etc). See the activities
trackable_id section for specific activity details.
The type of the entity that the action is
associated with, other than candidate or job.

Possible values:
trackable_type Assessment

BI Data Link- Database Structure 18


Comment
Requisition
Feedback
BackgroundCheckRequest
EventRequest
Offer
ESignatureRequest
Message
CandidateShareLink
CandidateReferral
Event
RequisitionBatch

answers
The table contains the answers provided by the candidates in their application
id Unique identifier
A timestamp indicating when the answer was
answer_created_at given by the candidate.
The id of the job for which the candidate gave
job_id the given answer.
The current title of the job for which the
job_title candidate gave the given answer.
The id of the question for which the answer
question_id was given.
The current text of the question for which the
question answer was given.
The type of the answer.

Possible values:
BooleanAnswer
MultipleChoiceAnswer
FreeTextAnswer
DateAnswer
ShortTextAnswer
NumericAnswer
FileAnswer
type DropDownAnswer
The answer given. The format of this field
answer varies depending on the type.
candidate_id The id of the candidate that gave the answer.

BI Data Link- Database Structure 19


The full name of the candidate that gave the
candidate_name answer.

attendances
The table contains the attendance requests of each event
id Unique identifier
The id of the event associated with the
event_id attendance request.
The status of attendance request.

Possible values:
accepted
declined
needs-action
status tentative
The timestamp of when the attendance request
created_at was created.
The id of the time slot that has been assigned
event_slot_id to the event.

candidates
This table stores the information of all candidates, such as which job they’re applying for and
how they’ve been sourced.
id Unique identifier
A timestamp indicating when the candidate was
created in the job.
If the candidate moved to this job from another,
candidate_created_at then the date reflects the move.
The id of the job for which the candidate is/was
job_id considered.
job_title The current title of the job.
A timestamp indicating when the job (for which
the candidate is/was considered) was first
job_first_published_at published or opened for internal use.
name The full name of the candidate.
firstname The first name of the candidate.
lastname The last name of the candidate.

BI Data Link- Database Structure 20


headline The headline of the candidate.
The email which the candidate used with their
email application.
The method of application

Possible values:
Applied: The candidate applied on their own.
Uploaded: Passive candidate uploaded by an
account member or external recruiter.
Referred: Candidate was recommended by an
account member by means of the workable
chrome addon (by ticking the “I know and
recommend this candidate” during the upload)
or through the “Refer candidates” functionality
of workable.
Copied: Candidate was copied / moved from
application_method another job.
A wide classification of the source of candidate.

Possible values:
Sourced: Uploaded by a member of the
account.
Recruiters: Uploaded by a recruiter.
Referrals: Recommended by a member of the
account.
Company Marketing: Applied via the workable
Facebook app or the Careers site of the
company.
Job Boards: Applied through a job board.
source_category Other: Anything else.
The domain of the website from which the
candidate was redirected to the application
source_domain form.
Possible values:
<The name of the job board from which
the candidate was redirected to work-
able>
<The domain of the website where the
candidate was clipped by use of workable
Chrome addon>
Copied
source <The name of the recruiter who sourced

BI Data Link- Database Structure 21


or the member who recommended the
candidate>
Facebook app
Career Site
Uploaded
Recommended by Monster
Another level of classification for the source of
candidate.

Possible values:
Free posting: Applied through a posting to a
free job board that was published through
workable.
Premium posting: Applied through a posting
to a paid (premium) job board that was
published through workable.
API: Uploaded with the use of workable API.
Referrals: Uploaded through the “refer a
candidate” section of workable.
Facebook app: Applied through the workable
Facebook app.
Chrome clipper: Uploaded through workable
clipper (Chrome addon).
People Search: Sourced via People Search
Posting: Applied through a posting
Referrals: Candidate was referred via Referral
portal
<Anything else that has not been classified to
outlet the above>
current_stage_id The id of the stage the candidate is currently at.
current_stage_name The name of the stage.
In case the candidate was uploaded or
referred, the id of the account member who
source_member_id sourced the candidate.
In case the last email exchanged with the
candidate was incoming (i.e it is unanswered)
and not outgoing from an account_member, a
timestamp indicating when was that.
If null, then the last email exchanged was
last_unanswered_email_at outgoing, i.e from an account member.
A timestamp indicating when the candidate
first_screened_at moved to a screening stage, i.e a stage of type

BI Data Link- Database Structure 22


Shortlisted, Phone Screen, Assessment,
Interview.
If null, the candidate was never moved to such
a stage.
A timestamp indicating when the candidate was
first contacted by email.
If null, the candidate was never contacted by
first_contact_at email.
A timestamp indicating when the candidate
moved to a stage of type Interview.
If null, the candidate was never moved to such
first_interviewed_at a stage.
A timestamp indicating when the candidate
moved to a stage of type Offer.
If null, the candidate was never moved to such
first_offer_at a stage.
A timestamp indicating when the candidate
moved to a stage of type Hire.
If null, the candidate was never moved to such
first_hired_at a stage.
A boolean flag indicating whether the
disqualified candidate is currently disqualified or not.
If the candidate is currently disqualified, a time-
stamp indicating when the disqualification took
disqualified_at place.
If currently disqualified, the reason entered by
the account member who disqualified the
candidate.
disqualification_reason If null, no reason was specified.
tags A list of tags applied to the candidate.
A boolean flag indicating whether the
snoozed candidate is snoozed.
Timestamp of when the candidate will stop
snoozed_until being snoozed.
A boolean flag indicating whether the
copied candidate has been copied from another job.
This field has info about the referrals, the AI
metadata Recruiter, etc.
recommended A boolean flag indicating whether the

BI Data Link- Database Structure 23


candidate has been recommended by another
user.
recommended_id The member id of the recommender.
recruiter_id The member id of the recruiter.
The id of the member that uploaded the
uploader_id candidate.
api_id Candidate’s Unique Identifier in Workable’s API.

candidate_evaluations
The table contains the candidate evaluations at various stages in the hiring process
id Unique identifier.
A timestamp indicating when the evaluation
evaluation_created_at was given by the account member.
candidate_id The id of the candidate who was evaluated.
candidate_name The name of the candidate who was evaluated.
The id of the stage at which the candidate was
stage_id evaluated.
The current name of the stage at which the
stage_name candidate was evaluated.
The id of the account member who evaluated
member_id the candidate.
The name of the account member who
member_name evaluated the candidate.
The score given.

Possible values:
yes
no
score definitely

candidate_referrals
This table contains information about candidate referrals.
candidate_id The id of the candidate to which this referral
relates.

payload Payload of the data submitted with the


candidate referral.

BI Data Link- Database Structure 24


created_at A timestamp indicating when the
candidate_referral was created.

updated_at A timestamp indicating when the


candidate_referral was updated.

id Unique identifier

custom_attributes
This table contains information about custom attributes which exist in your account. These would
have been enabled by your Account Manager. Custom attributes may be queried in conjunction
with the Fields table for more information.

Note: custom_attributes.id = fields.owner_id (when owner_type = ‘CustomAttribute’)


hint The value displayed for user facing custom
attributes as a “hint” in the UI on a candidate
timeline.

created_at A timestamp indicating when the


custom_attribute was created.

updated_at A timestamp indicating when the


custom_attribute was updated.

single_answer Boolean - designates whether response


allows for single or multi answer

provider 0 - Candidate
1 - User
2 - Referrals Applicant

enabled Boolean

id Unique identifier

visibility_mask 38: admin, hiring_manager, recruiting_admin


39: admin, hiring_manager, recruiting_admin,
simple
46: admin, hiring_manager, recruiting_admin,
recruiter
47: admin, hiring_manager, recruiting_admin,
simple, recruiter
55: admin, hiring_manager, recruiting_admin,
simple, reviewer
63: admin, hiring_manager, recruiting_admin,
recruiter, simple, reviewer

BI Data Link- Database Structure 25


custom_attributes_settings
This table contains information about the custom attributes settings set to your account. It gives
information about the profile and application form as well as disabled custom attributes.
app_form The account’s application form structure
(including custom_attributes).

profile The account’s candidate profile structure


(including custom_attributes).

disabled_custom_attributes An array of disabled custom attributes (list of


their ids).

id Unique identifier

departments
This table keeps information on the departments and their hierarchy.
id Unique identifier.
name Name of the department.
A timestamp indicating when the record was
created_at created.
A timestamp indicating when the record was
updated_at updated.
parent_id The id of the parent department.

education_records
This table keeps information about the education of candidates. Each record represents a
different school/institution attended, along with all the related information (start/end dates,
qualification acquired, etc.
id Unique identifier
A timestamp indicating when the record was
education_record_created_at created.
The id of the job for which the candidate is/was
job_id considered
job_title The current title of the job
candidate_id The id of the candidate
candidate_name The name of the candidate.
degree Degree acquired.

BI Data Link- Database Structure 26


school School/institution attended.
field_of_study The field/subject studied.
start_date Start date of the programme.
end_date End date of the programme.

eeoc_profiles
This table contains information about EEOC when submitted during the application process (if this
feature is or was ever enabled in your account).
candidate_id The id of the candidate to which this
eeoc_profile belongs.

created_at A timestamp indicating when the eeoc_profile


was created.

disability_status TRUE, FALSE or NULL

disabled_veteran TRUE, FALSE or NULL

gender FEMALE, MALE, or UNDISCLOSED

id Unique identifier

race Possible values:


american_indian
asian
black
hispanic_or_latino
multiracial
native_hawaiian
undisclosed
white

seperated_veteran TRUE, FALSE or NULL

seperated_veteran_on TRUE, FALSE or NULL

service_medal_veteran TRUE, FALSE or NULL

updated_at A timestamp indicating when the eeoc_profile


was updated.

vietnam_veteran TRUE, FALSE or NULL

war_veteran TRUE, FALSE or NULL

BI Data Link- Database Structure 27


events
This table keeps information about the events scheduled (calls, meetings, on site interviews)
id Unique identifier.
A timestamp indicating when the event was
created - not the date on which the event will
event_created_at take (or took) place.
The id of the candidate who participates in the
candidate_id event.
candidate_name The name of the candidate.
The type of the scheduled event.

Possible values:
Meeting
Call
Interview
type Internal
starts_at The scheduled start of the event.
ends_at The scheduled end of the event.
title The title given by the organizer.
location The location as specified in the invitation.
A boolean flag indicating whether the event
cancelled was cancelled or took place/ is still on.
The id of the account member who scheduled
organizer_id the event and sent the invitations.
organizer_name The name of the account member.
The id of the stage where the candidate was at
stage_id when the event was scheduled.
stage_name The current name of the stage.
Information on the conference (meeting URL,
type of conference, e.g. google_meet,
conference zoom_meeting and etc)

experience_records
This table stores information about the previous work experience of candidates.
id Unique identifier
A timestamp indicating when the record was
experience_record_created_at created.
job_id The id of the job for which the candidate is/was

BI Data Link- Database Structure 28


considered
The current title of the job for which the
job_title candidate is/was considered.
candidate_id The id of the candidate.
candidate_name The name of the candidate.
The description of the job performed as
summary entered by the candidate.
start_date Start date at the given position.
End date at the given position.
Potentially empty for the cases where that was
the current job of the candidate at the time of
end_date application.
company Company where candidate worked.
industry Industry at which the company operates.
A boolean flag indicating whether that was the
current job of the candidate at the time of
current application.
The title of the job in the candidate’s experience
experience_title records.

fields
This table contains descriptive information for custom fields in your account (Offer Variables,
Custom Fields, Requisition Attributes)
id Unique identifier.

type Possible values:


BooleanField
FreeTextField
NumericField
FileField
SalaryField
SignatureField
MultipleChoiceField
DateField
ShortTextField
DropdownField

label Label displayed in the UI in English


(DEPRECATED).

hint The value displayed for user facing custom

BI Data Link- Database Structure 29


attributes as a “hint” in the UI on a candidate
timeline.

single_answer TRUE or FALSE.

created_at A timestamp indicating when the field was


created.

updated_at A timestamp indicating when the field was


updated.

owner_id The id of the object with which this is linked


(ie. unique id of CustomAttribute,
DocumentVariable, or RequisitionAttribute
object)

owner_type Possible values:


CustomAttribute
DocumentVariable
RequisitionAttribute

field_choices
This table contains the options available for custom attributes of a particular type, ie. Dropdown
field_choices, etc.
field_id The id to which the field_value corresponds.

created_at A timestamp indicating when the field_choice


was created.

updated_at A timestamp indicating when the field_choice


was updated.

label Label displayed in the UI in English


(DEPRECATED).

position Numeric value for field_choice placement.

enabled TRUE or FALSE.

id Unique identifier

field_choice_translations
This table contains the options available for custom attributes of a particular type, such as
dropdown fields, in various languages.
id Unique identifier

BI Data Link- Database Structure 30


field_choice_id Unique identifier of field_choice object.

label Label displayed in the UI.

language ISO code of the language.

created_at A timestamp indicating when the


field_choice_translation was created.

updated_at A timestamp indicating when the


field_choice_translation was updated.

field_translations
This table contains fields of a Field that are translated into various languages.
id Unique identifier

field_id The id of the field to which the translations


belong.

label Label displayed in the UI.

language ISO code of the language.

created_at A timestamp indicating when the


field_translation was created.

updated_at A timestamp indicating when the


field_translation was updated.

field_values
This table contains the data entered (answered) for a Field, as entered by a candidate or a
member of the account.
type Possible values:
DateFieldValue
FreeTextFieldValue
MultipleChoiceFieldValue
SalaryFieldValue
NumericFieldValue
BooleanFieldValue
ShortTextFieldValue
FileFieldValue
DropdownFieldValue

resource_id The id of the resouce_type (below) to which


the field_value corresponds.

BI Data Link- Database Structure 31


resource_type Possible values:
Candidate
Offer
Requisition

id Unique identifier

field_id The id to which the field_value corresponds.

member_id The id of the member who provided the value


when this is applicable.

created_at A timestamp indicating when the field_value


was created.

updated_at A timestamp indicating when the field_value


was updated.

data Value when applicable (body of text). For Drop


Down and Multiple Choice fields, the selected
values are stored in {field_value_choices}

field_value_choices
This table is a join table which accounts for responses to custom attributes of a particular type (ie.
MultipleChoiceField).
field_choice_id Unique identifier of field_choice object.

field_value_id Unique identifier of field_value object.

created_at A timestamp indicating when the


field_value_choice was created.

updated_at A timestamp indicating when the


field_value_choice was updated.

id Unique identifier

hiring_team
The table contains information about which account members take part in the hiring process of
each job.
id Unique identifier
A timestamp indicating when member joined
member_joined_job_hiring_team_at the hiring team of the job.
job_id The id of the job.

BI Data Link- Database Structure 32


job_title The current title of the job.
The id of the account member who joined the
member_id hiring team for the job.
member_name The full name of the account member.
The role that the given account member has in
the hiring team of the job.

Possible values:
admin: The user is an admin (Super Admin
privileges) of the account and therefore is also
a hiring manager to the job.
simple: The member is a non-admin user of the
account and was granted “Standard Member’
access to the job.
reviewer: The member is a non-admin user of
the account and was granted “Reviewer”
access to the job.
hiring_manager: The member is a non-admin
user of the account but was granted “Hiring
Manager” access to the job.
recruiting_admin: The member is a member
with limited admin privileges and granted
“Recruiter Admin” access to the specific job.
Recruiter: The member is a non-admin user
role with “External Recruiter” access to the job.

invoices
The table contains the invoices issued and the billing information contained there.
id Unique identifier.
A timestamp indicating when the invoice was
invoice_created_at created.
reference_code The code of the invoice, usually WOR-xxxx
Possible values:
subscription: When the invoice was for the
monthly or annual payment for the subscription
of the account.
posting: When the item purchased was a
posting to a premium job board
background_check: When the invoice was for
purchase_type charges of a background check conducted to a

BI Data Link- Database Structure 33


candidate.
amount_currency The currency of the invoice.
The initial value of the service purchased.
In case the amount is negative, then this
amount invoice refers to a refund.
discount Any discount that may have been applied.
amount_vat The VAT included in the invoice (if applicable).
amount_total The total amount payable.
billing_date The date the invoice was issued.
billing_company
billing_company_vat
billing_address
billing_city
billing_zip
billing_state
billing_country_code The billing information contained in the invoice.
If purchase_type is posting then this is the id of
the premium job board posting that was
purchased_posting_id purchased.
If the invoice was refunded, this is the id of the
refund_id invoice for the refund.

job_views
For each job, this table explains the different domains that referred candidates to the application
form and the number of views from each.
id Unique identifier
A timestamp indicating when we recorded the
first view from the given domain was recorded
first_view_at for the given job.
job_id The id of the job.
The domain from which the candidates were
redirected to the application form of the job.
In case the referred couldn’t be identified, the
referrer_domain value is unknown.
The medium (type of posting) that the views
came from. For example:
Free_posting: The views came from a posting
outlet to a free board that was published through

BI Data Link- Database Structure 34


workable
Premium_posting: The views came from a
posting to a paid (premium) board that was
published through workable
Employee_portal: The views came from a
posting in the employee portal.
Social: The views that came from a posting on
social media.
Job-ad: The views came from a job
advertisement.
etc.
In case Workable cannot classify the medium, it
will be empty.
Total number of views for the given job from the
views_count given domain.
A timestamp indicating when the latest view
from the given domain was recorded for the
last_view_at given job.

jobs
The table keeps the information related to the jobs of the company.
id Unique identifier
A timestamp indicating when the job was
job_created_at created.
title The current title of the job.
Any internal reference code attached to the
code job.
The status of the job.

Possible values:
draft
open for internal use
published
state archived
The unique identifier that is used for the
construction of the job’s shortlink (the last ten
shortcode characters of the job’s shortlink).
country_code
state_code Information about where the given position is
city located.

BI Data Link- Database Structure 35


zip_code
A boolean flag indicating whether
telecommuting telecommuting is possible for that job.
A boolean flag indicating whether the job is
being advertised in a different location than the
advertise_elsewhere location of the position itself.
advertise_country_code
advertise_state_code If advertise_elsewhere is true then these
advertise_city columns contain information for the location at
advertise_zip_code which the position is advertised.
Possible values:
Full-time
Part-time
employment_type Temporary
function The function of the job (eg Marketing).
The industry of the job (usually the industry of
the company - eg Business Supplies and
industry Equipment).
The experience required for the candidates of
this position.
Possible values:
Associate
Entry level
Internship
Mid-Senior level
Executive
Director
experience Not Applicable
The level of education required for the
candidates of this position.

Possible values:
Associate Degree
Bachelor’s Degree
High School or equivalent
Master’s Degree
Professional
education Unspecified
salary_from
salary_to
salary_currency Information about the offered salary.

BI Data Link- Database Structure 36


Timestamp indicating the first time the job was
first_published_at published or opened for internal use.
Timestamp indicating the last time the job was
last_published_at published or opened for internal use.
A timestamp indicating when was the first time
any candidate was moved to a screening stage,
i.e a stage of type Shortlisted, Phone Screen,
Assessment, Interview.
If null, then no candidates were ever moved to
first_screening_at such a stage.
A timestamp indicating when was the first time
any candidate was moved to an Interview
stage.If null, then no candidates were ever
first_interview_at moved to such a stage.
A timestamp indicating when was the first time
any candidate was moved to an Offer stage.
If null, then no candidates were ever moved to
first_offer_at such a stage.
A timestamp indicating when was the first time
any candidate was moved to a Hire stage.
If null, then no candidates were ever moved to
first_hire_at such a stage.
The total amount spent on premium postings
advertise_cost for the advertisement of position.
candidates_count Total candidates applied/sourced to the job.
free_postings_count Total postings ever published to free boards.
Total postings ever published to premium
boards purchased through workable. For each
of these postings an invoice of type ‘posting’
paid_postings_count exists.
Total postings ever published to premium
boards using their own Recruiter account - not
bought through workable. No invoice exists for
owned_postings_count these postings.
An integer that corresponds to the access level
access_level of the job (e.g. visible only to Admin).
The id of the department that the job belongs
department_id to.
updated_at A timestamp indicating the last time that job

BI Data Link- Database Structure 37


information and/or job state was updated.

job_boards
The table keeps information regarding Job Boards.
id Unique identifier.
name The name of the Job Board.
slug String identifier for internal usage.
domain The domain of the Job Board.
A boolean flag indicating whether the Job
available Board is available.
A boolean flag indicating whether the Job
free Board is free.
A boolean flag indicating whether the Job
is_feed Board is feed.
provider_slug String identifier for internal usage.
Type of the Job Board.
Possible values:
standard
ppa
recruiting
job_board_type social
A boolean flag indicating whether the Job
affiliate Board is affiliated.

members
Columns regarding account member activity
id Unique identifier
A timestamp indicating when the account
member_created_at member was created.
Possible values:
simple: i.e non-admin
admin
recruiter: i.e external recruiter invited to the
account
role reviewer
A boolean flag indicating whether the member
active still has access to the account.

BI Data Link- Database Structure 38


The email under which the member joined the
email account.
name The full name of the member.
headline The headline of the account member.
api_id Member’s Unique Identifier in Workable’s API.

offers
This table contains information about offers which have been created for candidates.
candidate_id The id of the candidate to which this offer has
been made.

job_id The id of the job in which this offer has been


made.

member_id The id of the member who made the offer

offer_template_id The id of the offer_template used to create


the offer.

decline_reason Free text field - reason why the offer was


declined.

state Possible values:


accepted
created
declined
expired
pending_approval
pending_signature
rejected
sent

locale Locale for the offer.

state_updated_at A timestamp indicating when the state of the


offer was updated.

created_at A timestamp indicating when the offer was


created.

updated_at A timestamp indicating when the offer was


updated.

id Unique identifier

visibility_mask 38: admin, hiring_manager, recruiting_admin


39: admin, hiring_manager, recruiting_admin,

BI Data Link- Database Structure 39


simple
46: admin, hiring_manager, recruiting_admin,
recruiter
47: admin, hiring_manager, recruiting_admin,
simple, recruiter
55: admin, hiring_manager, recruiting_admin,
simple, reviewer
63: admin, hiring_manager, recruiting_admin,
recruiter, simple, reviewer

offer_variables
This table contains information about offer variables which exist in your account for use in offers.
Offer variables may be queried in conjunction with the Fields table for more information.

Note: offer_variables.id = fields.owner_id (when owner_type = OfferVariable)


created_at A timestamp indicating when the
offer_variable was created.

id Unique identifier

kind 1 - adhoc
0 - initial

position Numeric value for offer variable placement

slug Value which appears in brackets in the


template to designate it is a variable

updated_at A timestamp indicating when the


offer_variable was updated.

visibility_mask 38: admin, hiring_manager, recruiting_admin


39: admin, hiring_manager, recruiting_admin,
simple
46: admin, hiring_manager, recruiting_admin,
recruiter
47: admin, hiring_manager, recruiting_admin,
simple, recruiter
55: admin, hiring_manager, recruiting_admin,
simple, reviewer
63: admin, hiring_manager, recruiting_admin,
recruiter, simple, reviewer

offer_templates
This table contains information for all of the offer templates created in your account.

BI Data Link- Database Structure 40


created_at A timestamp indicating when the
offer_template was created.

id Unique identifier

updated_at A timestamp indicating when the


requisition_template was updated.

active Boolean

code_generation Boolean

postings
Columns relevant to postings to job boards via Workable
id Unique identifier.
A timestamp indicating when the job was
posting_created_at posted to the job board.
job_id The id of the job.
job_title The current title of the job.
job_board The job_board to which the job was published.
If the posting was in a premium board, this is
the maximum days the job is/was allowed to
max_duration remain published.
The type of the posting.

Possible values:
FreePosting: Job was posted to a free board
PaidPosting: Job was posted to a premium
board and purchased through workable. For this
posting an entry exists in table Invoices with
type ‘posting’.
OwnedPosting: Job was posted to a premium
board but using their own Recruiter account and
inventory instead of buying directly through
type workable. No invoices exist for this posting.
If type is PaidPosting, the price of the posting
price (excl. vat).
This is the url at which the job is published in the
job board.
It is null for postings to job boards other than
url CareerBuilder, Monster and Stack Overflow.

BI Data Link- Database Structure 41


days_published The number of days the job is/stayed published
Current status of the posting.

Possible values:
published
closed
expired
checkout_pending
discarded
Initiated
paused
publish_pending
purchased
state update_pending
Number of candidates attracted by the given
candidates_count posting to the job board.

pipelines
This table contains information about all of the recruiting pipelines in your account. This includes
custom pipelines if they have been implemented.
active Boolean indicating whether a pipeline is active
or not.

base Boolean - base pipeline is the Reporting


pipeline.

created_at A timestamp indicating when the pipeline was


created.

default Boolean

id Unique identifier

name Name of the pipeline.

updated_at A timestamp indicating when the pipeline was


updated.

pseudo_boards
This table keeps information regarding the sites that act as (pseudo) Job Boards.
id Unique identifier.
domain The domain of the pseudo Job Board.

BI Data Link- Database Structure 42


A boolean flag indicating whether the pseudo
enabled Job Board is enabled.

questions
These columns are for information regarding job application forms
id Unique identifier
A timestamp indicating when the question was
question_created_at created.
The id of the job that the question is attached
job_id to.
job_title The title of the job.
Possible values:
BooleanQuestion
MultipleChoiceQuestion
FreeTextQuestion
NumericQuestion
DateQuestion
DropdownQuestion
ShortTextQuestion
type FileQuestion
A boolean flag indicating whether candidates
answering ‘no’ are auto-disqualified. Only
rejecting applies to questions of type ‘BooleanQuestion’.
The order in which the given question is being
position displayed in the application form of the job.
body The text of the question.

ratings
This table contains information about ratings created for candidates.
candidate_id Candidate id to which this rating belongs.

created_at A timestamp indicating when the rating was


created.

id Unique identifier

member_id The id of the member who created the rating

score_card JSON formatted attribute with top-level keys


of “sections” and “settings”. Within “sections”

BI Data Link- Database Structure 43


there are one or more “traits”, which have
multiple “questions”. Each “question” has a
“body” (question text) and a “note” (answer) if
filled out. Both “sections” and “traits” have
names. E.g.

{“settings”: {"questions_rateable":false},
“sections”: [{
“id”: 1234,
“name”: “section name”,
“traits”: [{
“id”: 1234,
“name”: “trait name”,
“questions”: [ {
“id”: 1234,
“body”: “question body”,
“note”: “answer”}]}]}]}

score 0 - negative
1 - positive
2 - definite

stage_id The id of the stage in which the rating was


created.

updated_at A timestamp indicating when the rating was


updated.

redsync_metro_source
This table contains information about the job statistics regarding views and visitor’s source.
job_id Unique identifier of the job.

category The category of the source of the visitor.


Possible values:
Referrals
Recruiters
Other
Company Marketing
Job Boards
Internal Applications
Sourced

source The source of the visitor.

source_domain The source domain of the visitor.

num_views The number of visits of the job application.

BI Data Link- Database Structure 44


num_candidates Number of candidates applied to this job from
the specific source.

num_hired Number of hired candidates from the specific


source.

num_moved Number of candidates from this source that


have moved past the “Applied” and “Sourced”
stages in the job’s pipeline.

requisitions
This table contains information about requisitions in your account. This data only exists if you
use the Hiring Plan add on.
requisition_template_id Unique identifier of the requisition template.

approval_workflow_id Unique identifier of the approval workflow.

department_id Unique identifier of the department selected


for the Requisition.

location_id Unique identifier of the location selected for


the Requisition.

job_id Unique identifier of the job to which the


Requisition is associated.

candidate_id Unique identifier of the candidate hired for the


position.

requester_id Member id - This is the person who is


requesting the creation of the requisition.

owner_id Member id - This is the person that will be


responsible for filling this requisition (typically
a recruiting admin).

hiring_manager_id Member id - This is the person the new hire


will report to (typically a hiring manager for the
job).

code Requisition code (could be auto-generated if


this setting is enabled in Hiring Plan).

employment_type Possible values:


Contract
Full-time
Other
Part-time

BI Data Link- Database Structure 45


Temporary

experience Possible values:


Associate
Director
Entry level
Executive
Internship
Mid-Senior level
Not Applicable

salary_from Job minimum salary.

salary_to Job maximum salary.

salary_currency Currency code (ISO 4217)

salary_frequency Possible values:


day
hour
month
week
year

offered_salary Salary offered to candidate for position.

offered_salary_currency Currency code (ISO 4217)

offered_salary_frequency Possible values:


day
hour
month
week
year

reason 0 - new_hire
1 - replacement
2 - backfill

notes Text field for notes on the Requisition.

plan_date A timestamp indicating the “planned date”,


selected while creating the requisition.

start_date A timestamp of the start date from the


candidate offer.

opened_on A timestamp indicating when the requisition


was opened.

filled_on A timestamp indicating when a candidate was

BI Data Link- Database Structure 46


hired for the role.

created_at A timestamp indicating when the Requisition


was created.

updated_at A timestamp indicating when the Requisition


was updated.

state Possible values:


-1 - processing
0 - draft
1 - pending
2 - approved
3 - open
4 - filled
5 - rejected
6 - cancelled
7 - reserved
8 - on hold

id Unique identifier

requisition_attributes
This table contains information about requisition attributes which exist in your account for use in
requisitions. This data only exists if you use the Hiring Plan add on. Requisition attributes may be
queried in conjunction with the Fields table for more information.

Note: requisition_attributes.id = fields.owner_id (when owner_type = ‘RequisitionAttribute’)


requisition_template_id The id of the requisition_template to which
this custom attribute belongs.

position Numeric value for requisition attribute


placement.

created_at A timestamp indicating when the


requisition_attribute was created.

updated_at A timestamp indicating when the


requisition_attribute was updated.

enabled Boolean

id Unique identifier

BI Data Link- Database Structure 47


requisition_templates
This table contains information about requisition templates in your account. This data only exists
if you use the Hiring Plan add on.
code_prefix If you enable automatic codes, this is the
prefix for the code (for example, "REQ").

code_seed If you enable automatic codes, this is the


starting number for the code (for example,
“101” - REQ101).

created_at A timestamp indicating when the


requisition_template was created.

updated_at A timestamp indicating when the


requisition_template was updated.

active Boolean

code_generation Boolean

meta JSON of attribute template settings including


custom fields if applicable.

id Unique identifier

stages
This table contains information about all of the stages in each of the recruiting pipelines in your
account. This includes stages that exist in custom pipelines if they have been implemented.
confidential Boolean - whether or not the stage falls under
a confidential zone in the Recruiting Pipeline.

stage_created_at A timestamp indicating when the stage was


created.

id Unique identifier

kind Possible values:


applied
assessment
hired
interview
offer
phone-screen
shortlisted
sourced

BI Data Link- Database Structure 48


name Name of the stage.

position Numeric value for stage placement.

slug Stage name as slug (example: A stage named


“Phone Interview” would have the slug
“phone-interview”).

base_stage_id Unique identifier of stage within the Reporting


pipeline to which this maps (custom pipelines
only) .

pipeline_id Unique identifier of the pipeline to which the


stage belongs.

updated_at A timestamp indicating when the stage was


updated.

BI Data Link- Database Structure 49


Appendix A - ER diagrams
In this section, ERs of the most complicated and commonly requested associations between
tables will be provided, with a simplified version of the tables.

Offers

BI Data Link- Database Structure 50


Custom Attributes

BI Data Link- Database Structure 51


Custom Requisition Attributes

BI Data Link- Database Structure 52


Appendix B - Examples
In the following sections find some examples of the most common queries:

Fields

Example 1 - Custom Attributes

The following SQL statements are returning the values of all Custom Attributes per Candidate Id
-- Returns field values for Custom Attributes
-- Multiple answers are delimited by ' | '
WITH filtered_translation AS
(SELECT 'en' AS "language"),
filtered_fields AS
(SELECT f.id,
ca.id AS custom_attribute_id,
ca.provider,
f."type",
ft.label AS field_label
FROM custom_attributes ca
JOIN fields f ON f.owner_id = ca.id
AND f.owner_type = 'CustomAttribute'
JOIN field_translations ft ON ft.field_id = f.id
AND ft.language =
(SELECT "language"
FROM filtered_translation)),
filtered_field_values AS
(SELECT fv.id AS field_value_id,
ff.id AS field_id,
ff.custom_attribute_id,
ff.field_label,
ff."type" AS field_type,
CASE
WHEN ff.provider = 1 THEN 'User'
WHEN ff.provider = 0 THEN 'Candidate'
END AS provider,
fv.resource_id AS candidate_id,
CASE
WHEN ff."type" NOT IN ('MultipleChoiceField',
'DropdownField') THEN fv."data"
ELSE LISTAGG(fct.label, ' | ')
END AS value
FROM field_values fv
JOIN filtered_fields ff ON fv.field_id = ff.id
LEFT JOIN field_value_choices fvc ON fvc.field_value_id = fv.id
LEFT JOIN field_choices fc ON fc.id = fvc.field_choice_id

BI Data Link- Database Structure 53


LEFT JOIN field_choice_translations fct ON fct.field_choice_id = fc.id
AND fct.language =
(SELECT "language"
FROM filtered_translation)
GROUP BY fv.id,
ff.id,
ff.custom_attribute_id,
ff.field_label,
ff."type",
ff.provider,
fv.resource_id,
fv."data") --------------------------------------------------

SELECT *
FROM filtered_field_values

BI Data Link- Database Structure 54


Example 2 - Requisition Attributes

The following SQL statements are returning the values all (custom) Requisition Attributes per
Requisition Id:
-- Returns field values for Requisition Attributes
-- Multiple answers are delimited by ' | '
WITH filtered_translation AS
(SELECT 'en' AS "language"),
filtered_fields AS
(SELECT f.id,
ra.id AS requisition_attribute_id,
f."type",
ft.label AS field_label
FROM requisition_attributes ra
JOIN fields f ON f.owner_id = ra.id
AND f.owner_type = 'RequisitionAttribute'
JOIN field_translations ft ON ft.field_id = f.id
AND ft.language =
(SELECT "language"
FROM filtered_translation)),
filtered_field_values AS
(SELECT fv.id AS field_value_id,
ff.id AS field_id,
ff.requisition_attribute_id,
ff.field_label,
ff."type" AS field_type,
fv.resource_id AS requisition_id,
CASE
WHEN ff."type" NOT IN ('MultipleChoiceField',
'DropdownField') THEN fv."data"
ELSE LISTAGG(fct.label, ' | ')
END AS value
FROM field_values fv
JOIN filtered_fields ff ON fv.field_id = ff.id
LEFT JOIN field_value_choices fvc ON fvc.field_value_id = fv.id
LEFT JOIN field_choices fc ON fc.id = fvc.field_choice_id
LEFT JOIN field_choice_translations fct ON fct.field_choice_id = fc.id
AND fct.language =
(SELECT "language"
FROM filtered_translation)
GROUP BY fv.id,
ff.id,
ff.requisition_attribute_id,
ff.field_label,
ff."type",
fv.resource_id,
fv."data") --------------------------------------------------

SELECT *
FROM filtered_field_values

BI Data Link- Database Structure 55


Example 3 - Document Variables (Offer Variables)

The following SQL statements are returning the values all Offer Variables per Candidate Id:
-- Returns field values for Document Variables
WITH filtered_translation AS
(SELECT 'en' AS "language"),
filtered_field_owners AS
(SELECT id
FROM offer_variables),
filtered_fields AS
(SELECT f.id,
ov.id AS document_variable_id,
f."type",
ft.label AS field_label
FROM offer_variables ov
JOIN fields f ON f.owner_id = ov.id
AND f.owner_type = 'DocumentVariable'
JOIN field_translations ft ON ft.field_id = f.id
AND ft.language =
(SELECT "language"
FROM filtered_translation)),
filtered_field_values AS
(SELECT fv.id AS field_value_id,
ff.id AS field_id,
ff.document_variable_id,
ff.field_label,
ff."type" AS field_type,
o.id AS offer_id,
o.candidate_id
FROM field_values fv
JOIN filtered_fields ff ON fv.field_id = ff.id
JOIN offers o ON o.id = fv.resource_id
GROUP BY fv.id,
ff.id,
ff.document_variable_id,
ff.field_label,
ff."type",
fv."data",
o.id,
o.candidate_id)
--------------------------------------------------

SELECT *
FROM filtered_field_values

BI Data Link- Database Structure 56

You might also like