# Freshsuccess schema ERD

Table and field reference for the Fivetran Freshsuccess connector.

## Table & Field Reference

### product_user

| Column | Type | Keys |
| --- | --- | --- |
| user_id | String | PK |
| account_id | String | FK |
| contact_user_id | String |  |
| email | String |  |
| first_name | String |  |
| is_active | Boolean |  |
| last_name | String |  |
| lead_source | String |  |
| mailing_city | String |  |
| mailing_country | String |  |
| mailing_postal_code | String |  |
| mailing_state | String |  |
| mailing_street | String |  |
| phone | String |  |
| product_join_date | Instant |  |
| role | String |  |
| salutation | String |  |
| title | String |  |
| value_** |  |  |

### invoice_statement_line_item

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| invoice_statement_invoice_id | String | FK |
| amount | Int |  |
| description | String |  |
| is_recurring | Boolean |  |

### invoice_statement

| Column | Type | Keys |
| --- | --- | --- |
| invoice_id | String | PK |
| account_id | String | FK |
| is_failed | Boolean |  |
| non_recurring | Int |  |
| paid_date | Instant |  |
| start_date | Instant |  |

### subscription_record

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| subscription_id | String | FK |
| cycle_length | Int |  |
| cycle_unit | String |  |
| end_date | Instant |  |
| expiration_date | Instant |  |
| is_end | Boolean |  |
| is_renewal | Boolean |  |
| plan_code | String |  |
| start_date | Instant |  |
| total_revenue | Int |  |

### subscription

| Column | Type | Keys |
| --- | --- | --- |
| subscription_id | String | PK |
| account_id | String | FK |

### interaction

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| account_id | String | FK |
| user_id | Unknown | FK |
| create_time | Instant |  |
| crm_account_id | String |  |
| details | String |  |
| external_id | Unknown |  |
| is_html | Boolean |  |
| modify_time | Instant |  |
| rep_email | String |  |
| rep_first_name | String |  |
| rep_last_name | String |  |
| source | String |  |
| subject | String |  |
| type | String |  |

### subscription_history

| Column | Type | Keys |
| --- | --- | --- |
| subscription_id | String | PK |
| account_id | String | PK, FK |
| subscription_subscription_id | String | FK |
| cycle_length | Int |  |
| cycle_unit | String |  |
| end_date | Instant |  |
| expiration_date | Instant |  |
| plan_code | String |  |
| revenue | Int |  |
| start_date | Instant |  |
| units | Int |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| account_id | String | PK |
| billing_account_id | String |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| churn_likelihood | Unknown |  |
| churn_reason_category | Unknown |  |
| churn_reason_item | Unknown |  |
| churn_reason_subcategory | Unknown |  |
| crm_account_id | String |  |
| csm_score | Int |  |
| current_health_score | Int |  |
| current_mrr | Int |  |
| current_nps_score | Unknown |  |
| current_stage | Unknown |  |
| description | String |  |
| employees | Int |  |
| hierarchy_label | Unknown |  |
| hierarchy_level | Int |  |
| id | Int |  |
| inactive_reason | Unknown |  |
| inactive_time | Unknown |  |
| industry | String |  |
| is_active | Boolean |  |
| is_churned | Boolean |  |
| join_date | Instant |  |
| latest_status_date | Unknown |  |
| latest_status_details | Unknown |  |
| latest_status_title | Unknown |  |
| modify_time | Instant |  |
| name | String |  |
| natero_url | String |  |
| parent_account_id | Unknown |  |
| phone | String |  |
| product | Unknown |  |
| projected_churn_date | Unknown |  |
| projected_churn_mrr | Unknown |  |
| region | Unknown |  |
| renewal_date | Unknown |  |
| sales_rep_email | String |  |
| sales_rep_name | String |  |
| source | String |  |
| support_account_id | String |  |
| tier | String |  |
| type | Unknown |  |
| website | Unknown |  |

### goal_task

