Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 120 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,45 @@ paths:
$ref: '#/components/responses/ForbiddenError'
"404":
$ref: '#/components/responses/NotFound'
/feature_tours/{id}/funnel:
parameters:
- name: id
in: path
required: true
schema:
type: integer
get:
tags: [Feature Tours]
summary: Get a feature tour's funnel
description: |
How people get on with a feature tour, the same numbers as its Funnel page in Site Overview › Feature Tours:
for each stop, how many people reached it, completed it, skipped it themselves or had it skipped because they
couldn't use it (each person counted once per stop and event); and the tour's totals from everyone's progress.
Stop-by-stop counts start on `counts_since`, the day they were first recorded; the totals cover everyone.
System Access users only.
operationId: getFeatureTourFunnel
security: [{tokenAuth: []}]
responses:
"200":
description: The feature tour's funnel
content:
application/json:
schema:
$ref: '#/components/schemas/FeatureTourFunnel'
example:
id: 12
name: Filters on Contacts
status: live
counts_since: "2026-12-04"
totals: { started: 40, completed: 31, in_progress: 4, ended_early: 5 }
stops:
- { id: 101, position: 1, stop_key: contacts_table, title: Where all the records live, reached: 40, completed: 38, skipped_by_user: 0, skipped_by_system: 2 }
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"404":
$ref: '#/components/responses/NotFound'
/tours/{id}/progress:
parameters:
- name: id
Expand Down Expand Up @@ -17059,7 +17098,12 @@ paths:

`storyboard` is the Intro's animation, drawn from Makerble building blocks when there is no Vimeo
link (see `GuidancePanelStoryboard` for its rules). Send it as an object, or `null` to remove it.
A broken rule answers `422` with every message in `errors`.

`feature_tour_id` chooses the feature tour the Intro offers with "Take the tour" (`null` for none).
It sets that tour's `page_key` to this Intro and unlinks any other tour that pointed here, naming it in
`notices`. It is refused when the chosen tour is live and another live tour is already on this Intro:
choose `null` first to take that one off.
A broken rule answers `422` with every message in `errors`, and nothing is changed.
operationId: updateGuidancePanel
security: [{tokenAuth: []}]
requestBody:
Expand Down Expand Up @@ -19403,6 +19447,56 @@ components:
type: array
items:
$ref: '#/components/schemas/Tour'
FeatureTourFunnel:
type: object
description: A feature tour's funnel
properties:
id:
type: integer
name:
type: string
status:
type: string
enum: [draft, amends_needed, live]
counts_since:
type: string
format: date
nullable: true
description: The day stop-by-stop counts were first recorded; null until anyone has taken a step
totals:
type: object
properties:
started:
type: integer
description: Everyone who has taken the tour
completed:
type: integer
in_progress:
type: integer
ended_early:
type: integer
stops:
type: array
items:
type: object
properties:
id:
type: integer
position:
type: integer
stop_key:
type: string
title:
type: string
description: The stop's own title, or Makerble's default
reached:
type: integer
completed:
type: integer
skipped_by_user:
type: integer
skipped_by_system:
type: integer
FeatureTour:
type: object
description: A feature tour and its stops in order
Expand All @@ -19416,7 +19510,8 @@ components:
type: string
status:
type: string
enum: [draft, live]
enum: [draft, amends_needed, live]
description: Only a live tour is shown to anyone. `amends_needed` is a draft that came back from review
page_key:
type: string
nullable: true
Expand Down Expand Up @@ -19481,7 +19576,8 @@ components:
type: string
status:
type: string
enum: [draft, live]
enum: [draft, amends_needed, live]
description: Only a live tour is shown to anyone. `amends_needed` is a draft that came back from review
page_key:
type: string
nullable: true
Expand Down Expand Up @@ -27712,6 +27808,16 @@ components:
format: date-time
updated_by:
$ref: '#/components/schemas/GuidancePanelUser'
feature_tour_id:
type: integer
nullable: true
description: |
The feature tour this Intro offers with "Take the tour" (its live tour, otherwise the one most recently
updated whose `page_key` is this Intro); null for none. Only a live tour is shown.
feature_tour_name:
type: string
nullable: true
description: That feature tour's name

GuidancePanelVersion:
type: object
Expand Down Expand Up @@ -27747,6 +27853,11 @@ components:
description: The last 10 versions, newest first
items:
$ref: '#/components/schemas/GuidancePanelVersion'
notices:
type: array
description: After a change, names any feature tour no longer offered on this Intro, e.g. "Checklists is no longer offered here."; otherwise empty
items:
type: string

GuidancePanelRequest:
type: object
Expand Down Expand Up @@ -27774,6 +27885,12 @@ components:
type: string
storyboard:
$ref: '#/components/schemas/GuidancePanelStoryboard'
feature_tour_id:
type: integer
nullable: true
description: |
The feature tour this Intro offers with "Take the tour"; null for none. Any other tour whose
`page_key` was this Intro is unlinked, and `notices` names it.

