# Churnkey schema ERD

Table and field reference for the Fivetran Churnkey connector.

## Table & Field Reference

### session_presented_offer

| Column | Type | Keys |
| --- | --- | --- |
| guid | Unknown | PK |
| session_id | Unknown | PK, FK |
| accepted | Unknown |  |
| accepted_at | Unknown |  |
| declined_at | Unknown |  |
| discount_config_coupon_id | Unknown |  |
| discount_config_custom_duration | Unknown |  |
| offer_type | Unknown |  |
| pause_config_interval | Unknown |  |
| pause_config_max_pause_length | Unknown |  |
| presented_at | Unknown |  |
| survey_offer | Unknown |  |

### session_accepted_offer

| Column | Type | Keys |
| --- | --- | --- |
| guid | Unknown | PK |
| session_id | Unknown | PK, FK |
| coupon_amount | Unknown |  |
| coupon_duration | Unknown |  |
| coupon_id | Unknown |  |
| coupon_type | Unknown |  |
| new_plan_id | Unknown |  |
| new_plan_price | Unknown |  |
| offer_type | Unknown |  |
| pause_duration | Unknown |  |
| pause_interval | Unknown |  |

### session_steps_viewed

| Column | Type | Keys |
| --- | --- | --- |
| guid | Unknown | PK |
| start_at | Unknown | PK |
| session_id | Unknown | PK, FK |
| duration | Unknown |  |
| end_at | Unknown |  |
| num_choices | Unknown |  |
| step_type | Unknown |  |

### customer_attribute

| Column | Type | Keys |
| --- | --- | --- |
| name | Unknown | PK |
| customer_id | Unknown | PK, FK |
| customer_session_id | Unknown | PK, FK |
| value | Unknown |  |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| session_id | Unknown | PK, FK |
| billing_interval | Unknown |  |
| billing_interval_count | Unknown |  |
| created | Unknown |  |
| currency | Unknown |  |
| email | Unknown |  |
| item_quantity | Unknown |  |
| latest_discount_expiration | Unknown |  |
| pause_end | Unknown |  |
| paused | Unknown |  |
| plan_id | Unknown |  |
| plan_price | Unknown |  |
| subscription_discount_coupon_amount | Unknown |  |
| subscription_discount_coupon_duration | Unknown |  |
| subscription_discount_coupon_id | Unknown |  |
| subscription_discount_coupon_type | Unknown |  |
| subscription_discount_end | Unknown |  |
| subscription_discount_id | Unknown |  |
| subscription_discount_start | Unknown |  |
| subscription_id | Unknown |  |
| subscription_period_end | Unknown |  |
| subscription_period_start | Unknown |  |
| subscription_start | Unknown |  |

### session

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| aborted | Unknown |  |
| abtest | Unknown |  |
| blueprint_id | Unknown |  |
| canceled | Unknown |  |
| created_at | Unknown |  |
| custom_action_handler | Unknown |  |
| discount_cooldown | Unknown |  |
| discount_cooldown_applied | Unknown |  |
| feedback | Unknown |  |
| followup_question | Unknown |  |
| followup_response | Unknown |  |
| managed_flow | Unknown |  |
| mode | Unknown |  |
| organization | Unknown |  |
| provider | Unknown |  |
| recording | Unknown |  |
| recording_end_time | Unknown |  |
| recording_start_time | Unknown |  |
| save_type | Unknown |  |
| segment_id | Unknown |  |
| sentiment_scores_emotion_a_angry | Unknown |  |
| sentiment_scores_emotion_a_confused | Unknown |  |
| sentiment_scores_emotion_a_grateful | Unknown |  |
| sentiment_scores_emotion_a_practical | Unknown |  |
| sentiment_scores_emotion_b_angry | Unknown |  |
| sentiment_scores_emotion_b_confused | Unknown |  |
| sentiment_scores_emotion_b_grateful | Unknown |  |
| sentiment_scores_emotion_b_practical | Unknown |  |
| sentiment_scores_product_a_negative | Unknown |  |
| sentiment_scores_product_a_positive | Unknown |  |
| sentiment_scores_product_b_negative | Unknown |  |
| sentiment_scores_product_b_recommend | Unknown |  |
| sentiment_scores_product_c_great | Unknown |  |
| sentiment_scores_product_c_poor | Unknown |  |
| sentiment_scores_product_d_dislike | Unknown |  |
| sentiment_scores_product_d_hate | Unknown |  |
| sentiment_scores_product_d_likes | Unknown |  |
| sentiment_scores_product_d_love | Unknown |  |
| sentiment_scores_reactivate_a_negative | Unknown |  |
| sentiment_scores_reactivate_a_reactivate | Unknown |  |
| sentiment_scores_reactivate_b_negative | Unknown |  |
| sentiment_scores_reactivate_b_reactivate | Unknown |  |
| sentiment_scores_reason_a_budget | Unknown |  |
| sentiment_scores_reason_a_ease | Unknown |  |
| sentiment_scores_reason_a_feature | Unknown |  |
| sentiment_scores_reason_a_need | Unknown |  |
| sentiment_scores_reason_a_refund | Unknown |  |
| sentiment_scores_reason_a_technical | Unknown |  |
| sentiment_scores_reason_b_budget | Unknown |  |
| sentiment_scores_reason_b_ease | Unknown |  |
| sentiment_scores_reason_b_feature | Unknown |  |
| sentiment_scores_reason_b_need | Unknown |  |
| sentiment_scores_reason_b_refund | Unknown |  |
| sentiment_scores_reason_b_technical | Unknown |  |
| sentiment_scores_subjective_a_emotional | Unknown |  |
| sentiment_scores_subjective_a_reasonable | Unknown |  |
| survey_choice_id | Unknown |  |
| survey_choice_value | Unknown |  |
| survey_id | Unknown |  |
| updated_at | Instant |  |

## Relationships

- session_presented_offer(session_id) → session(id)
- session_accepted_offer(session_id) → session(id)
- session_steps_viewed(session_id) → session(id)
- customer_attribute(customer_id) → customer(id)
- customer_attribute(customer_session_id) → customer(session_id)
- customer(session_id) → session(id)
