docs: record csat public send checkpoint

This commit is contained in:
2026-06-05 08:32:58 +08:00
parent ef3a90959d
commit 5c771d8c2c
+22 -19
View File
@@ -16,9 +16,9 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc
## Current Baseline
- Latest implementation checkpoint: `f441680 feat(csat): align account report payloads`.
- Latest documentation checkpoint before this update: `fca6838 docs: record csat report checkpoint`.
- Worktree status at this planning checkpoint: clean after `fca6838`; next active slice is B8 public CSAT submit/update and resolve-triggered send parity.
- Latest implementation checkpoint: `ef3a909 feat(csat): send surveys on resolved conversations`.
- Latest documentation checkpoint before this update: `bda5ad5 docs: expand parity execution plan`.
- Worktree status at this planning checkpoint: clean after `ef3a909`; next active slice is B8 CSAT download/export parity.
- `go test ./...` passes.
- Route dump succeeds with `TOTAL: 830` after adding the Chatwoot-compatible applied-SLA index route.
- Route parity artifacts now exist under `docs/parity/` and are generated by `cmd/route_parity`.
@@ -59,7 +59,7 @@ Next ordered checkpoints:
| Phase 1 | Meilisearch search engine | Review | B6 payload parity, optional live gate, and DB-fallback hardening are implemented; an actual live Meilisearch run is optional and environment-dependent |
| Phase 2 | Route and controller parity audit | Doing | Ruby/Bundler unavailable, so Chatwoot route extraction currently uses static `routes.rb` fallback |
| Phase 3 | Data and serializer parity | Doing | JSON fixture coverage is partial and still endpoint-family based |
| Phase 4 | Enterprise feature completion | Doing | B7 is in Review; B8 account-side CSAT report list/metrics/review-note payload parity is implemented; public CSAT/send/download depth remains active |
| Phase 4 | Enterprise feature completion | Doing | B7 is in Review; B8 account-side CSAT report payloads, public submit/update idempotency, and resolve-triggered survey send are implemented; CSAT download depth remains active |
| Phase 5 | Background jobs and integrations | Planned | durable worker choice and job parity are open |
| Phase 6 | Core placeholder burn-down | Doing | account/contact/conversation/message/inbox placeholder groups remain broad |
| Phase 7 | Verification harness | Planned | search live gate and reused-frontend smoke harness are not complete |
@@ -130,12 +130,14 @@ This ledger records the committed parity checkpoints that future slices should b
| `9e0826b docs: record sla notification checkpoint` | Recorded the B7.6 SLA notification checkpoint, moved B7 to Review, and set B8 as the next active enterprise slice. | Documentation-only checkpoint after `d23f3f0`; `git diff --check` passed before commit. | Continue B8 CSAT account/public/report/send parity. |
| `f441680 feat(csat): align account report payloads` | Started B8 with account-side CSAT report parity: `GET /csat_survey_responses` now returns the raw Chatwoot array of CSAT response serializers; list and metrics filters accept frontend `since/until`, `user_ids`, `inbox_id`, `team_id`, and `rating`; metrics now returns `total_count`, `ratings_count`, and `total_sent_messages_count`; CSAT update/review-note responses return the Chatwoot CSAT response serializer with nested contact, assigned agent, reviewer, display conversation ID, and Unix timestamps. | `go test ./internal/handler/api/v1 -run CsatSurvey -count=1`; `go test ./internal/automation -run CsatSurveyService -count=1`; `go test ./internal/handler/api/v1 -count=1`; `go test ./internal/automation -count=1`; `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 830`. | Continue B8 with public CSAT submit/update lock regression, resolve-triggered survey send idempotency, and download CSV parity. |
| `fca6838 docs: record csat report checkpoint` | Recorded the B8.1 CSAT report checkpoint in this tracker, moved B8 to Doing, and made B8.2/B8.3 the next active implementation slices. | Documentation-only checkpoint after `f441680`; `git diff --check` passed before commit. | Continue B8 public CSAT submit/update, resolve-triggered survey send idempotency, and CSAT download parity. |
| `bda5ad5 docs: expand parity execution plan` | Expanded this tracker with executable B8-B12 breakdowns for CSAT, automation/macros, audit/custom roles/limits, Captain/Copilot, and reused frontend smoke validation. | Documentation-only checkpoint; `git diff --check HEAD~1 HEAD` passed. | Continue B8 public CSAT submit/update and resolve-triggered send parity. |
| `ef3a909 feat(csat): send surveys on resolved conversations` | Advanced B8 public/send parity: public CSAT update now accepts the reused survey frontend's object-shaped `message.submitted_values`, keeps one message-linked CSAT response per `input_csat` message across repeated submissions, and still enforces the 14-day message-date lock. The resolve listener now loads the resolved conversation, checks inbox CSAT enablement and survey label rules, creates one Chatwoot-style `input_csat` template message with inbox CSAT content/display type, and no longer creates pending rating-0 responses before customer submission. Message-updated events also build CSAT responses from `submitted_values` when present. | `go test ./internal/automation -run 'CsatSurveyListener\|CsatSurveyService' -count=1`; `go test ./internal/handler/api/v1 -run CsatSurvey -count=1`; `go test ./internal/handler/widget -run 'CSAT\|Csat\|PublicInbox' -count=1`; `go test ./internal/service -run Widget -count=1`; `go test ./internal/automation -count=1`; `go test ./internal/handler/api/v1 -count=1`; `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 830`. | Continue B8.4 CSAT download CSV parity and then review channel-specific WhatsApp/Twilio template send hooks as broader integration work. |
## Next Slice Contract
Completed implementation slice: B5.1-B5.5 now cover inbox serializer shape, Chatwoot frontend create/update binding, working-hours persistence, out-of-office behavior, inbox member assignment payload/mutation semantics, channel-specific config depth, AgentCapacityPolicy/InboxCapacityLimit API data contracts, and dedicated Email/Twilio/LINE channel route response shapes. B6 is now in Review after `a16c23c` and `f08c743`: Chatwoot search response envelopes, frontend query params, Meilisearch sender filters, mocked hit serialization, env-gated live Meilisearch validation, release-mode DB fallback rejection, and reindex Meilisearch-only guard are covered. B7 is now in Review after `a98dc2c`, `95224fa`, `a11bb96`, `213bf2b`, `4f85ef1`, and `d23f3f0`, enforcing per-inbox capacity limits, aligning SLA policy CRUD payloads, persisting applied SLA records, making core FRT/NRT/RT breach events idempotent, aligning the applied-SLA reports API, and creating SLA miss notifications. B3 and B4 remain in review for deeper side effects and browser validation.
Next implementation slice: start B8 CSAT account/public/report/send parity.
Next implementation slice: continue B8 with CSAT download/export parity.
| Step | Required result | Reference source | Verification |
| --- | --- | --- | --- |
@@ -147,7 +149,7 @@ Next implementation slice: start B8 CSAT account/public/report/send parity.
| N6 | Keep SLA timer and breach lifecycle as current SLA lifecycle baseline. | `reference/chatwoot/enterprise/app/services/sla/evaluate_applied_sla_service.rb`, `SlaEvent`, SLA processing jobs. | Done by `213bf2b`; active applied SLAs create idempotent FRT/NRT/RT miss events, transition to `active_with_misses`, `hit`, or `missed`, and preserve status on repeated evaluation. |
| N7 | Keep applied-SLA report/list payload parity as the current SLA reports baseline. | `reference/chatwoot/enterprise/app/controllers/api/v1/accounts/applied_slas_controller.rb`, applied-SLA index/metrics/download views, dashboard SLA reports client. | Done by `4f85ef1`; account-side applied-SLA list/report filters return frontend-compatible payloads and metrics/download shapes. |
| N8 | Keep B7.6 SLA notification and timing review as current SLA closeout baseline. | `Sla::EvaluateAppliedSlaService`, `SlaEvent#create_notifications`, SLA processing jobs. | Done by `d23f3f0`; SLA miss notifications fan out to participants/admins/assignee, repeated evaluation is idempotent, and current reference timing for `only_during_business_hours` is covered. |
| N9 | Keep B8.1 account-side CSAT report payload parity as the current CSAT baseline. | `CsatSurveyResponsesController`, CSAT response Jbuilder, dashboard `csatReports.js`, CSAT store. | Done by `f441680`; list/metrics/review-note payloads and filters match the reused frontend contract. |
| N9 | Keep B8.1-B8.3 CSAT account/public/send parity as the current CSAT baseline. | `CsatSurveyResponsesController`, public CSAT controller/views, `CsatSurveyService`, `CsatSurveyListener`, dashboard reports and survey frontend clients. | Done by `f441680` and `ef3a909`; list/metrics/review-note payloads, public object-shaped submission, lock window, response idempotency, and resolve-triggered message send are covered. |
| N10 | Update this tracker after every implementation checkpoint. | This document. | `git diff --check`; `go test ./...` for Go changes. |
Current B2 profile checkpoint:
@@ -366,8 +368,8 @@ Upcoming enterprise task boards:
| Slice | Step | Implementation target | Reference source | Required tests | Status |
| --- | --- | --- | --- | --- | --- |
| B8 | B8.1 | Align account-side CSAT survey response index, metrics, filters, pagination, and review-note payloads. | `reference/chatwoot/app/controllers/api/v1/accounts/csat_survey_responses_controller.rb`, CSAT Jbuilder/views, dashboard reports clients. | Handler/service tests for list, metrics, review note update, date/agent/inbox/team/rating filters. | Done by `f441680` |
| B8 | B8.2 | Align public CSAT submit/update flow, lock window, message linkage, and one-response-per-message behavior. | `reference/chatwoot/app/controllers/public/api/v1/csat_survey_controller.rb`, CSAT response model/services. | Public handler tests for submit, update within window, update after lock, duplicate response rejection. | Todo |
| B8 | B8.3 | Wire resolve-triggered CSAT survey send with idempotency and channel-aware message creation. | Chatwoot CSAT listener/jobs and inbox CSAT settings. | Listener tests prove one CSAT message per resolved conversation and no send when disabled. | Todo |
| B8 | B8.2 | Align public CSAT submit/update flow, lock window, message linkage, and one-response-per-message behavior. | `reference/chatwoot/app/controllers/public/api/v1/csat_survey_controller.rb`, CSAT response model/services. | Public handler tests for submit, update within window, update after lock, duplicate response rejection. | Done by `ef3a909` |
| B8 | B8.3 | Wire resolve-triggered CSAT survey send with idempotency and channel-aware message creation. | Chatwoot CSAT listener/jobs and inbox CSAT settings. | Listener tests prove one CSAT message per resolved conversation and no send when disabled. | Done by `ef3a909`; WhatsApp/Twilio external template dispatch remains integration follow-up |
| B8 | B8.4 | Align CSAT downloads/export payloads used by reports screens. | CSAT report/download controller paths and frontend report API. | CSV/download tests cover filters and frontend column names. | Todo |
| B9 | B9.1 | Align automation rule CRUD payloads, validation, condition groups, and event names. | Chatwoot automation rule controllers/models and dashboard automation builder. | Handler/service tests for create/update/list/show/delete and validation errors. | Todo |
| B9 | B9.2 | Implement automation action side effects for labels, status, priority, assignee/team, custom attributes, private notes, and snooze. | Chatwoot automation action services/listeners. | Rule listener tests assert real conversation mutations and stop-on-match behavior. | Todo |
@@ -386,11 +388,11 @@ B8 CSAT execution breakdown:
| Step | Implementation target | Reference source | Required tests | Status |
| --- | --- | --- | --- | --- |
| B8.2a | Re-audit public CSAT payload shape against Rails controller and Jbuilder views, including `display_type`, `content`, inbox identity, locale, message ID, conversation ID, and nested `csat_survey_response`. | `reference/chatwoot/app/controllers/public/api/v1/csat_survey_controller.rb`, `show.json.jbuilder`, `update.json.jbuilder`, `_csat_survey.json.jbuilder`. | Public show/update handler fixture tests assert exact Chatwoot keys and no local response envelope. | Todo |
| B8.2b | Enforce Chatwoot's 14-day date lock from the CSAT message creation date, and keep public inbox message update on the same lock path. | `CsatSurveyController#update`, public inbox messages controller, `input_csat` message behavior. | Public CSAT and public inbox update tests cover within-window success and after-window `422`. | Todo |
| B8.2c | Make response creation/update message-linked and idempotent: one CSAT response per `input_csat` message, updates mutate the existing response, and repeated public submissions do not create extra rows. | `CsatSurveys::ResponseBuilder`, `Message#csat_survey_response`, CSAT response model uniqueness. | Service tests count rows after repeated public updates and assert message/contact/conversation/assignee linkage. | Todo |
| B8.3a | Replace the current resolve listener placeholder with Chatwoot-style survey message creation when an inbox has CSAT enabled. | `reference/chatwoot/app/listeners/csat_survey_listener.rb`, `CsatSurveyService`, inbox CSAT settings. | Listener tests prove disabled inboxes do not send, enabled inboxes create exactly one `input_csat` outgoing message, and repeated resolve events are idempotent. | Todo |
| B8.3b | Keep CSAT survey sending inside a clear job boundary even if execution remains synchronous for now, so durable worker migration can happen under Phase 5 without changing behavior. | Chatwoot listener/job boundary and existing Go channel dispatcher. | Unit tests cover enqueue/perform boundary or documented synchronous fallback with idempotency. | Todo |
| B8.2a | Re-audit public CSAT payload shape against Rails controller and Jbuilder views, including `display_type`, `content`, inbox identity, locale, message ID, conversation ID, and nested `csat_survey_response`. | `reference/chatwoot/app/controllers/public/api/v1/csat_survey_controller.rb`, `show.json.jbuilder`, `update.json.jbuilder`, `_csat_survey.json.jbuilder`. | Public show/update handler fixture tests assert exact Chatwoot keys and no local response envelope. | Done by `ef3a909` |
| B8.2b | Enforce Chatwoot's 14-day date lock from the CSAT message creation date, and keep public inbox message update on the same lock path. | `CsatSurveyController#update`, public inbox messages controller, `input_csat` message behavior. | Public CSAT and public inbox update tests cover within-window success and after-window `422`. | Done by `ef3a909` |
| B8.2c | Make response creation/update message-linked and idempotent: one CSAT response per `input_csat` message, updates mutate the existing response, and repeated public submissions do not create extra rows. | `CsatSurveys::ResponseBuilder`, `Message#csat_survey_response`, CSAT response model uniqueness. | Service tests count rows after repeated public updates and assert message/contact/conversation/assignee linkage. | Done by `ef3a909` |
| B8.3a | Replace the current resolve listener placeholder with Chatwoot-style survey message creation when an inbox has CSAT enabled. | `reference/chatwoot/app/listeners/csat_survey_listener.rb`, `CsatSurveyService`, inbox CSAT settings. | Listener tests prove disabled inboxes do not send, enabled inboxes create exactly one `input_csat` outgoing message, and repeated resolve events are idempotent. | Done by `ef3a909` |
| B8.3b | Keep CSAT survey sending inside a clear job boundary even if execution remains synchronous for now, so durable worker migration can happen under Phase 5 without changing behavior. | Chatwoot listener/job boundary and existing Go channel dispatcher. | Unit tests cover enqueue/perform boundary or documented synchronous fallback with idempotency. | Review; `ef3a909` isolates behavior in `SendSurveyForConversation`, durable queue remains Phase 5 |
| B8.4a | Align CSAT download CSV with Chatwoot report filters and columns, including review notes where the frontend exposes them. | CSAT report/download controller, dashboard reports API. | CSV tests cover date, agent, inbox, team, rating filters and expected column names/order. | Todo |
B9 automation and macro execution breakdown:
@@ -516,7 +518,7 @@ Work proceeds top-down unless a failing test or frontend blocker forces a narrow
| B5 | Inbox/channel behavior fixtures. | Chatwoot inbox/channel controllers and channel models. | Fixture tests for inbox CRUD, settings, business hours, members, avatar, channel config. | Done |
| B6 | Meilisearch live-shape review. | Chatwoot frontend search usage and search controllers. | Meilisearch-backed response fixtures plus optional live integration gate. | Review |
| B7 | SLA and assignment capacity. | Chatwoot enterprise SLA and assignment policy behavior. | Unit/integration tests for SLA state, breach, assignment capacity, policy selection. | Review |
| B8 | CSAT account-side completion. | Chatwoot CSAT survey responses, reports, downloads, listeners. | Metrics/list/review/download/send idempotency tests. | Doing |
| B8 | CSAT account/public/send completion. | Chatwoot CSAT survey responses, reports, downloads, listeners. | Metrics/list/review/download/send idempotency tests. | Doing |
| B9 | Automation/macros durable side effects. | Chatwoot automation/macro services and jobs. | Action execution, logs, webhook/email transcript retry tests. | Todo |
| B10 | Audit, CustomRole, InboxLimit. | Chatwoot enterprise admin behavior and policies. | Authorization, audit emission, limits enforcement, admin payload fixtures. | Todo |
| B11 | Captain/Copilot deep behavior. | Chatwoot Captain/Copilot controllers, services, frontend clients. | Assistant/tool/document/scenario/copilot thread/task tests and feature gates. | Todo |
@@ -528,7 +530,7 @@ Remaining slice landing plan:
| --- | --- | --- | --- |
| B6 | Compare current Meilisearch document fields and global/entity search payloads against Chatwoot frontend consumers. | Add optional live Meilisearch integration gate, tighten account-scoped filters, and document DB fallback as development-only. | Done only after mocked tests and live-shape review prove search payloads work without DB-only assumptions. |
| B7 | Done: assignment capacity enforcement, SLA policy CRUD payload parity, applied-SLA conversation persistence, idempotent SLA breach lifecycle, applied-SLA report/list payload parity, and SLA miss notification fan-out. | Capacity-aware assignment policy binding review and durable SLA job scheduling remain broader Phase 5/P4.9 follow-ups, not hidden SLA gaps. | Review after `d23f3f0`; move to Done only after assignment policy binding review is either implemented or split out of B7. |
| B8 | Done: account-side CSAT list/metrics/review-note payload parity. | Resolve-triggered survey send idempotency, report/download filters, public/update lock regression, channel-specific send hooks. | Done only after account APIs, public APIs, and resolve listener agree on one message-linked response model. |
| B8 | Done: account-side CSAT list/metrics/review-note payload parity, public submit/update idempotency, and resolve-triggered generic survey message send. | CSAT download filters/CSV and channel-specific WhatsApp/Twilio template send hooks. | Done only after account APIs, public APIs, resolve listener, and CSV/download behavior agree on one message-linked response model; external template dispatch may remain a named Phase 5 integration gap. |
| B9 | Macro execution side effects for labels, status, assignee/team, priority, private notes, and attachments. | Automation rule condition/action parity, execution logs, webhook delivery retry, email transcript delivery, stop-on-match semantics. | Done only after actions mutate real conversations and async external actions are retryable or explicitly feature-gated. |
| B10 | Audit list payload and audit writer boundary for representative mutating core resources. | CustomRole permission-key parity, AccountUser permission resolution, InboxLimit enforcement in inbox/channel creation paths. | Done only after authorization tests prove admin-only surfaces and non-admin denial shapes match Chatwoot. |
| B11 | Captain Assistant CRUD, inbox binding, responses, documents, and custom tools payload fixtures. | Copilot threads/messages/tasks, playground/tool-call behavior, document sync/embedding feature gates, streaming fallback. | Done only after LLM-dependent behavior is either implemented behind config or safely stubbed with frontend-compatible disabled states. |
@@ -810,7 +812,7 @@ Enterprise tracking table:
| P4.4 | Agent capacity | `internal/model/agent_capacity_policy.go`, `internal/service/agent_capacity_policy_service.go`, `internal/handler/api/v1/agent_capacity_handler.go`, `internal/autoassignment/*` | First align AgentCapacityPolicy API, serializers, nested users, and `InboxCapacityLimit` data contracts; then enforce capacity in manual/auto assignment. | Review |
| P4.5 | Inbox limits | `internal/model/agent_capacity_policy.go` `InboxCapacityLimit`, plus legacy `internal/model/inbox_limit.go`, `internal/service/inbox_limit_service.go`, `internal/repository/inbox_limit_repo.go`, `internal/handler/api/v1/inbox_limit_handler.go` | Chatwoot enterprise nested `agent_capacity_policies/:policy_id/inbox_limits` and assignment-path enforcement are covered; next review account-level create-limit behavior and legacy route compatibility. | Review |
| P4.6 | Captain/Copilot | `internal/model/captain_models.go`, `internal/model/copilot_models.go`, `internal/service/captain_*`, `internal/service/copilot_*`, `internal/handler/api/v1/captain_*`, `internal/handler/api/v1/copilot_handler.go` | Complete assistant, tools, scenarios, documents, responses, inbox bindings, suggestions, and streaming compatibility. | Todo |
| P4.7 | CSAT | `internal/csat/*`, `internal/automation/csat_survey_*`, `internal/handler/api/v1/csat_*`, `internal/service/csat_metrics_service.go` | Account-side list/metrics/review-note payloads and filters are aligned; next wire public update depth, resolve-triggered survey send, and download CSV parity. | Doing |
| P4.7 | CSAT | `internal/csat/*`, `internal/automation/csat_survey_*`, `internal/handler/api/v1/csat_*`, `internal/service/csat_metrics_service.go` | Account-side list/metrics/review-note payloads, public update depth, and resolve-triggered generic survey send are aligned; next wire download CSV parity and channel-specific template send hooks. | Doing |
| P4.8 | Automation and macros | `internal/automation/*`, `internal/handler/api/v1/automation_rule_handler.go`, `internal/handler/api/v1/macro_handler.go` | Finish action side effects, execution logs, webhook/email transcript delivery, and rule trigger coverage. | Todo |
| P4.9 | Assignment policies | `internal/autoassignment/*`, `internal/automation/agent_bot_rule_listener.go` | Match Chatwoot assignment policy behavior and availability/capacity rules. | Doing |
@@ -820,7 +822,7 @@ Enterprise work package breakdown:
| --- | --- | --- | --- |
| SLA | Policy CRUD parity, conversation SLA assignment, first-response/next-response/resolution timers, business-hours handling, breach events, notifications. | Policy payloads, applied-SLA attach, seconds-based thresholds, core state transitions, breach idempotency, report payloads, reference `only_during_business_hours` timing, and notification fan-out are covered. Durable scheduling remains Phase 5. | Review |
| Assignment and capacity | Assignment policy CRUD, inbox policy binding, round-robin/availability/capacity selection, manual assignment limits, fallback behavior. | Manual and automatic assignment respect policy, availability, team/inbox membership, and limits. | Review |
| CSAT account side | Survey send on resolve, response list, metrics, filters, downloads, review notes, resend/idempotency, public lock already implemented. | Account report list/metrics/review-note payload fixtures are covered by `f441680`; send/download/public depth remains. | Doing |
| CSAT account/public side | Survey send on resolve, response list, metrics, filters, downloads, review notes, resend/idempotency, public lock. | Account report list/metrics/review-note payload fixtures are covered by `f441680`; public object-shaped submit/update, one-response-per-message idempotency, and resolve-triggered generic survey message send are covered by `ef3a909`; download CSV remains. | Doing |
| Automation rules | Condition/action parity, event listener coverage, delayed actions, execution logs, stop-on-match behavior, webhook and transcript actions. | Rule trigger tests for conversation/contact/message events and durable retry for external actions. | Todo |
| Macros | Macro CRUD, availability by account/user, execute side effects, validation, audit/log output. | Execute changes conversation labels/status/assignee/team/notes/custom attributes exactly as frontend expects. | Todo |
| Audit | Audit model parity, mutating action coverage, request metadata, filters/pagination, admin endpoint payloads. | Representative mutations across core and enterprise features emit audit records. | Todo |
@@ -858,7 +860,7 @@ Known hotspots:
- `internal/worker/worker.go` is still mostly placeholder.
- `internal/automation/action_service.go` has pending webhook/email transcript work.
- `internal/automation/csat_survey_listener.go` has pending CSAT enable/send behavior.
- `internal/automation/csat_survey_listener.go` now handles CSAT enablement, survey rules, generic send idempotency, and message-updated response building; durable queueing and external WhatsApp/Twilio template delivery remain follow-ups.
- `internal/auth/webhook_registry.go` has pending signature verification for Facebook/WhatsApp.
- `internal/service/analytics_service.go` has placeholder analytics paths.
@@ -882,7 +884,7 @@ Tracking table:
| P5.2 | Move search indexing into retryable jobs where Chatwoot uses callbacks/jobs. | search services and worker | Todo |
| P5.3 | Implement automation webhook delivery with retry, timeout, and logs. | `internal/automation/action_service.go` | Todo |
| P5.4 | Implement email transcript delivery once email infrastructure is available. | `internal/automation/action_service.go` | Todo |
| P5.5 | Complete CSAT survey send listener and idempotency. | `internal/automation/csat_survey_listener.go`, `internal/csat/listener.go` | Todo |
| P5.5 | Move CSAT survey send and channel-specific external template delivery into durable jobs. | `internal/automation/csat_survey_listener.go`, `internal/csat/listener.go`, channel send services | Todo |
| P5.6 | Complete webhook signature verification for Facebook/WhatsApp/Twilio/provider paths. | `internal/auth/webhook_registry.go`, channel providers | Todo |
| P5.7 | Replace placeholder analytics with real report builders/queries. | `internal/service/analytics_service.go`, reporting services | Todo |
@@ -1044,3 +1046,4 @@ Verification milestone gates:
- 2026-06-05: Development tracker was normalized for handoff continuity after `330f875 docs: record applied sla reports checkpoint`; the current baseline now points at the latest implementation and documentation checkpoints, the planning control board records the next ordered B7-B12 checkpoints, Hermes search/automation/CSAT notes are mapped into active slices, and B7.6 has an explicit investigation/landing contract.
- 2026-06-05: B7 SLA notification checkpoint committed as `d23f3f0 feat(sla): notify users on sla misses`; new FRT/NRT/RT SLA miss events now create Chatwoot notification types for conversation participants, account administrators, and conversation assignee, with de-duplication and account membership filtering. Repeated evaluation stays idempotent. Current `reference/chatwoot` timing was verified to keep `only_during_business_hours` as a stored policy flag without changing elapsed-second thresholds, and a regression test records that behavior. Focused applied-SLA tests, service package tests, full `go test ./...`, and `git diff --check` passed. B7 moves to Review; next slice is B8 CSAT account/public/report/send parity.
- 2026-06-05: B8 account-side CSAT checkpoint committed as `f441680 feat(csat): align account report payloads`; CSAT report list now returns the raw Chatwoot response array with nested contact, assigned agent, reviewer, display conversation ID, Unix timestamps, and message ID. Filters now cover frontend `since/until`, `user_ids`, `inbox_id`, `team_id`, and `rating`; metrics returns `total_count`, `ratings_count`, and `total_sent_messages_count`; update/review-note actions return the Chatwoot CSAT serializer. Focused CSAT handler/service tests, handler and automation package tests, full `go test ./...`, and `git diff --check` passed. Next B8 checkpoint is public CSAT submit/update and resolve-triggered send parity.
- 2026-06-05: B8 public/send CSAT checkpoint committed as `ef3a909 feat(csat): send surveys on resolved conversations`; public CSAT update now accepts object-shaped `message.submitted_values`, repeated submissions update the same message-linked response, and the 14-day lock still follows the survey message creation date. The resolve listener now creates one `input_csat` template message only when the resolved conversation's inbox has CSAT enabled and survey rules allow it, skips duplicates, and no longer creates pending rating-0 responses. Message-updated events build responses from submitted CSAT values. Focused CSAT listener/service/handler/widget tests, automation and API handler package tests, full `go test ./...`, and `git diff --check` passed. Next B8 checkpoint is CSAT download CSV parity.