| Column | Type | Keys |
| --- | --- | --- |
| task_id | Int | PK |
| goal_goal_id | Int | FK |
| completion_date | Instant |  |
| create_date | Instant |  |
| due_date | Instant |  |
| modify_time | Instant |  |
| owner_email | String |  |
| start_date | Instant |  |
| status | String |  |
| target_days_due | Int |  |
| task_name | String |  |

### goal

| Column | Type | Keys |
| --- | --- | --- |
| goal_id | Int | PK |
| account_id | String | FK |
| category | String |  |
| completion_date | Instant |  |
| create_date | Instant |  |
| due_date | Instant |  |
| goal_name | String |  |
| goal_template_id | Unknown |  |
| is_measured | Boolean |  |
| modify_time | Instant |  |
| owner_email | String |  |
| priority | String |  |
| start_date | Instant |  |
| status | String |  |
| target_date | Instant |  |
| target_days_due | Int |  |
| tasks_completed | Int |  |
| tasks_total | Int |  |
| was_auto_deployed | Unknown |  |

### deal

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| account_id | String | PK, FK |
| amount | Int |  |
| close_time | Instant |  |
| create_time | Instant |  |
| creator_email | String |  |
| creator_name | String |  |
| description | String |  |
| expected_close_time | Instant |  |
| external_id | String |  |
| external_sync_time | Instant |  |
| name | String |  |
| owner_email | String |  |
| owner_name | String |  |
| pipeline | String |  |
| product | String |  |
| source | String |  |
| source_created | String |  |
| stage | String |  |
| url | String |  |

### support_ticket

| Column | Type | Keys |
| --- | --- | --- |
| ticket_id | String | PK |
| account_id | String | FK |
| assignee_email | String |  |
| assignee_id | String |  |
| close_time | Instant |  |
| create_time | Instant |  |
| csat_label | Unknown |  |
| csat_value | Unknown |  |
| description | String |  |
| due_by_time | Unknown |  |
| fr_due_by_time | Unknown |  |
| is_spam | Boolean |  |
| last_update_time | Instant |  |
| modify_time | Instant |  |
| priority | String |  |
| source | String |  |
| state | String |  |
| subject | String |  |
| tags | Unknown |  |
| type | String |  |
| url | String |  |

### document

| Column | Type | Keys |
| --- | --- | --- |
| account_id | String | PK, FK |
| description | String |  |
| name | String |  |
| url | String |  |

### account_contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| account_id | String | FK |
| user_id | String | FK |
| email | String |  |
| email_opt_out | Boolean |  |
| first_name | String |  |
| is_active | Boolean |  |
| is_primary | Boolean |  |
| last_name | String |  |
| lead_source | String |  |
| mailing_city | String |  |
| mailing_country | String |  |
| mailing_postal_code | String |  |
| mailing_state | String |  |
| mailing_street | String |  |
| mobile_phone | Unknown |  |
| modify_time | Instant |  |
| phone | String |  |
| role | String |  |
| salutation | String |  |
| source | String |  |
| title | String |  |
| value_** |  |  |

## Relationships

- product_user(account_id) → account(account_id)
- invoice_statement_line_item(invoice_statement_invoice_id) → invoice_statement(invoice_id)
- invoice_statement(account_id) → account(account_id)
- subscription_record(subscription_id) → subscription(subscription_id)
- subscription(account_id) → account(account_id)
- interaction(user_id) → product_user(contact_user_id)
- interaction(account_id) → account(account_id)
- subscription_history(account_id) → account(account_id)
- subscription_history(subscription_subscription_id) → subscription(subscription_id)
- goal_task(goal_goal_id) → goal(goal_id)
- goal(account_id) → account(account_id)
- deal(account_id) → account(account_id)
- support_ticket(account_id) → account(account_id)
- document(account_id) → account(account_id)
- account_contact(user_id) → product_user(user_id)
- account_contact(account_id) → account(account_id)
