Skip to main content

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

ColumnTypeNullableDefaultDescription
idSERIAL (INTEGER)NOnextval(...)Primary key of the rich menu
line_oa_idINTEGERNO-Owning LINE OA (FK to line_oa.id)
line_rich_menu_idTEXTYES-Rich menu ID returned by the LINE Platform after successful creation
thumbnailTEXTNO-URL of the rich menu background/thumbnail image
audience_idINTEGERYES-Audience that sees this rich menu (FK to audience.id)
parent_idINTEGERYES-Parent rich menu when this is a submenu reached by switching
titleTEXTNO-Rich menu name
custom_labelTEXTYES-Text shown on the menu open/close bar (chat bar text)
layoutINTEGERNO-Layout id describing how the menu area is divided
status"CommonStatus"NOprocessingRich menu status (processing, active, inactive, failed, ...)
type"RichMenuType"NOcustomMenu type: guest, member, custom, default, switch
complete_link_userBOOLEANNO-Whether linking the menu to every user in the audience has finished
totalINTEGERYES0Number of users linked to this rich menu
start_dateTIMESTAMPTZ(3)YES-When the menu starts being displayed
end_dateTIMESTAMPTZ(3)YES-When the menu stops being displayed
created_dateTIMESTAMPTZ(3)NOnow()Creation timestamp
created_byINTEGERNO0User who created the record
updated_dateTIMESTAMPTZ(3)YES-Last update timestamp (maintained automatically)
updated_byINTEGERYES0User who last updated the record
deleted_dateTIMESTAMPTZ(3)YES-Soft-delete timestamp
container_originalJSONBYES-Original rich menu structure submitted to the LINE Platform
reasonTEXTYES''Reason accompanying the status, e.g. why creation failed
rich_menu_actionsJSONBYES-JSON copy of all actions (used alongside the rich_menu_action table)
template_trackingJSONBYES-Mapping used to track taps on each area of the menu
is_for_automationBOOLEANNOfalseWhether the menu was created for automation/workflow use

Table rich_menu_action

ColumnTypeNullableDefaultDescription
idSERIAL (INTEGER)NOnextval(...)Primary key of the action
rich_menu_idINTEGERNO-Rich menu owning the action (FK to rich_menu.id)
indexINTEGERNO-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
labelTEXTYES-Label of the tappable area
linkTEXTYES-Action target such as a URL, message text, or postback data
tracking_keyTEXTNO-Key used to track taps on this area
boundaryJSONBYES-Bounds of the tappable area on the image (x, y, width, height)
rich_menu_aliasINTEGERYES-Destination rich menu when the action switches menus
rich_menu_archive_idINTEGERYES-Archived rich menu owning the action (FK to rich_menu_archive.id)
is_trackingBOOLEANNOfalseWhether taps on this area are tracked

Table rich_menu_member

ColumnTypeNullableDefaultDescription
idSERIAL (INTEGER)NOnextval(...)Primary key of the member record
rich_menu_idINTEGERNO-Rich menu linked to these members (FK to rich_menu.id)
line_user_idJSONBNO-LINE user IDs linked to the rich menu (stored as a JSON array so many users can be linked at once)
rich_menu_archive_idINTEGERYES-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.

ColumnTypeNullableDefaultDescription
idSERIAL (INTEGER)NOnextval(...)Primary key of the archived rich menu
line_oa_idINTEGERNO-Owning LINE OA (FK to line_oa.id)
line_rich_menu_idTEXTYES-Rich menu ID on the LINE Platform
thumbnailTEXTNO-URL of the rich menu background/thumbnail image
audience_idINTEGERYES-Audience that saw this rich menu (FK to audience.id)
parent_idINTEGERYES-Parent rich menu when this was a submenu
titleTEXTNO-Rich menu name
custom_labelTEXTYES-Text shown on the menu open/close bar
layoutINTEGERNO-Layout id describing how the menu area is divided
status"CommonStatus"NOprocessingRich menu status at the time it was archived
type"RichMenuType"NOcustomMenu type: guest, member, custom, default, switch
complete_link_userBOOLEANNO-Whether linking the menu to users had finished
totalINTEGERYES0Number of users that were linked to this rich menu
start_dateTIMESTAMPTZ(3)YES-When the menu started being displayed
end_dateTIMESTAMPTZ(3)YES-When the menu stopped being displayed
created_dateTIMESTAMPTZ(3)NOnow()Creation timestamp
created_byINTEGERNO0User who created the record
updated_dateTIMESTAMPTZ(3)YES-Last update timestamp (maintained automatically)
updated_byINTEGERYES0User who last updated the record
deleted_dateTIMESTAMPTZ(3)YES-Soft-delete timestamp
container_originalJSONBYES-Original rich menu structure submitted to the LINE Platform
reasonTEXTYES''Reason accompanying the status
rich_menu_actionsJSONBYES-JSON copy of all actions
template_trackingJSONBYES-Mapping used to track taps on each area of the menu
is_for_automationBOOLEANNOfalseWhether the menu was created for automation/workflow use

Notes

  • rich_menu_action and rich_menu_member carry FKs to both rich_menu.id (required) and rich_menu_archive.id (optional), so the same table serves both live and archived menus.
  • rich_menu and rich_menu_archive both have FKs to line_oa.id and audience.id, and are referenced back by tracking_log.rich_menu_id / tracking_log.rich_menu_archive_id.
  • parent_id and rich_menu_alias are not declared as FK constraints in the schema (they logically refer to rich_menu.id); they support multi-level menus that switch between each other.
  • Indexes on rich_menu and rich_menu_archive: line_oa_id, deleted_date.
  • rich_menu_action and rich_menu_member have no audit columns (created/updated/deleted) because their lifecycle follows the parent table.