PaginatedGuidancePanels:
allOf:
Expand Down
14 changes: 11 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4238,7 +4238,7 @@ function buildDocsPage() {
${endpointCard("GET", "/guidance_panels/{key}", "Get a Guidance Panel and its recent changes", true, [
{ name: "key", in: "path", type: "string", required: true, desc: "The panel's key, e.g. <code>events</code>" }
], [
{ code: "200", cls: "response-2xx", desc: "The panel, with its last 10 versions: who, when, and what changed from what to what" },
{ code: "200", cls: "response-2xx", desc: "The panel, with its last 10 versions: who, when, and what changed from what to what, and the feature tour it offers (<code>feature_tour_id</code>, <code>feature_tour_name</code>)" },
{ code: "403", cls: "response-4xx", desc: "No System Access" },
{ code: "404", cls: "response-4xx", desc: "No panel with that key" }
])}
Expand All @@ -4250,7 +4250,8 @@ function buildDocsPage() {
{ name: "guidance_panel[staff_text]", in: "body", type: "string", required: false, desc: "Shown instead of the main action to people who can't use it" },
{ name: "guidance_panel[user_guide_url]", in: "body", type: "string", required: false, desc: "A page in the Makerble User Guide" },
{ name: "guidance_panel[vimeo_url]", in: "body", type: "string", required: false, desc: "A Vimeo link, or empty to show the page's own image or animation" },
{ name: "guidance_panel[storyboard]", in: "body", type: "object", required: false, desc: "The animation shown when there is no Vimeo link (see above), or <code>null</code> to remove it" }
{ name: "guidance_panel[storyboard]", in: "body", type: "object", required: false, desc: "The animation shown when there is no Vimeo link (see above), or <code>null</code> to remove it" },
{ name: "guidance_panel[feature_tour_id]", in: "body", type: "integer", required: false, desc: "The feature tour this Intro offers with \"Take the tour\", or <code>null</code> for none. Any other tour pointing here is unlinked and named in <code>notices</code>. Refused when the tour is live and another live tour is already on this Intro" }
], [
{ code: "200", cls: "response-2xx", desc: "The changed panel and its last 10 versions; the page shows the change from its next load" },
{ code: "403", cls: "response-4xx", desc: "No System Access" },
Expand Down Expand Up @@ -4783,7 +4784,7 @@ function buildDocsPage() {
<div class="section-eyebrow">Integrations</div>
<h2 class="section-title">Feature Tours</h2>
<div class="section-desc">
<p>A feature tour is a short guided tour that introduces one feature to people who already use Makerble. Unlike a Welcome Tour it belongs to no Organisation: Makerble staff write it once. A <code>live</code> tour with a <code>page_key</code> is offered by "Take the tour" on that page's Intro (the Show/Hide Guidance panel at the top of a Manage page, such as <code>contacts</code>); each Intro has at most one live tour. <code>auto_prompt</code> offers it once, the first time someone opens its page.</p>
<p>A feature tour is a short guided tour that introduces one feature to people who already use Makerble. Unlike a Welcome Tour it belongs to no Organisation: Makerble staff write it once. Its <code>status</code> is <code>draft</code>, <code>amends_needed</code> (a draft that came back from review) or <code>live</code>; only a live tour is shown to anyone. A <code>live</code> tour with a <code>page_key</code> is offered by "Take the tour" on that page's Intro (the Show/Hide Guidance panel at the top of a Manage page, such as <code>contacts</code>); each Intro has at most one live tour. The link can also be set from the Intro's side, with <code>feature_tour_id</code> on <code>PATCH /guidance_panels/{key}</code>. <code>auto_prompt</code> offers it once, the first time someone opens its page.</p>
<p>Each stop is one of the stops Welcome Tours use, named by <code>stop_key</code>, and shows Makerble's <code>default_title</code> and <code>default_body</code> unless it has its own <code>title</code> or <code>body</code>. <code>GET /tour_stops</code> lists every stop Makerble knows, grouped by feature, with the page each opens and its default wording. System Access users (Makerble staff) only; anyone else gets <code>403</code>.</p>
</div>
<div class="endpoint-list">
Expand Down Expand Up @@ -4818,6 +4819,13 @@ function buildDocsPage() {
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "404", cls: "response-4xx", desc: "Not found" }
])}
${endpointCard("GET", "/feature_tours/{id}/funnel", "Get a feature tour's funnel", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Feature tour ID" }
], [
{ code: "200", cls: "response-2xx", desc: "The tour's <code>totals</code> (<code>started</code>, <code>completed</code>, <code>in_progress</code>, <code>ended_early</code>) and, for each stop in order, how many people <code>reached</code>, <code>completed</code>, <code>skipped_by_user</code> and <code>skipped_by_system</code> it" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "404", cls: "response-4xx", desc: "Not found" }
], "The same numbers as the tour's Funnel page in Site Overview › Feature Tours, counting each person once per stop and event. Stop counts start on <code>counts_since</code>, the day they were first recorded; the totals cover everyone who has taken the tour.")}
${endpointCard("POST", "/feature_tours", "Create a feature tour", true, [], [
{ code: "201", cls: "response-2xx", desc: "Feature tour created (a draft unless <code>status</code> is <code>live</code>)" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
Expand Down
Loading