Rich Menu
Overview
This domain has four tables: rich_menu (the definition of an active rich menu),
rich_menu_action (the tappable areas of each rich menu), rich_menu_member (the LINE users linked
to a rich menu), and rich_menu_archive (copies of rich menus that were replaced or expired, with a
column structure identical to rich_menu).
Table rich_menu
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL (INTEGER) | NO | nextval(...) | Primary key of the rich menu |
line_oa_id | INTEGER | NO | - | Owning LINE OA (FK to line_oa.id) |
line_rich_menu_id | TEXT | YES | - | Rich menu ID returned by the LINE Platform after successful creation |
thumbnail | TEXT | NO | - | URL of the rich menu background/thumbnail image |
audience_id | INTEGER | YES | - | Audience that sees this rich menu (FK to audience.id) |
parent_id | INTEGER | YES | - | Parent rich menu when this is a submenu reached by switching |
title | TEXT | NO | - | Rich menu name |
custom_label | TEXT | YES | - | Text shown on the menu open/close bar (chat bar text) |
layout | INTEGER | NO | - | Layout id describing how the menu area is divided |
status | "CommonStatus" | NO | processing | Rich menu status (processing, active, inactive, failed, ...) |
type | "RichMenuType" | NO | custom | Menu type: guest, member, custom, default, switch |
complete_link_user | BOOLEAN | NO | - | Whether linking the menu to every user in the audience has finished |
total | INTEGER | YES | 0 | Number of users linked to this rich menu |
start_date | TIMESTAMPTZ(3) | YES | - | When the menu starts being displayed |
end_date | TIMESTAMPTZ(3) | YES | - | When the menu stops being displayed |
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 |
container_original | JSONB | YES | - | Original rich menu structure submitted to the LINE Platform |
reason | TEXT | YES | '' | Reason accompanying the status, e.g. why creation failed |
rich_menu_actions | JSONB | YES | - | JSON copy of all actions (used alongside the rich_menu_action table) |
template_tracking | JSONB | YES | - | Mapping used to track taps on each area of the menu |
is_for_automation | BOOLEAN | NO | false | Whether the menu was created for automation/workflow use |
Table rich_menu_action
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL (INTEGER) | NO | nextval(...) | Primary key of the action |
rich_menu_id | INTEGER | NO | - | Rich menu owning the action (FK to rich_menu.id) |
index | INTEGER | NO | - | Position of the tappable area within the menu |
type | "RichMenuActionType" | NO | - | Action type: message, uri, tel, postback, datetimepicker, camera, cameraroll, location, richmenu, no_action, alias |
label | TEXT | YES | - | Label of the tappable area |
link | TEXT | YES | - | Action target such as a URL, message text, or postback data |
tracking_key | TEXT | NO | - | Key used to track taps on this area |
boundary | JSONB | YES | - | Bounds of the tappable area on the image (x, y, width, height) |
rich_menu_alias | INTEGER | YES | - | Destination rich menu when the action switches menus |
rich_menu_archive_id | INTEGER | YES | - | Archived rich menu owning the action (FK to rich_menu_archive.id) |
is_tracking | BOOLEAN | NO | false | Whether taps on this area are tracked |
Table rich_menu_member
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL (INTEGER) | NO | nextval(...) | Primary key of the member record |
rich_menu_id | INTEGER | NO | - | Rich menu linked to these members (FK to rich_menu.id) |
line_user_id | JSONB | NO | - | LINE user IDs linked to the rich menu (stored as a JSON array so many users can be linked at once) |
rich_menu_archive_id | INTEGER | YES | - | Related archived rich menu (FK to rich_menu_archive.id) |
Table rich_menu_archive
Column-for-column identical to rich_menu. It stores copies of rich menus that were replaced or
retired so that tracking_log can still reference them historically.
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL (INTEGER) | NO | nextval(...) | Primary key of the archived rich menu |
line_oa_id | INTEGER | NO | - | Owning LINE OA (FK to line_oa.id) |
line_rich_menu_id | TEXT | YES | - | Rich menu ID on the LINE Platform |
thumbnail | TEXT | NO | - | URL of the rich menu background/thumbnail image |
audience_id | INTEGER | YES | - | Audience that saw this rich menu (FK to audience.id) |
parent_id | INTEGER | YES | - | Parent rich menu when this was a submenu |
title | TEXT | NO | - | Rich menu name |
custom_label | TEXT | YES | - | Text shown on the menu open/close bar |
layout | INTEGER | NO | - | Layout id describing how the menu area is divided |
status | "CommonStatus" | NO | processing | Rich menu status at the time it was archived |
type | "RichMenuType" | NO | custom | Menu type: guest, member, custom, default, switch |
complete_link_user | BOOLEAN | NO | - | Whether linking the menu to users had finished |
total | INTEGER | YES | 0 | Number of users that were linked to this rich menu |
start_date | TIMESTAMPTZ(3) | YES | - | When the menu started being displayed |
end_date | TIMESTAMPTZ(3) | YES | - | When the menu stopped being displayed |
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 |
container_original | JSONB | YES | - | Original rich menu structure submitted to the LINE Platform |
reason | TEXT | YES | '' | Reason accompanying the status |
rich_menu_actions | JSONB | YES | - | JSON copy of all actions |
template_tracking | JSONB | YES | - | Mapping used to track taps on each area of the menu |
is_for_automation | BOOLEAN | NO | false | Whether the menu was created for automation/workflow use |
Notes
rich_menu_actionandrich_menu_membercarry FKs to bothrich_menu.id(required) andrich_menu_archive.id(optional), so the same table serves both live and archived menus.rich_menuandrich_menu_archiveboth have FKs toline_oa.idandaudience.id, and are referenced back bytracking_log.rich_menu_id/tracking_log.rich_menu_archive_id.parent_idandrich_menu_aliasare not declared as FK constraints in the schema (they logically refer torich_menu.id); they support multi-level menus that switch between each other.- Indexes on
rich_menuandrich_menu_archive:line_oa_id,deleted_date. rich_menu_actionandrich_menu_memberhave no audit columns (created/updated/deleted) because their lifecycle follows the parent table.