Auto-response
Overview
This domain has a single table, auto_response, which stores each LINE OA's auto-reply rules by
matching keywords typed by a user against the rich_message to send back.
Table auto_response
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL (INTEGER) | NO | nextval(...) | Primary key of the auto-response rule |
name | TEXT | NO | - | Rule name |
keywords | JSONB | NO | - | Keywords matched against incoming user messages |
rich_message_id | INTEGER | NO | - | Message replied with on a keyword match (FK to rich_message.id) |
organization_id | INTEGER | NO | - | Owning organization |
line_oa_id | INTEGER | NO | - | LINE OA the rule runs on |
status | "CommonStatus" | NO | active | Rule status (active, inactive, ...) |
created_date | TIMESTAMPTZ(3) | NO | now() | Creation timestamp |
created_by | INTEGER | NO | 0 | User who created the record |
updated_date | TIMESTAMPTZ(3) | YES | - | Last update timestamp (maintained automatically) |
updated_by | INTEGER | YES | 0 | User who last updated the record |
deleted_date | TIMESTAMPTZ(3) | YES | - | Soft-delete timestamp |
Notes
auto_response.rich_message_idis an FK torich_message.id.- The table is logically referenced by
tracking_log.auto_response_idfor read/click statistics on auto-replied messages (tracking_log.content_type=auto_response). - Indexes:
line_oa_id,deleted_date. line_oa_idandorganization_idare not declared as FK constraints on this model but serve as the tenant scope, as in the other tables of this domain.