Skip to main content

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 screens
  • keywords JSONB — the list of matching keywords, stored as a JSON array rather than in a separate table
  • rich_message_idrich_message.id — the message to reply with
  • line_oa_id and organization_id — the scope of the rule
  • status (CommonStatus, default active) with soft delete via deleted_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.

  • prisma/schema.prisma:694 — model AutoResponse
  • prisma/schema.prisma:113 — enum ContentType (includes auto_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-response module

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.