Auto-response
Overview
An auto-response is a rule of the form "when the user types this keyword, reply with this message", evaluated in the webhook service. It is the most direct reply mechanism in the platform, compared with trigger rules, workflows, or AI-generated answers, which carry far more complex conditions.
Because several of these mechanisms can match the same incoming message, the order of
precedence is configured on line_oa.message_handling_config, whose default value is
{"priority":"auto_response_only"}.
Core Data Structure
auto_response (model AutoResponse)
name— the rule name shown in the management screenskeywordsJSONB — the list of matching keywords, stored as a JSON array rather than in a separate tablerich_message_id→rich_message.id— the message to reply withline_oa_idandorganization_id— the scope of the rulestatus(CommonStatus, defaultactive) with soft delete viadeleted_date- indexes on
(line_oa_id)and(deleted_date)
When a user taps a link inside an auto-reply, the click is recorded as a tracking_log
row with content_type = 'auto_response' and a reference to auto_response_id, so each
rule can be measured independently.
Related Files
prisma/schema.prisma:694— modelAutoResponseprisma/schema.prisma:113— enumContentType(includesauto_response)schema-dumps/2026-07-24/schema.sql:1068
Connections to Other Services
- webhook-go — the primary consumer: receives message events, matches keywords, sends replies
- cms-api-go — CRUD for the rules through the
auto-responsemodule
Related domains: Message Library (the reply content), Click Tracking (click statistics), Trigger Rules, and AI Knowledge Base, which compete to answer under the same precedence setting.