# AccuLynx schema ERD

Table and field reference for the Fivetran AccuLynx connector.

## Table & Field Reference

### contact_email_address

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contact_id | Unknown | PK, FK |
| address | Unknown |  |
| is_primary | Unknown |  |
| type | Unknown |  |

### contact_phone_number

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contact_id | Unknown | PK, FK |
| ext | Unknown |  |
| is_primary | Unknown |  |
| number | Unknown |  |
| type | Unknown |  |

### contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| billing_address_city | Unknown |  |
| billing_address_country_abbreviation | Unknown |  |
| billing_address_country_id | Unknown |  |
| billing_address_country_name | Unknown |  |
| billing_address_state_abbreviation | Unknown |  |
| billing_address_state_id | Unknown |  |
| billing_address_state_name | Unknown |  |
| billing_address_street_1 | Unknown |  |
| billing_address_street_2 | Unknown |  |
| billing_address_zip_code | Unknown |  |
| company_name | Unknown |  |
| cross_reference | Unknown |  |
| first_name | Unknown |  |
| last_name | Unknown |  |
| mailing_address_city | Unknown |  |
| mailing_address_country_abbreviation | Unknown |  |
| mailing_address_country_id | Unknown |  |
| mailing_address_country_name | Unknown |  |
| mailing_address_state_abbreviation | Unknown |  |
| mailing_address_state_id | Unknown |  |
| mailing_address_state_name | Unknown |  |
| mailing_address_street_1 | Unknown |  |
| mailing_address_street_2 | Unknown |  |
| mailing_address_zip_code | Unknown |  |
| salutation | Unknown |  |

### estimate_section_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| estimate_id | Unknown | PK, FK |
| estimate_section_id | Unknown | PK, FK |
| description | Unknown |  |
| estimate_unit | Unknown |  |
| fixed_price | Unknown |  |
| labour_cost | Unknown |  |
| material_cost | Unknown |  |
| measurement_quantity | Unknown |  |
| name | Unknown |  |
| order_quantity | Unknown |  |
| order_unit | Unknown |  |
| override_name | Unknown |  |
| price | Unknown |  |
| quantity | Unknown |  |
| selected_unit | Unknown |  |
| total_price | Unknown |  |
| type | Unknown |  |
| unit_coversion | Unknown |  |
| waste | Unknown |  |

### estimate_section

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| estimate_id | Unknown | PK, FK |
| created_by_id | Unknown | FK |
| modified_by_id | Unknown | FK |
| created_date | Unknown |  |
| description | Unknown |  |
| modified_date | Unknown |  |
| profit_margin_rate | Unknown |  |
| profit_margin_total | Unknown |  |
| section_financial_overhead_rate | Unknown |  |
| section_financial_overhead_total | Unknown |  |
| section_financial_profit_rate | Unknown |  |
| section_financial_profit_total | Unknown |  |
| section_financial_tax_rate | Unknown |  |
| section_financial_tax_total | Unknown |  |
| section_financial_total_cost | Unknown |  |
| section_financial_total_price | Unknown |  |
| title | Unknown |  |

### company_setting

| Column | Type | Keys |
| --- | --- | --- |
| company_id | Unknown | PK |
| has_insurance | Unknown |  |
| name | Unknown |  |
| time_zone_info_adjusted_utc_offset | Unknown |  |
| time_zone_info_base_utc_offset | Unknown |  |
| time_zone_info_daylight_name | Unknown |  |
| time_zone_info_name | Unknown |  |
| time_zone_info_supports_daylight_saving | Unknown |  |

### calendar_appointment

| Column | Type | Keys |
| --- | --- | --- |
| end_date | Unknown | PK |
| id | Unknown | PK |
| start_date | Unknown | PK |
| calendar_id | Unknown | PK, FK |
| all_day | Unknown |  |
| event_type | Unknown |  |
| job_name | Unknown |  |
| location | Unknown |  |
| notes | Unknown |  |
| title | Unknown |  |

### calendar

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| display_name | Unknown |  |
| email | Unknown |  |
| employee_id | Unknown |  |
| first_name | Unknown |  |
| initial | Unknown |  |
| last_name | Unknown |  |
| mobile_phone | Unknown |  |
| phone | Unknown |  |
| role_id | Unknown |  |
| role_name | Unknown |  |
| status | Unknown |  |

### company_lead_source_child

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| lead_source_id | Unknown | PK, FK |
| name | Unknown |  |

### company_lead_source

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### estimate

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_by_id | Unknown | FK |
| job_id | Unknown | FK |
| modified_by_id | Unknown | FK |
| created_date | Unknown |  |
| description | Unknown |  |
| estimate_number | Unknown |  |
| financial_overhead_rate | Unknown |  |
| financial_overhead_total | Unknown |  |
| financial_profit_rate | Unknown |  |
| financial_profit_total | Unknown |  |
| financial_tax_rate | Unknown |  |
| financial_tax_total | Unknown |  |
| financial_total_cost | Unknown |  |
| financial_total_price | Unknown |  |
| is_primary | Unknown |  |
| modified_date | Unknown |  |
| note | Unknown |  |
| profit_margin_rate | Unknown |  |
| profit_margin_total | Unknown |  |
| title | Unknown |  |

