LINE Official Account (Channel)
Overview
This domain has two tables: line_oa stores the connection details of each LINE Official Account
channel (credentials, webhook, follower-sync settings, GA tracking, message-handling priority), and
line_oa_app stores the on/off state and configuration of add-on apps per organization.
Table line_oa
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | INTEGER | NOT NULL | nextval (serial) | Primary key of the LINE OA channel |
organization_id | INTEGER | NOT NULL | – | Organization owning the channel (FK to organization.id) |
line_oa_name | TEXT | NOT NULL | – | Display name of the LINE OA inside the CMS |
line_oa_hash | TEXT | NULL | – | Hash used to reference the OA publicly (appears in public URLs) |
channel_access_token | TEXT | NOT NULL | – | Channel access token for calling the LINE Messaging API |
channel_id | TEXT | NOT NULL | – | Channel ID from LINE Developers |
channel_secret_id | TEXT | NOT NULL | – | Channel secret, used to verify webhook signatures |
channel_name | TEXT | NOT NULL | – | Channel name as configured in LINE Developers |
bot_basic_id | TEXT | NOT NULL | – | Bot basic ID (format @xxxxxxx) |
premium_id | TEXT | NULL | – | Premium ID of the OA, if one was purchased |
sync_follower_status | SyncFollowerStatus (enum) | NOT NULL | no_action | Follower-sync state: no_action, active, processing, completed, failed |
sync_follower_logs | TEXT | NULL | – | Log/result message from the most recent follower sync |
last_sync_followers_date | TIMESTAMPTZ(3) | NULL | – | Timestamp of the last successful follower sync |
webhook_id | TEXT | NOT NULL | – | System-generated webhook identifier, used as the webhook URL path |
forward_webhook_url | TEXT | NULL | '' | Destination URL for forwarding events to an external system (empty = no forwarding) |
cover | TEXT | NOT NULL | '' | URL/path of the OA cover image |
line_login_info | JSONB | NULL | – | LINE Login channel details linked to this OA |
audience_refresh_enabled | BOOLEAN | NOT NULL | false | Whether automatic audience-membership refresh is enabled |
audience_refresh_interval | INTEGER | NOT NULL | 60 | Audience refresh interval in minutes |
ga_tracking_enabled | BOOLEAN | NOT NULL | false | Whether tracking parameters are appended for Google Analytics |
ga_identity_param | VARCHAR(50) | NOT NULL | 'lid' | Query-parameter name used to pass identity to GA |
message_handling_config | JSONB | NOT NULL | {"priority": "auto_response_only"} | Priority configuration for handling inbound messages |
status | CommonStatus (enum) | NOT NULL | – | Channel status (active, inactive, delete, etc.) |
created_date | TIMESTAMPTZ(3) | NOT NULL | CURRENT_TIMESTAMP | Creation timestamp |
created_by | INTEGER | NOT NULL | 0 | User id of the creator |
updated_date | TIMESTAMPTZ(3) | NULL | – | Last update timestamp (Prisma @updatedAt) |
updated_by | INTEGER | NULL | 0 | User id of the last editor |
deleted_date | TIMESTAMPTZ(3) | NULL | – | Soft-delete timestamp |
Table line_oa_app
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | INTEGER | NOT NULL | nextval (serial) | Primary key |
organization_id | INTEGER | NOT NULL | – | Organization that enabled this app |
app_id | VARCHAR(50) | NOT NULL | – | Add-on app identifier (string key) |
enabled | BOOLEAN | NOT NULL | false | Whether the app is enabled |
config | JSONB | NULL | – | App-specific configuration |
created_by | INTEGER | NULL | – | User id of the creator |
created_date | TIMESTAMPTZ(3) | NOT NULL | CURRENT_TIMESTAMP | Creation timestamp |
updated_date | TIMESTAMPTZ(3) | NULL | – | Last update timestamp |
Notes
- Foreign key:
line_oa.organization_id->organization.id.line_oais in turn referenced vialine_oa_idby many tables, includingline_user,campaign,rich_message,rich_menu,tracking_log,template_message,tracking_token,form_builder,menu_builder,attribute_master,content_page,content_category,content_linkandfriend_track_campaign. - Indexes on
line_oa:(webhook_id, status, organization_id),(line_oa_hash, status, organization_id)anddeleted_date. The first two support channel lookup on inbound webhooks and on public URL resolution. line_oa_appis scoped to the organization, not to a channel — it has noline_oa_idcolumn despite the table name prefix. It carries a unique constraint on(organization_id, app_id)and an index onorganization_id.message_handling_configis a JSON object with aprioritykey; the default value isauto_response_only.channel_access_tokenandchannel_secret_idare secrets — they must not be logged or exposed through public APIs.- There is no separate mbox table in this domain. The previous placeholder for this page
mentioned mbox, but the real schema contains only
line_oaandline_oa_app.