Files
supermarket/internal/web/templates/sources.html
T
davidandClaude Opus 5.5 b025a97e4a 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>
2026-11-21 18:06:58 -07:00

32 lines
1.7 KiB
HTML

{{define "content"}}{{template "settings-start" .}}{{with .Data}}
<h2>Lead sources</h2>
<p class="lede">The prospecting tools you test buying signals in. Supermarket only reads from them: campaigns and their numbers, who was contacted, who replied, who was interested and who unsubscribed. It never starts, changes or sends anything there. Results appear on <a href="/signals">Signals</a>.</p>
<form method="post" action="/settings/sources" autocomplete="off">
{{range .Sources}}
<section class="card">
<h3>{{.Name}}</h3>
{{template "key-field" (dict "F" .Key "Set" .Set)}}
{{if eq .ID "origami"}}
<label>Project <span class="muted small">(optional)</span> <input name="origami_project" value="{{$.Data.Project}}" placeholder="a project ID, to read only that project">
<span class="help">If your organization has projects, the ID of the one to read. Leave empty to read the whole organization.</span></label>
{{end}}
{{if .Set}}
<button type="button" class="secondary small" hx-post="/settings/sources/test/{{.ID}}" hx-target="#test-{{.ID}}" hx-indicator="#testing-{{.ID}}">Test</button>
<span id="testing-{{.ID}}" class="htmx-indicator">Checking…</span>
<div id="test-{{.ID}}"></div>
{{end}}
</section>
{{end}}
<div class="actions"><button type="submit">Save</button></div>
</form>
{{end}}{{template "settings-end"}}{{end}}
{{define "test-result"}}
{{with .Error}}<p class="error">{{.}}</p>{{end}}
{{with .OK}}<p class="ok">{{.}}</p>{{end}}
{{with .Sample}}<details><summary>What the API sends</summary>
<p class="help">origami.chat doesn't document its responses, so Supermarket looks fields up by the names its docs use. If an import misses replies or contacts, this shows the real names.</p>
<pre class="sample">{{.}}</pre></details>{{end}}
{{end}}