### job_contact_email_address

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| job_contact_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |

### job_contact_phone_number

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| job_contact_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |

### job_contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |
| contact_guid | Unknown |  |
| is_primary | Unknown |  |
| relation_to_primary | Unknown |  |

### job_trade_type

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| job_id | Unknown | PK, FK |
| name | Unknown |  |

### job

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| lead_source_id | Unknown | FK |
| created_date | Unknown |  |
| current_milestone | Unknown |  |
| geo_location_latitude | Unknown |  |
| geo_location_longitude | Unknown |  |
| job_category_id | Unknown |  |
| job_category_name | Unknown |  |
| job_name | Unknown |  |
| job_number | Unknown |  |
| lead_dead_reason | Unknown |  |
| location_address_city | Unknown |  |
| location_address_country_abbreviation | Unknown |  |
| location_address_country_id | Unknown |  |
| location_address_country_name | Unknown |  |
| location_address_state_abbreviation | Unknown |  |
| location_address_state_id | Unknown |  |
| location_address_state_name | Unknown |  |
| location_address_street_1 | Unknown |  |
| location_address_street_2 | Unknown |  |
| location_address_zip_code | Unknown |  |
| milestone_date | Unknown |  |
| modified_date | Instant |  |
| work_type_id | Unknown |  |
| work_type_name | Unknown |  |
| work_type_system_default | Unknown |  |

### lead_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| job_id | Unknown | FK |
| action | Unknown |  |
| created_by_id | Unknown |  |
| created_by_link | Unknown |  |
| date | Unknown |  |
| lead_dead_reason | Unknown |  |

### financial_worksheet

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| financial_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |

### financial_amendment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| financial_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |

### financial

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| job_id | Unknown | PK, FK |
| approved_job_value | Unknown |  |
| balance_due | Unknown |  |
| worksheet_id | Unknown |  |
| worksheet_section_total_change_order_total | Unknown |  |
| worksheet_section_total_discount_total | Unknown |  |
| worksheet_section_total_financial_total | Unknown |  |
| worksheet_section_total_insurance_claim_total | Unknown |  |
| worksheet_section_total_supplement_total | Unknown |  |
| worksheet_section_total_upgrade_total | Unknown |  |
| worksheet_section_total_work_not_doing_total | Unknown |  |

### milestone_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| job_id | Unknown | FK |
| date | Unknown |  |
| name | Unknown |  |

### invoice_section_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| invoice_section_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |
| parent_item_id | Unknown | FK |
| hierarchy_sort_order | Unknown |  |
| item_name | Unknown |  |
| line_item_assignment | Unknown |  |
| price | Unknown |  |
| total_price | Unknown |  |

### invoice_section

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| job_id | Unknown | PK, FK |
| invoice_worksheet_section_type | Unknown |  |
| total_price | Unknown |  |

### invoice

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| job_id | Unknown | PK, FK |
| balance_due | Unknown |  |
| created_date | Unknown |  |
| current_invoice_state | Unknown |  |
| due_date | Unknown |  |
| invoice_date | Unknown |  |
| invoice_name | Unknown |  |
| invoice_number | Unknown |  |
| invoice_sequence | Unknown |  |
| recording_classification | Unknown |  |
| recording_status | Unknown |  |
| sort_index | Unknown |  |
| total_price | Unknown |  |

## Relationships

- contact_email_address(contact_id) → contact(id)
- contact_phone_number(contact_id) → contact(id)
- estimate_section_item(estimate_section_id) → estimate_section(id)
- estimate_section_item(estimate_id) → estimate_section(estimate_id)
- estimate_section(modified_by_id) → users(id)
- estimate_section(created_by_id) → users(id)
- estimate_section(estimate_id) → estimate(id)
- calendar_appointment(calendar_id) → calendar(id)
- company_lead_source_child(lead_source_id) → company_lead_source(id)
- estimate(modified_by_id) → users(id)
- estimate(created_by_id) → users(id)
- estimate(job_id) → job(id)
- job_contact_email_address(job_id) → job_contact(job_id)
- job_contact_email_address(job_contact_id) → job_contact(id)
- job_contact_phone_number(job_id) → job_contact(job_id)
- job_contact_phone_number(job_contact_id) → job_contact(id)
- job_contact(id) → contact(id)
- job_contact(job_id) → job(id)
- job_trade_type(job_id) → job(id)
- job(lead_source_id) → company_lead_source(id)
- lead_history(job_id) → job(id)
- financial_worksheet(job_id) → financial(job_id)
- financial_worksheet(financial_id) → financial(id)
- financial_amendment(job_id) → financial(job_id)
- financial_amendment(financial_id) → financial(id)
- financial(job_id) → job(id)
- milestone_history(job_id) → job(id)
- invoice_section_item(parent_item_id) → invoice_section_item(id)
- invoice_section_item(invoice_section_id) → invoice_section(id)
- invoice_section_item(job_id) → invoice_section(job_id)
- invoice_section_item(invoice_id) → invoice_section(invoice_id)
- invoice_section(invoice_id) → invoice(id)
- invoice_section(job_id) → invoice(job_id)
- invoice(job_id) → job(id)
