Phase 2 part 3: buying signals, the funnel and the scorecard
Schema 7 adds signals (hypothesis, how to spot it, angle, status, utm slug), funnel_events (stage, channel, subject, campaign, source, deduped by external ID) and outside_campaigns. Prospects -> Signals is the scorecard: each signal's funnel from found to paid, people once per stage, with revenue and outside spend, by period and channel. Each signal's page shows its funnel by channel, its campaigns and its latest steps. Prospects carry a signal (filter, change, "found" recorded) and outcomes can be recorded by hand. Settings -> Lead sources holds origami.chat and explee.com API keys. Every 6 hours (or Import now) Supermarket reads their campaigns, numbers and spend, contacted people, replies and hot leads, read-only: interested people and repliers become prospects, unsubscribes are suppressed, and each campaign is assigned to a signal. The explee.com client follows its OpenAPI schema; origami.chat's responses are undocumented, so its client reads fields loosely and its Test shows the real response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"supermarket/internal/inventory"
|
||||
"supermarket/internal/profile"
|
||||
"supermarket/internal/prospects"
|
||||
"supermarket/internal/signals"
|
||||
)
|
||||
|
||||
// prospectBadge is a prospect's status as search shows it.
|
||||
@@ -47,6 +48,8 @@ var settingsPages = []struct {
|
||||
"ai provider model anthropic claude openai ollama lm studio api key hermes effort"},
|
||||
{hit{"Core & Hermes", "Settings · the Federated Core, its services and the Hermes bridge", "/settings/core", ""},
|
||||
"core hermes federated mcp hub bridge espocrm nextcloud plausible gitea"},
|
||||
{hit{"Lead sources", "Settings · origami.chat and explee.com API keys", "/settings/sources", ""},
|
||||
"lead sources origami explee api key import campaigns prospecting outreach"},
|
||||
}
|
||||
|
||||
func (s *Server) searchPage(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -175,6 +178,15 @@ func (s *Server) search(q string) ([]hitGroup, error) {
|
||||
prospectHits = append(prospectHits, hit{Title: p.Name(), Detail: detail, Link: "/prospects?status=" + p.Status, Badge: prospectBadge(p.Status)})
|
||||
}
|
||||
|
||||
sigs, err := signals.Search(s.DB, words, searchLimit)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, sg := range sigs {
|
||||
prospectHits = append([]hit{{Title: sg.Name, Detail: "Buying signal · " + sg.Hypothesis,
|
||||
Link: "/signals/" + strconv.FormatInt(sg.ID, 10), Badge: sg.Status}}, prospectHits...)
|
||||
}
|
||||
|
||||
var settings []hit
|
||||
if p, err := profile.Load(s.DB); err == nil && p.IsSet() {
|
||||
for _, pr := range p.Products {
|
||||
|
||||
Reference in New Issue
Block a user